开发者

How to create an Android slider that slides from bottom to top when a button is clicked?

I want to create a slider that slides from bottom to top when I click a button.

For examp开发者_StackOverflow社区le, I have a button named Login. If I click the Login button, the slider must slide from bottom to top.


Here is the code for slider bottom to top

<SlidingDrawer android:id="@+id/slidingDrawer"
        android:layout_height="wrap_content" 
        android:layout_width="fill_parent"
        android:layout_gravity="bottom"

        android:handle="@+id/slidingDrawerFrameLayout"
        android:content="@+id/ButtonLayout">

        <FrameLayout android:id="@+id/slidingDrawerFrameLayout"
            android:layout_width="fill_parent" android:layout_height="wrap_content"
            android:gravity="center|top"
            android:orientation="horizontal"
            >

            <TextView android:id="@+id/tvSlidingText"
                android:textStyle="bold" android:textSize="16dip"
                android:layout_width="wrap_content" android:layout_height="fill_parent"
                android:textColor="#000000" android:layout_gravity="center_vertical"
                android:text="Test" android:layout_marginLeft="5dip" />
            <ImageView android:id="@+id/slidingArrowImage"

                android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal|center_vertical">
            </ImageView>

        </FrameLayout>

           <LinearLayout
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:orientation="horizontal"
            android:id="@+id/ButtonLayout"
             android:background="#000000"
                                >
            <Button 
                android:layout_width="wrap_content"  android:layout_height="wrap_content"
                android:id="@+id/Button" >
            </Button>




  </LinearLayout>



    </SlidingDrawer>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜