私はAppbarlayoutを使い、次にRecyclerViewを使ってcordinatorlayoutを使って単純なTextViewを折りたたんだ/展開します。しかし、まだ私が間違って何をしているのか分からない。 TextView(textViewMainTop)がまだ折りたたまれていない/展開していません。問題を見つけることができません。私の xmlコードを見てください。 Appbarlayoutのビューを折りたたむ/展開できません
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="7"
android:orientation="vertical" >
<!-- <LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3.5" > -->
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3.5">
<com.openskylabs.skymo.components.TypefacedTextView
android:id="@+id/textViewMainTop"
style="@style/custom_roboto_midium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bubbled_textview"
android:gravity="center"
app:layout_scrollFlags="scroll|enterAlways"
android:text="Good evening, Eric"
android:textSize="17dp" />
</android.support.design.widget.AppBarLayout>
<!-- </LinearLayout> -->
<LinearLayout
android:id="@+id/llTabLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="6.5"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llFirstFavTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_fev_small" />
<com.openskylabs.skymo.components.TypefacedTextView
style="@style/custom_roboto_midium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5sp"
android:text="Set Fav" />
</LinearLayout>
<View
android:id="@+id/viewVertical"
android:layout_width="0.5sp"
android:layout_height="match_parent"
android:background="#60000000" />
<LinearLayout
android:id="@+id/llSecondInviteTab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_cont_small" />
<com.openskylabs.skymo.components.TypefacedTextView
style="@style/custom_roboto_midium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5sp"
android:text="Invite" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/viewBelowRay"
android:layout_width="match_parent"
android:layout_height="1sp"
android:background="#60000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="#eaeaea"
android:gravity="center"
android:orientation="vertical" >
<android.support.v7.widget.RecyclerView
android:id="@+id/rvOrderList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
は、ここで私は、最初の部分を折りたたむしたいです。 2番目の部分ではRecyclerViewを使用しています。
正確な問題は何ですか。投稿のスクリーンショット。 –
あなたが直面しているパフォーマンスの問題の種類は、問題を詳しく説明してください。 – Umair
@jaydroider私はちょうどTextView(textViewMainTop)を折りたたんで/展開したいです。私はそれをAppbarlayoutに入れました。しかし残念ながら、それは崩壊していません。 – Ranjit