0
我在android應用程序中工作,我想在使用動畫效果滑動時使我的佈局的一部分可見和不可見。水平滑動以使佈局與動畫可見
這是我的佈局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2" >
<LinearLayout
android:id="@+id/hiddenLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight=".3"
android:background="@android:color/black"
android:orientation="horizontal"
android:visibility="gone" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.7"
android:background="@android:color/darker_gray" />
</LinearLayout>
</LinearLayout>
默認命名佈局 「hiddenLayout」 的知名度已經一去不復返了。但是當我從左向右滑動時,它應該像ViewPager一樣以動畫效果顯示。它的能見度應該朝相反的方向滑動。
我該如何實現這一點。
是否有可能與視圖尋呼機? – Arun
實際上,這是一種解決方法,可以在不使用瀏覽器的情況下獲得類似效果。 – nikvs