相关疑难解决方法(0)

33
推荐指数
5
解决办法
3万
查看次数

使用自定义视图CollapsingToolbarLayout

我正在尝试使用自定义视图实现CollapsingToolbarLayout,但我无法执行此操作:

我想做什么(对不起,我不能发布图片所以它是imgur):

展开后,标题是带有图像和标题的配置文件屏幕

在此输入图像描述

未展开(滚动),图像和标题将在工具栏上

在此输入图像描述

但是我看到的一切都没有按照我的预期运作

我是新手和棒棒糖动画,所以如果有人能帮助我,我将非常感激!

(我不发布示例代码,因为我没有与帖子相关的内容)

android toolbar android-collapsingtoolbarlayout

22
推荐指数
1
解决办法
2万
查看次数

滚动查看寻呼机内容时显示和隐藏操作栏

我想将操作栏/工具栏显示并隐藏为Google Play商店应用.我在顶部使用滑动标签并查看寻呼机以显示每个标签的内容.以下是Google Play商店应用的截图供参考:

在此输入图像描述 在此输入图像描述

我的布局XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent">

    <LinearLayout style="@style/HeaderBar"
        android:id="@+id/headerbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <include layout="@layout/toolbar_no_bg"
            android:id="@+id/toolbar_actionbar"/>

        <com.fauzie.sample.tabsspinner.widget.SlidingTabLayout
            android:background="@color/tab_background"
            android:id="@+id/sliding_tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/headerbar">

    </android.support.v4.view.ViewPager>

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

提前致谢.

android material-design

13
推荐指数
2
解决办法
1万
查看次数