我可以CollapsingToolbarLayout通过setTitle方法设置a的标题吗?
还有办法设置字幕吗?
我正在尝试使用自定义视图实现CollapsingToolbarLayout,但我无法执行此操作:
我想做什么(对不起,我不能发布图片所以它是imgur):
展开后,标题是带有图像和标题的配置文件屏幕
未展开(滚动),图像和标题将在工具栏上
但是我看到的一切都没有按照我的预期运作
我是新手和棒棒糖动画,所以如果有人能帮助我,我将非常感激!
(我不发布示例代码,因为我没有与帖子相关的内容)
我想将操作栏/工具栏显示并隐藏为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)
提前致谢.