dělám custom drawer., který obsahuje tlačítko a ExpandaleListView, drawer se normálně vysune, když je potřeba, ale tlačítko ani ListView nereagují na podměty. ListView nescroluje.
drawer.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- The toolbar -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/a_drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- drawer view -->
<LinearLayout
android:id="@+id/a_drawer_content"
android:background="#FFF"
android:orientation="vertical"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="left" >
<!-- drawer content -->
<ImageButton
android:id="@+id/a_main_drawer_btn_add"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginBottom="5dp"
android:background="@drawable/a_pay_all_button_category"
android:shadowColor="#A8A8A8"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5"
android:src="@drawable/ic_group_black_48dp"
android:textColor="#FFFFFF"
android:textSize="30sp" />
<ExpandableListView
android:id="@+id/a_main_lv_offer"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ExpandableListView>
</LinearLayout>
<!-- normal content view -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#FFFFFF"
android:orientation="vertical" >
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="AddGuest"
android:text="@string/add_guest" />
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
<FrameLayout
android:id="@+id/content_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" >
</FrameLayout>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
ActivityMain
drawerLayout = (DrawerLayout) findViewById(R.id.a_drawer_layout);
OfferListView = (ExpandableListView) findViewById(R.id.a_main_lv_offer);
offerAdapter = new LeftPanelOfferAdapter(this, database);
OfferListView.setAdapter(offerAdapter);
ImageButton addItem = (ImageButton) findViewById(R.id.a_main_drawer_btn_add);
addItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(ActivityMain.this, "Nefunguje", Toast.LENGTH_LONG).show();
}
});
drawerLayout.openDrawer(GravityCompat.START);