SlidingDrawer
SlidingDrawer copied to clipboard
Textview's text which is in sliding drawer is not updated until it opened or closed
Hi. I'm using this SlidingDrawer very usefully. But I found a bug when I use Pixel 2 API 24 Emulator I put some textviews Inside of the Sliding drawer, and I change the text every second. when I test it with API 28, It's work well. But in Pixel 2 API 24, it doesn't work. My XML code looks like this..
<hollowsoft.slidingdrawer.SlidingDrawer
android:id="@+id/runningDrawer"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="70dp"
layout:content="@+id/content"
layout:handle="@+id/runningHandle">
<Button
android:id="@+id/runningHandle"
android:layout_width="70dp"
android:layout_height="27dp"
android:background="@drawable/button_white_background"
android:gravity="center"
android:text="▲"
android:textColor="@color/red"
android:textSize="15dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
style="@style/ListDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Distance_km" />
<TextView
android:layout_marginTop="15dp"
android:id="@+id/runningDistanceTextView"
style="@style/blackMediumText18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@{viewModel.distanceSpeed.distance}" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
style="@style/ListDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Time" />
<Chronometer
android:layout_marginTop="15dp"
android:id="@+id/runningTimerTextView"
style="@style/blackMediumText18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
style="@style/ListDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/speed_km" />
<TextView
android:layout_marginTop="15dp"
android:id="@+id/runningSpeedTextView"
style="@style/blackMediumText18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="0.0" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</hollowsoft.slidingdrawer.SlidingDrawer>