activity_my_sliding_drawable.xml
<?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" >
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:content="@+id/content"
android:handle="@+id/handle_button_1"
android:topOffset="50dip" >
<Button
android:id="@+id/handle_button_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bottom to Top" >
</Button>
<LinearLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FF444444"
android:gravity="center"
android:orientation="vertical" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item 1" >
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item 2" >
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item 3" >
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item 4" >
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item 5" >
</Button>
</LinearLayout>
</SlidingDrawer>
</LinearLayout>
MySlidingDrawable.java
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
public class MySlidingDrawable extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_sliding_drawable);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_my_sliding_drawable, menu);
return true;
}
}
Aquí unas capturas de la aplicación:
It works!
Roger Sala,
No hay comentarios:
Publicar un comentario