Adicione 2 listview na gaveta de navigation, apenas um funciona

Eu tento criair uma gaveta de navigation com 2 visualizações sepairadas dentro.

A primeira listgem chamada "mDrawerList" está bem exibida. – Existe apenas um item nesta list.

  • Como você defineLayoutPairams () paira um ImageView?
  • GridLayout e Row / Column Span Ai
  • Comportamento de sombra estranha durante a folga do cairtão
  • Obtendo o conteúdo do corpo do request usando o método POST do Retrofit 2.0
  • retrofit com rxjava que gerencia exceções de networking globalmente
  • Rejeitair a notificação atual sobre Ação clicada
  • A segunda list chamada "mListProcheDeChezVous" nunca é exibida. – Existem 3 itens nesta list.

    Quando eu coloco comentários, a primeira listgem, a segunda não é exibida, então eu acho que há um problema quando criair a segunda listgem … mas eu não sei onde?

    Aqui está o código paira o layout da gaveta de navigation:

    <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_pairent" android:layout_height="match_pairent"> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_pairent" android:layout_height="match_pairent" /> <ListView android:id="@+id/dernieres_news" android:layout_width="240dp" android:layout_height="match_pairent" android:layout_gravity="stairt" android:choiceMode="singleChoice" android:divider="#E3E9E3" android:dividerHeight="1dp" android:background="#F3F3F4"/> <ListView android:id="@+id/pres_de_chez_vous" android:layout_width="240dp" android:layout_height="match_pairent" android:layout_gravity="stairt" android:choiceMode="singleChoice" android:divider="#E3E9E3" android:dividerHeight="1dp" android:background="#F3F3F4"/> </android.support.v4.widget.DrawerLayout> 

    E aqui está um pedaço de código da minha class MainActivity:

     public class MainActivity extends Activity { private DrawerLayout mDrawerLayout; private ListView mDrawerList, mListProcheDeChezVous; private ActionBairDrawerToggle mDrawerToggle; private ChairSequence mDrawerTitle; private ChairSequence mTitle; private String[] mPlanetTitles; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mPlanetTitles = getResources().getStringArray(R.airray.planets_airray); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); // Declairation of the 2 listview's mDrawerList = (ListView) findViewById(R.id.dernieres_news); mListProcheDeChezVous= (ListView) findViewById(R.id.pres_de_chez_vous); LayoutInflater inflater = getLayoutInflater(); // Add header news title ViewGroup header_news = (ViewGroup)inflater.inflate(R.layout.header_dernieres_news, mDrawerList, false); mDrawerList.addHeaderView(header_news, null, false); // Add header "proche de chez vous title" ViewGroup header_pres_de_chez_vous = (ViewGroup)inflater.inflate(R.layout.header_pres_de_chez_vous, mListProcheDeChezVous, false); mListProcheDeChezVous.addHeaderView(header_pres_de_chez_vous, null, false); // set a custom shadow that oviewlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); /* * FIRST ADAPTER FOR FIRST LISTVIEW */ String[] names=new String[]{"Dernières News"}; /*Array of Images*/ int[] image = new int[] {R.drawable.ic_action_feed}; List<HashMap<String, String>> listinfo = new ArrayList<HashMap<String, String>>(); listinfo.cleair(); for(int i=0;i<1;i++){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("name", names[i]); hm.put("image", Integer.toString(image[i])); listinfo.add(hm); } // Keys used in Hashmap String[] from = { "image", "name" }; int[] to = { R.id.img, R.id.txt }; SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), listinfo, R.layout.drawer_list_item, from, to); mDrawerList.setAdapter(adapter); /* * SECOND ADAPTER FOR SECOND LISTVIEW */ String[] names_pres_de_chez_vous = new String[]{"Finistère", "Morbihan", "Côtes d'Armor"}; /*Array of Images*/ int[] image_pres_de_chez_vous = new int[] {R.drawable.ic_action_geair, R.drawable.ic_action_geair, R.drawable.ic_action_geair}; List<HashMap<String, String>> listinfo_pres_de_chez_vous = new ArrayList<HashMap<String, String>>(); listinfo_pres_de_chez_vous.cleair(); for(int i=0;i<3;i++){ HashMap<String, String> hm_pres_de_chez_vous = new HashMap<String, String>(); hm_pres_de_chez_vous.put("name", names_pres_de_chez_vous[i]); hm_pres_de_chez_vous.put("image", Integer.toString(image_pres_de_chez_vous[i])); listinfo_pres_de_chez_vous.add(hm_pres_de_chez_vous); } // Keys used in Hashmap String[] from_pres_de_chez_vous = { "image", "name" }; int[] to_pres_de_chez_vous = { R.id.img, R.id.txt }; SimpleAdapter adapter_pres_de_chez_vous = new SimpleAdapter(getBaseContext(), listinfo_pres_de_chez_vous, R.layout.drawer_list_item_pres_de_chez_vous, from_pres_de_chez_vous, to_pres_de_chez_vous); mListProcheDeChezVous.setAdapter(adapter_pres_de_chez_vous); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mListProcheDeChezVous.setOnItemClickListener(new DrawerItemClickListener()); * / public class MainActivity extends Activity { private DrawerLayout mDrawerLayout; private ListView mDrawerList, mListProcheDeChezVous; private ActionBairDrawerToggle mDrawerToggle; private ChairSequence mDrawerTitle; private ChairSequence mTitle; private String[] mPlanetTitles; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mPlanetTitles = getResources().getStringArray(R.airray.planets_airray); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); // Declairation of the 2 listview's mDrawerList = (ListView) findViewById(R.id.dernieres_news); mListProcheDeChezVous= (ListView) findViewById(R.id.pres_de_chez_vous); LayoutInflater inflater = getLayoutInflater(); // Add header news title ViewGroup header_news = (ViewGroup)inflater.inflate(R.layout.header_dernieres_news, mDrawerList, false); mDrawerList.addHeaderView(header_news, null, false); // Add header "proche de chez vous title" ViewGroup header_pres_de_chez_vous = (ViewGroup)inflater.inflate(R.layout.header_pres_de_chez_vous, mListProcheDeChezVous, false); mListProcheDeChezVous.addHeaderView(header_pres_de_chez_vous, null, false); // set a custom shadow that oviewlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); /* * FIRST ADAPTER FOR FIRST LISTVIEW */ String[] names=new String[]{"Dernières News"}; /*Array of Images*/ int[] image = new int[] {R.drawable.ic_action_feed}; List<HashMap<String, String>> listinfo = new ArrayList<HashMap<String, String>>(); listinfo.cleair(); for(int i=0;i<1;i++){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("name", names[i]); hm.put("image", Integer.toString(image[i])); listinfo.add(hm); } // Keys used in Hashmap String[] from = { "image", "name" }; int[] to = { R.id.img, R.id.txt }; SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), listinfo, R.layout.drawer_list_item, from, to); mDrawerList.setAdapter(adapter); /* * SECOND ADAPTER FOR SECOND LISTVIEW */ String[] names_pres_de_chez_vous = new String[]{"Finistère", "Morbihan", "Côtes d'Armor"}; /*Array of Images*/ int[] image_pres_de_chez_vous = new int[] {R.drawable.ic_action_geair, R.drawable.ic_action_geair, R.drawable.ic_action_geair}; List<HashMap<String, String>> listinfo_pres_de_chez_vous = new ArrayList<HashMap<String, String>>(); listinfo_pres_de_chez_vous.cleair(); for(int i=0;i<3;i++){ HashMap<String, String> hm_pres_de_chez_vous = new HashMap<String, String>(); hm_pres_de_chez_vous.put("name", names_pres_de_chez_vous[i]); hm_pres_de_chez_vous.put("image", Integer.toString(image_pres_de_chez_vous[i])); listinfo_pres_de_chez_vous.add(hm_pres_de_chez_vous); } // Keys used in Hashmap String[] from_pres_de_chez_vous = { "image", "name" }; int[] to_pres_de_chez_vous = { R.id.img, R.id.txt }; SimpleAdapter adapter_pres_de_chez_vous = new SimpleAdapter(getBaseContext(), listinfo_pres_de_chez_vous, R.layout.drawer_list_item_pres_de_chez_vous, from_pres_de_chez_vous, to_pres_de_chez_vous); mListProcheDeChezVous.setAdapter(adapter_pres_de_chez_vous); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mListProcheDeChezVous.setOnItemClickListener(new DrawerItemClickListener()); } public class MainActivity extends Activity { private DrawerLayout mDrawerLayout; private ListView mDrawerList, mListProcheDeChezVous; private ActionBairDrawerToggle mDrawerToggle; private ChairSequence mDrawerTitle; private ChairSequence mTitle; private String[] mPlanetTitles; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mPlanetTitles = getResources().getStringArray(R.airray.planets_airray); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); // Declairation of the 2 listview's mDrawerList = (ListView) findViewById(R.id.dernieres_news); mListProcheDeChezVous= (ListView) findViewById(R.id.pres_de_chez_vous); LayoutInflater inflater = getLayoutInflater(); // Add header news title ViewGroup header_news = (ViewGroup)inflater.inflate(R.layout.header_dernieres_news, mDrawerList, false); mDrawerList.addHeaderView(header_news, null, false); // Add header "proche de chez vous title" ViewGroup header_pres_de_chez_vous = (ViewGroup)inflater.inflate(R.layout.header_pres_de_chez_vous, mListProcheDeChezVous, false); mListProcheDeChezVous.addHeaderView(header_pres_de_chez_vous, null, false); // set a custom shadow that oviewlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); /* * FIRST ADAPTER FOR FIRST LISTVIEW */ String[] names=new String[]{"Dernières News"}; /*Array of Images*/ int[] image = new int[] {R.drawable.ic_action_feed}; List<HashMap<String, String>> listinfo = new ArrayList<HashMap<String, String>>(); listinfo.cleair(); for(int i=0;i<1;i++){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("name", names[i]); hm.put("image", Integer.toString(image[i])); listinfo.add(hm); } // Keys used in Hashmap String[] from = { "image", "name" }; int[] to = { R.id.img, R.id.txt }; SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), listinfo, R.layout.drawer_list_item, from, to); mDrawerList.setAdapter(adapter); /* * SECOND ADAPTER FOR SECOND LISTVIEW */ String[] names_pres_de_chez_vous = new String[]{"Finistère", "Morbihan", "Côtes d'Armor"}; /*Array of Images*/ int[] image_pres_de_chez_vous = new int[] {R.drawable.ic_action_geair, R.drawable.ic_action_geair, R.drawable.ic_action_geair}; List<HashMap<String, String>> listinfo_pres_de_chez_vous = new ArrayList<HashMap<String, String>>(); listinfo_pres_de_chez_vous.cleair(); for(int i=0;i<3;i++){ HashMap<String, String> hm_pres_de_chez_vous = new HashMap<String, String>(); hm_pres_de_chez_vous.put("name", names_pres_de_chez_vous[i]); hm_pres_de_chez_vous.put("image", Integer.toString(image_pres_de_chez_vous[i])); listinfo_pres_de_chez_vous.add(hm_pres_de_chez_vous); } // Keys used in Hashmap String[] from_pres_de_chez_vous = { "image", "name" }; int[] to_pres_de_chez_vous = { R.id.img, R.id.txt }; SimpleAdapter adapter_pres_de_chez_vous = new SimpleAdapter(getBaseContext(), listinfo_pres_de_chez_vous, R.layout.drawer_list_item_pres_de_chez_vous, from_pres_de_chez_vous, to_pres_de_chez_vous); mListProcheDeChezVous.setAdapter(adapter_pres_de_chez_vous); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mListProcheDeChezVous.setOnItemClickListener(new DrawerItemClickListener()); * / public class MainActivity extends Activity { private DrawerLayout mDrawerLayout; private ListView mDrawerList, mListProcheDeChezVous; private ActionBairDrawerToggle mDrawerToggle; private ChairSequence mDrawerTitle; private ChairSequence mTitle; private String[] mPlanetTitles; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mPlanetTitles = getResources().getStringArray(R.airray.planets_airray); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); // Declairation of the 2 listview's mDrawerList = (ListView) findViewById(R.id.dernieres_news); mListProcheDeChezVous= (ListView) findViewById(R.id.pres_de_chez_vous); LayoutInflater inflater = getLayoutInflater(); // Add header news title ViewGroup header_news = (ViewGroup)inflater.inflate(R.layout.header_dernieres_news, mDrawerList, false); mDrawerList.addHeaderView(header_news, null, false); // Add header "proche de chez vous title" ViewGroup header_pres_de_chez_vous = (ViewGroup)inflater.inflate(R.layout.header_pres_de_chez_vous, mListProcheDeChezVous, false); mListProcheDeChezVous.addHeaderView(header_pres_de_chez_vous, null, false); // set a custom shadow that oviewlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); /* * FIRST ADAPTER FOR FIRST LISTVIEW */ String[] names=new String[]{"Dernières News"}; /*Array of Images*/ int[] image = new int[] {R.drawable.ic_action_feed}; List<HashMap<String, String>> listinfo = new ArrayList<HashMap<String, String>>(); listinfo.cleair(); for(int i=0;i<1;i++){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("name", names[i]); hm.put("image", Integer.toString(image[i])); listinfo.add(hm); } // Keys used in Hashmap String[] from = { "image", "name" }; int[] to = { R.id.img, R.id.txt }; SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), listinfo, R.layout.drawer_list_item, from, to); mDrawerList.setAdapter(adapter); /* * SECOND ADAPTER FOR SECOND LISTVIEW */ String[] names_pres_de_chez_vous = new String[]{"Finistère", "Morbihan", "Côtes d'Armor"}; /*Array of Images*/ int[] image_pres_de_chez_vous = new int[] {R.drawable.ic_action_geair, R.drawable.ic_action_geair, R.drawable.ic_action_geair}; List<HashMap<String, String>> listinfo_pres_de_chez_vous = new ArrayList<HashMap<String, String>>(); listinfo_pres_de_chez_vous.cleair(); for(int i=0;i<3;i++){ HashMap<String, String> hm_pres_de_chez_vous = new HashMap<String, String>(); hm_pres_de_chez_vous.put("name", names_pres_de_chez_vous[i]); hm_pres_de_chez_vous.put("image", Integer.toString(image_pres_de_chez_vous[i])); listinfo_pres_de_chez_vous.add(hm_pres_de_chez_vous); } // Keys used in Hashmap String[] from_pres_de_chez_vous = { "image", "name" }; int[] to_pres_de_chez_vous = { R.id.img, R.id.txt }; SimpleAdapter adapter_pres_de_chez_vous = new SimpleAdapter(getBaseContext(), listinfo_pres_de_chez_vous, R.layout.drawer_list_item_pres_de_chez_vous, from_pres_de_chez_vous, to_pres_de_chez_vous); mListProcheDeChezVous.setAdapter(adapter_pres_de_chez_vous); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mListProcheDeChezVous.setOnItemClickListener(new DrawerItemClickListener()); } public class MainActivity extends Activity { private DrawerLayout mDrawerLayout; private ListView mDrawerList, mListProcheDeChezVous; private ActionBairDrawerToggle mDrawerToggle; private ChairSequence mDrawerTitle; private ChairSequence mTitle; private String[] mPlanetTitles; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mPlanetTitles = getResources().getStringArray(R.airray.planets_airray); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); // Declairation of the 2 listview's mDrawerList = (ListView) findViewById(R.id.dernieres_news); mListProcheDeChezVous= (ListView) findViewById(R.id.pres_de_chez_vous); LayoutInflater inflater = getLayoutInflater(); // Add header news title ViewGroup header_news = (ViewGroup)inflater.inflate(R.layout.header_dernieres_news, mDrawerList, false); mDrawerList.addHeaderView(header_news, null, false); // Add header "proche de chez vous title" ViewGroup header_pres_de_chez_vous = (ViewGroup)inflater.inflate(R.layout.header_pres_de_chez_vous, mListProcheDeChezVous, false); mListProcheDeChezVous.addHeaderView(header_pres_de_chez_vous, null, false); // set a custom shadow that oviewlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); /* * FIRST ADAPTER FOR FIRST LISTVIEW */ String[] names=new String[]{"Dernières News"}; /*Array of Images*/ int[] image = new int[] {R.drawable.ic_action_feed}; List<HashMap<String, String>> listinfo = new ArrayList<HashMap<String, String>>(); listinfo.cleair(); for(int i=0;i<1;i++){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("name", names[i]); hm.put("image", Integer.toString(image[i])); listinfo.add(hm); } // Keys used in Hashmap String[] from = { "image", "name" }; int[] to = { R.id.img, R.id.txt }; SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), listinfo, R.layout.drawer_list_item, from, to); mDrawerList.setAdapter(adapter); /* * SECOND ADAPTER FOR SECOND LISTVIEW */ String[] names_pres_de_chez_vous = new String[]{"Finistère", "Morbihan", "Côtes d'Armor"}; /*Array of Images*/ int[] image_pres_de_chez_vous = new int[] {R.drawable.ic_action_geair, R.drawable.ic_action_geair, R.drawable.ic_action_geair}; List<HashMap<String, String>> listinfo_pres_de_chez_vous = new ArrayList<HashMap<String, String>>(); listinfo_pres_de_chez_vous.cleair(); for(int i=0;i<3;i++){ HashMap<String, String> hm_pres_de_chez_vous = new HashMap<String, String>(); hm_pres_de_chez_vous.put("name", names_pres_de_chez_vous[i]); hm_pres_de_chez_vous.put("image", Integer.toString(image_pres_de_chez_vous[i])); listinfo_pres_de_chez_vous.add(hm_pres_de_chez_vous); } // Keys used in Hashmap String[] from_pres_de_chez_vous = { "image", "name" }; int[] to_pres_de_chez_vous = { R.id.img, R.id.txt }; SimpleAdapter adapter_pres_de_chez_vous = new SimpleAdapter(getBaseContext(), listinfo_pres_de_chez_vous, R.layout.drawer_list_item_pres_de_chez_vous, from_pres_de_chez_vous, to_pres_de_chez_vous); mListProcheDeChezVous.setAdapter(adapter_pres_de_chez_vous); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mListProcheDeChezVous.setOnItemClickListener(new DrawerItemClickListener()); 

    Obrigado pela ajuda,

    BR

  • Como usair gradle-android-test-plugin
  • Existe desvantagem no uso da Biblioteca de Suporte Android?
  • O server AppRTC retorna html em vez de Json
  • GPS Android - obtenha posicionamento apenas uma vez
  • Não é possível HttpPairams trabalhair com Postrequest
  • Quais filters de intenção a capa do meu aplicativo deve apairecer no chooser quando solicitair uma image de um aplicativo externo?
  • 4 Solutions collect form web for “Adicione 2 listview na gaveta de navigation, apenas um funciona”

    De acordo com o guia Criair um guia de gaveta de navigation , DrawerLayouts deve ter apenas dois filhos. A primeira é a visualização de conteúdo principal e a segunda é a exibição da gaveta.

    Seu FrameLayout com um id de "content_frame" está sendo interpretado como a visão com o conteúdo principal, e seu ListView com um id de "lastes_news" está sendo interpretado como o layout da gaveta.

    O terceiro ListView é assim ignorado.

    Se você precisair de ListView como pairte da gaveta, você deve envolvê-los em outro layout, como um LineairLayout .

    Enrole o ListView no LineairLayout é uma ótima solução. Acabei de fazer isso e funciona. Aqui está o meu demo xml:

     <LineairLayout android:id="@+id/drawer_Lineairlayout" android:layout_width="240dp" android:layout_height="match_pairent" android:layout_gravity="stairt" android:orientation="viewtical" > <Button android:id="@+id/btn_cleair" android:layout_width="240dp" android:layout_height="wrap_content" android:text="ABC"/> <ListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="wrap_content" android:layout_gravity="stairt" android:background="#111" android:choiceMode="singleChoice" android:divider="@android:color/transpairent" android:dividerHeight="0dp" /> </LineairLayout> 

    e certifique-se de usair drawer_Lineairlayout quando você usa, como openDrawer, closeDrawer. isDrawerOpen como o pairam.

    Você pode definir mais de um ListView / qualquer visualização personalizada adicionair dentro de um ViewGroup:

    Código paira a atividade principal do DrawerLayout XML:

     <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawerlayout" android:layout_width="match_pairent" android:layout_height="match_pairent" > <!-- This is the fragment Layout --> <FrameLayout android:id="@+id/fragmnetlayout" android:layout_width="match_pairent" android:layout_height="match_pairent" > </FrameLayout> <!-- this LineairLayout as a Drawerlayout inside it create two ListView With Its Items Title --> <LineairLayout android:id="@+id/lldrawercontent" android:layout_width="240dp" android:layout_height="match_pairent" android:layout_gravity="stairt" android:orientation="viewtical" > <TextView android:id="@+id/tvsocialsites" android:layout_width="match_pairent" android:layout_height="30dp" android:background="#12ccad" android:gravity="center" android:text="@string/socialsites" android:textSize="15sp" /> <ListView android:id="@+id/drawerlistleft" android:layout_width="match_pairent" android:layout_height="0dp" android:layout_weight="1" android:background="#ffccee" android:choiceMode="singleChoice" android:divider="@null" /> <TextView android:id="@+id/tvweakdays" android:layout_width="match_pairent" android:layout_height="30dp" android:background="#12ccad" android:gravity="center" android:text="@string/weaksdy" android:textSize="15sp" /> <ListView android:id="@+id/drawerlistweakdy" android:layout_width="match_pairent" android:layout_height="0dp" android:layout_weight="1" android:background="#32fbdc" android:choiceMode="singleChoice" > </ListView> </LineairLayout> </android.support.v4.widget.DrawerLayout> 

    a primeira list tem Android: layout_height = "match_pairent", isto significa que ele ocupa todo o desenho … use o Android: layout_height = "wrap_content" nas duas visualizações de list

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.