Android 布局架构:-使文本视图成为带有动画的工具栏
目前我已经完成了以下工作,如图所示 所以现在当我滚动第一个viewpager时,textview和TableLayout会变得很粘滞,因为我正在使用它,现在我想当viewpager消失,textview和TableLayout粘滞时,时间会使textview不可见/消失,toolbar应该通过某种动画获得标题,就像我们通过使用CollavingToolbarLayout获得的一样Android 布局架构:-使文本视图成为带有动画的工具栏,android,android-viewpager,material-design,Android,Android Viewpager,Material Design,目前我已经完成了以下工作,如图所示 所以现在当我滚动第一个viewpager时,textview和TableLayout会变得很粘滞,因为我正在使用它,现在我想当viewpager消失,textview和TableLayout粘滞时,时间会使textview不可见/消失,toolbar应该通过某种动画获得标题,就像我们通过使用CollavingToolbarLayout获得的一样 my xml :- <?xml version="1.0" encoding="utf-8"?> <
my xml :-
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_below="@+id/txt"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_width="match_parent"
android:visibility="visible"
xmlns:android="http://schemas.android.com/apk/res/android">
<ru.noties.scrollable.ScrollableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:CustomTabLayout="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/scrollable_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:scrollable_closeUpAnimationMillis="250"
app:scrollable_closeUpAnimatorInterpolator="@android:anim/accelerate_decelerate_interpolator"
app:scrollable_considerIdleMillis="125"
app:scrollable_defaultCloseUp="true"
app:scrollable_friction="5"
app:scrollable_maxScroll="150dp"
app:scrollable_scrollerFlywheel="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/grey"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/header_view_pager"
android:layout_width="match_parent"
android:layout_height="150dp" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Ui.CustomTextView
android:id="@+id/ti"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Text"
android:textColor="@color/red"
android:textSize="30dp" />
<Ui.CustomTabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/ti"
android:background="@color/white"
CustomTabLayout:fonts="@string/font_Oswald"
app:tabSelectedTextColor="@color/red" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</ru.noties.scrollable.ScrollableLayout>
myxml:-