mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
Replace MaterialViewPager with Google Controls
This commit is contained in:
parent
6ce26b5cba
commit
937d6aa09f
8 changed files with 121 additions and 63 deletions
|
|
@ -70,7 +70,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.databinding/library/1.0-rc1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/22.2.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/22.2.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/22.2.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/gridlayout-v7/22.2.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/22.2.1/jars" />
|
||||
|
|
@ -79,13 +79,10 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.2/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics/2.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.florent37/materialviewpager/1.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.ksoichiro/android-observablescrollview/1.5.2/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.mmin18.layoutcast/library/1.1.4/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.porokoro/paperboy/364c77b49f/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.instabug.library/instabugcore/1.7/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.instabug.library/instabugsupport/1.7/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.jpardogo.materialtabstrip/library/1.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/aboutlibraries/5.0.5/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/iconics/1.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialdrawer/3.0.8/jars" />
|
||||
|
|
@ -110,11 +107,10 @@
|
|||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
|
||||
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="commons-io-2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="okhttp-2.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="kenburnsview-1.0.6" level="project" />
|
||||
<orderEntry type="library" exported="" name="rxjava-1.0.10" level="project" />
|
||||
<orderEntry type="library" exported="" name="antlr4-4.5" level="project" />
|
||||
<orderEntry type="library" exported="" name="instabugsupport-1.7" level="project" />
|
||||
|
|
@ -126,12 +122,11 @@
|
|||
<orderEntry type="library" exported="" name="library-1.1.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="org.abego.treelayout.core-1.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="paperboy-364c77b49f" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-1.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="DBFlow-2.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="compilerCommon-1.0-rc1" level="project" />
|
||||
<orderEntry type="library" exported="" name="compiler-1.0-rc1" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="mimecraft-1.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="guava-18.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="iconics-1.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
|
||||
|
|
@ -145,9 +140,9 @@
|
|||
<orderEntry type="library" exported="" name="commons-lang3-3.3.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="kotlin-stdlib-0.12.613" level="project" />
|
||||
<orderEntry type="library" exported="" name="design-22.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="cardview-v7-22.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="kotlin-runtime-0.12.613" level="project" />
|
||||
<orderEntry type="library" exported="" name="cardview-v7-22.2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="DBFlow-Compiler-2.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="kotlin-runtime-0.12.613" level="project" />
|
||||
<orderEntry type="library" exported="" name="answers-1.2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="picasso-2.5.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="recyclerview-v7-22.2.1" level="project" />
|
||||
|
|
@ -165,8 +160,6 @@
|
|||
<orderEntry type="library" exported="" name="eventbus-2.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-2.1.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="instabugcore-1.7" level="project" />
|
||||
<orderEntry type="library" exported="" name="materialviewpager-1.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="android-observablescrollview-1.5.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="crashlytics-2.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="ST4-4.0.8" level="project" />
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -50,14 +50,13 @@ dependencies {
|
|||
transitive = true
|
||||
}
|
||||
|
||||
compile('com.github.florent37:materialviewpager:1.1.0@aar') {
|
||||
transitive = true
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:22.2.1'
|
||||
compile 'com.android.support:design:22.2.1'
|
||||
compile 'com.android.support:gridlayout-v7:22.2.1'
|
||||
compile 'com.android.support:recyclerview-v7:22.2.1'
|
||||
|
||||
compile 'com.android.support:appcompat-v7:22.2.+'
|
||||
compile 'com.android.support:design:22.2.+'
|
||||
compile 'com.android.support:gridlayout-v7:22.2.+'
|
||||
compile 'com.android.support:recyclerview-v7:22.2.+'
|
||||
// Image Loading/Caching
|
||||
compile 'com.squareup.picasso:picasso:2.5.2'
|
||||
|
||||
// Icons
|
||||
compile 'com.mikepenz:iconics:1.1.0@aar'
|
||||
|
|
|
|||
|
|
@ -1,24 +1,84 @@
|
|||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:gravity="center"
|
||||
android:id="@+id/drawer_layout"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<com.github.florent37.materialviewpager.MaterialViewPager
|
||||
android:id="@+id/materialViewPager"
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:viewpager_logoMarginTop="70dp"
|
||||
app:viewpager_pagerTitleStrip="@layout/material_view_pager_pagertitlestrip_standard"
|
||||
app:viewpager_color="@color/brand"
|
||||
app:viewpager_headerHeight="250dp"
|
||||
app:viewpager_headerAlpha="1"
|
||||
app:viewpager_logo="@layout/avatar_with_bars"
|
||||
app:viewpager_hideLogoWithFade="true"
|
||||
app:viewpager_hideToolbarAndTitle="false"
|
||||
app:viewpager_enableToolbarElevation="false" />
|
||||
android:elevation="0dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="210dp"
|
||||
android:fitsSystemWindows="true"
|
||||
|
||||
app:contentScrim="?attr/colorPrimary"
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:expandedTitleMarginStart="48dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<include
|
||||
android:id="@+id/avatar_with_bars"
|
||||
layout="@layout/avatar_with_bars"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginTop="70dp"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:theme="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" />
|
||||
|
||||
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/detail_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
|
||||
app:layout_anchor="@+id/collapsing_toolbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:tabGravity="fill"
|
||||
|
||||
app:layout_collapseMode="pin"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabMode="fixed"
|
||||
android:fillViewport="false" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
@ -7,9 +7,11 @@
|
|||
<item name="android:listSeparatorTextViewStyle">@style/MyOwnListSeperatorTextViewStyle</item>
|
||||
<item name="android:textColorPrimary">@android:color/white</item>
|
||||
|
||||
<item name="android:elevation" tools:targetApi="21">0dp</item>
|
||||
<item name="elevation">0dp</item>
|
||||
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
|
||||
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
|
||||
<item name="windowActionBar">false</item>
|
||||
|
|
@ -56,7 +58,7 @@
|
|||
|
||||
|
||||
<style name="PopupTheme" parent="Widget.AppCompat.PopupMenu.Overflow">
|
||||
<item name="android:popupBackground">@color/accent_color</item>
|
||||
<item name="android:popupBackground">@color/brand_500</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
|
@ -107,7 +109,6 @@
|
|||
|
||||
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
|
||||
<item name="spinBars">true</item>
|
||||
<item name="color">@color/drawerArrowColor</item>
|
||||
</style>
|
||||
|
||||
<style name="ChatMessageUserTextViewStyle">
|
||||
|
|
@ -116,4 +117,8 @@
|
|||
<item name="android:shadowDy">1</item>
|
||||
<item name="android:shadowRadius">1</item>
|
||||
</style>
|
||||
|
||||
<style name="Toolbar" parent="Base.ThemeOverlay.AppCompat.ActionBar">
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -346,7 +346,7 @@ public class LoginActivity extends AppCompatActivity
|
|||
.make(this.findViewById(R.id.login_linear_layout), content, Snackbar.LENGTH_LONG);
|
||||
|
||||
View snackbarView = snackbar.getView();
|
||||
snackbarView.setBackgroundColor(getResources().getColor(R.color.red));//change Snackbar's background color;
|
||||
snackbarView.setBackgroundColor(Color.RED);//change Snackbar's background color;
|
||||
snackbar.show(); // Don’t forget to show!
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import android.content.Intent;
|
|||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Gravity;
|
||||
|
|
@ -16,7 +18,6 @@ import android.widget.CompoundButton;
|
|||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.crashlytics.android.core.CrashlyticsCore;
|
||||
import com.github.florent37.materialviewpager.MaterialViewPager;
|
||||
import com.habitrpg.android.habitica.callbacks.HabitRPGUserCallback;
|
||||
import com.habitrpg.android.habitica.callbacks.TaskCreationCallback;
|
||||
import com.habitrpg.android.habitica.callbacks.TaskScoringCallback;
|
||||
|
|
@ -79,10 +80,18 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
static final int TASK_UPDATED_RESULT = 2;
|
||||
|
||||
//region View Elements
|
||||
@InjectView(R.id.materialViewPager)
|
||||
MaterialViewPager materialViewPager;
|
||||
@InjectView(R.id.viewpager)
|
||||
ViewPager materialViewPager;
|
||||
|
||||
@InjectView(R.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
|
||||
@InjectView(R.id.detail_tabs)
|
||||
TabLayout detail_tabs;
|
||||
|
||||
@InjectView(R.id.avatar_with_bars)
|
||||
View avatar_with_bars;
|
||||
|
||||
Drawer drawer;
|
||||
|
||||
Drawer filterDrawer;
|
||||
|
|
@ -95,8 +104,6 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
private HostConfig hostConfig;
|
||||
APIHelper mAPIHelper;
|
||||
|
||||
android.support.v4.view.ViewPager viewPager;
|
||||
|
||||
// just to test the view
|
||||
private HabitRPGUser User;
|
||||
|
||||
|
|
@ -128,8 +135,6 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
return;
|
||||
}
|
||||
|
||||
toolbar = materialViewPager.getToolbar();
|
||||
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
|
|
@ -150,9 +155,9 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
|
||||
View mPagerRootView = materialViewPager.getRootView();
|
||||
|
||||
View avatarHeaderView = mPagerRootView.findViewById(R.id.avatar_with_bars_layout);
|
||||
//View avatarHeaderView = mPagerRootView.findViewById(R.id.avatar_with_bars_layout);
|
||||
|
||||
avatarInHeader = new AvatarWithBarsViewModel(this, avatarHeaderView);
|
||||
avatarInHeader = new AvatarWithBarsViewModel(this, avatar_with_bars);
|
||||
|
||||
drawer = MainDrawerBuilder.CreateDefaultBuilderSettings(this, toolbar)
|
||||
.withSelectedItem(0)
|
||||
|
|
@ -166,10 +171,9 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
.withCloseOnClick(false)
|
||||
.append(drawer);
|
||||
|
||||
viewPager = materialViewPager.getViewPager();
|
||||
viewPager.setOffscreenPageLimit(6);
|
||||
materialViewPager.setOffscreenPageLimit(6);
|
||||
|
||||
materialViewPager.getViewPager().setCurrentItem(0);
|
||||
materialViewPager.setCurrentItem(0);
|
||||
|
||||
User = new Select().from(HabitRPGUser.class).where(Condition.column("id").eq(hostConfig.getUser())).querySingle();
|
||||
this.observer = new FlowContentObserver();
|
||||
|
|
@ -213,7 +217,7 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
}
|
||||
|
||||
private void showSnackbar(String content, boolean negative) {
|
||||
Fragment f = ViewFragmentsDictionary.get(materialViewPager.getViewPager().getCurrentItem());
|
||||
Fragment f = ViewFragmentsDictionary.get(materialViewPager.getCurrentItem());
|
||||
|
||||
Snackbar snackbar = Snackbar.make(f.getView().findViewById(R.id.fab), content, Snackbar.LENGTH_LONG);
|
||||
|
||||
|
|
@ -221,7 +225,7 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
View snackbarView = snackbar.getView();
|
||||
|
||||
//change Snackbar's background color;
|
||||
snackbarView.setBackgroundColor(getResources().getColor(R.color.red));
|
||||
snackbarView.setBackgroundColor(Color.RED);
|
||||
}
|
||||
|
||||
snackbar.show();
|
||||
|
|
@ -392,7 +396,7 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
public void loadTaskLists() {
|
||||
android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
|
||||
viewPager.setAdapter(new FragmentPagerAdapter(fragmentManager) {
|
||||
materialViewPager.setAdapter(new FragmentPagerAdapter(fragmentManager) {
|
||||
|
||||
int oldPosition = -1;
|
||||
|
||||
|
|
@ -448,7 +452,9 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
}
|
||||
});
|
||||
|
||||
materialViewPager.getPagerTitleStrip().setViewPager(viewPager);
|
||||
|
||||
detail_tabs.setupWithViewPager(materialViewPager);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.habitrpg.android.habitica;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
|
|
@ -119,7 +120,7 @@ public class TavernActivity extends AppCompatActivity implements Callback<List<C
|
|||
View snackbarView = snackbar.getView();
|
||||
|
||||
//change Snackbar's background color;
|
||||
snackbarView.setBackgroundColor(getResources().getColor(R.color.red));
|
||||
snackbarView.setBackgroundColor(Color.RED);
|
||||
}
|
||||
|
||||
snackbar.show();
|
||||
|
|
|
|||
|
|
@ -7,13 +7,10 @@ import android.support.design.widget.FloatingActionButton;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.github.florent37.materialviewpager.MaterialViewPagerHelper;
|
||||
import com.github.florent37.materialviewpager.adapter.RecyclerViewMaterialAdapter;
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.events.AddTaskTappedEvent;
|
||||
import com.habitrpg.android.habitica.ui.adapter.HabitItemRecyclerViewAdapter;
|
||||
|
|
@ -38,8 +35,7 @@ public class TaskRecyclerViewFragment extends Fragment implements View.OnClickLi
|
|||
public void SetInnerAdapter(HabitItemRecyclerViewAdapter adapter, Class<?> classType, boolean showFloatingButton) {
|
||||
this.classType = classType;
|
||||
this.showFloatingButton = showFloatingButton;
|
||||
mAdapter = new RecyclerViewMaterialAdapter(adapter);
|
||||
adapter.setParentAdapter(mAdapter);
|
||||
mAdapter = adapter;
|
||||
}
|
||||
|
||||
private View view;
|
||||
|
|
@ -59,8 +55,8 @@ public class TaskRecyclerViewFragment extends Fragment implements View.OnClickLi
|
|||
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
if (alreadyCreated)
|
||||
return;
|
||||
//if (alreadyCreated)
|
||||
// return;
|
||||
|
||||
mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
|
||||
|
||||
|
|
@ -86,12 +82,10 @@ public class TaskRecyclerViewFragment extends Fragment implements View.OnClickLi
|
|||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
}
|
||||
|
||||
layoutManager.setSmoothScrollbarEnabled(true);
|
||||
//layoutManager.setSmoothScrollbarEnabled(true);
|
||||
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
MaterialViewPagerHelper.registerRecyclerView(getActivity(), mRecyclerView, null);
|
||||
|
||||
alreadyCreated = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue