【发布时间】:2015-12-16 16:03:14
【问题描述】:
抱歉暂时没有编写android应用程序,过去我使用带有linearlayout的Scrollview并且视图是可滚动的
但是,现在它使用 coordinatorlayout 和 appbarlayout
我尝试了scrollview,但是里面的内容是不可滚动的,所以我在网上找到了一些讨论是使用nestscollview,但仍然没有运气,如何解决它?
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000"
android:orientation="vertical">
<TextView
android:id="@+id/first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="00:10 When loading an HLS/MP3 stream the current position almost always returns 5-15s in to the stream."
android:textSize="18sp" />
<TextView
android:id="@+id/second"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="00:30 I'm streaming an HLS/MP3 source, starting from zero and setting the setPlayWhenReady to true from the beginning."
android:textSize="18sp" />
<TextView
android:id="@+id/third"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="01:00 Debug print outs show the when we receive STATE_READY in onPlayerStateChanged the current position returns almost all the time 5-15 seconds into the stream when it in fact should be 0."
android:textSize="18sp" />
<TextView
android:id="@+id/fourth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="01:30 When listening to the same stream, but downloaded, it reports 0 (zero) och getCurrentPosition."
android:textSize="18sp" />
<TextView
android:id="@+id/five"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="01:30 When listening to the same stream, but downloaded, it reports 0 (zero) och getCurrentPosition."
android:textSize="18sp" />
<TextView
android:id="@+id/six"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="01:30 When listening to the same stream, but downloaded, it reports 0 (zero) och getCurrentPosition."
android:textSize="18sp" />
<TextView
android:id="@+id/seven"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="01:30 When listening to the same stream, but downloaded, it reports 0 (zero) och getCurrentPosition."
android:textSize="18sp" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.AppBarLayout>
非常感谢
【问题讨论】:
标签: android scroll android-scrollview android-appbarlayout