Jump to content

[resolu]Faire d'un SlidingDrawer un menu pour son application


zippeurfou

Recommended Posts

Salut,

je suis désoler de poster un peu partout... Je suis sur plusieur front à la fois et la tout bloque :(.

Donc voila mon idée:

Je voudrais utiliser un slidingDrawer pour faire un menu.

L'idée du menu c'est de faire un TabWidget (ou des bouton...) qui change le reste de l'ecran mais le menu reste identique.

En clair changer dans le code l'include par un autre lorsque je change de tab/clique sur bouton tout en gardant le reste de l'ecran identique.

Toute aide serait bienvenu :)

<?xml version="1.0" encoding="utf-8"?>
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
   android:layout_height="fill_parent" android:id="@+id/test">




       android:id="@+id/drawer"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:handle="@+id/handle"
       android:content="@+id/content"
       android:orientation="vertical"
       android:topOffset="300dp"


       >










android:layout_width="88dip"
android:layout_height="44dip"
android:src="@drawable/smiley_sweaty"
>



android:id="@id/content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="fill_parent"
android:background="#00ff00">















       android:id="@+id/TabHoost01"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent">
           android:layout_width="fill_parent"
           android:layout_height="fill_parent">

               android:id="@android:id/tabs"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:layout_alignParentBottom="true">



               android:id="@android:id/tabcontent"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content" 
               android:layout_alignParentTop="true"
               android:layout_above="@android:id/tabs">
















Link to comment
Share on other sites

resolu :).

    xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:id="@+id/layout">
       android:id="@+id/TabHoost01"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent">
           android:layout_width="fill_parent"
           android:layout_height="fill_parent">
               android:id="@android:id/tabcontent"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent" 
                 android:layout_alignParentTop="true"


               >







       android:id="@+id/drawer"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:handle="@+id/handle"
       android:content="@android:id/tabs"
       android:orientation="vertical"
       android:topOffset="330dp"


        >
android:layout_width="88dip"
android:layout_height="44dip"
android:src="@drawable/smiley_sweaty"


>










               android:id="@android:id/tabs"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:layout_alignParentBottom="true">













Link to comment
Share on other sites

Je voudrais vous faire part de deux petite chose qui peuvent vraiment être interessante lorsqu'on veut faire un menu de type tabhost.

Comment changer l'apparance des tabwidget completement:

http://knol.google.com/k/fred-grott/advance-tabs/166jfml0mowlh/41#

Mais comme vous pourrez le lire ceci n'est pas du joli joli.

Du coup j'ai trouver un projet google qui utilise sa propre vue. Clair bien codé, à lire :). :

http://code.google.com/p/undroid/source/browse/trunk/src/com/bitsetters/undroid/common/Footer.java

J'espère que cela puisse aider.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...