diff --git a/app/src/main/java/com/example/cosmosclient/views/RequestListActivity.java b/app/src/main/java/com/example/cosmosclient/views/RequestListActivity.java index f7418af..30537ef 100644 --- a/app/src/main/java/com/example/cosmosclient/views/RequestListActivity.java +++ b/app/src/main/java/com/example/cosmosclient/views/RequestListActivity.java @@ -1,5 +1,6 @@ package com.example.cosmosclient.views; +import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; @@ -30,11 +31,12 @@ fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + Snackbar.make(view, "Next Add Request Activity", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); + //LEFTMARK DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); @@ -48,8 +50,8 @@ @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); - if (drawer.isDrawerOpen(GravityCompat.START)) { - drawer.closeDrawer(GravityCompat.START); + if (drawer.isDrawerOpen(GravityCompat.END)) { + drawer.closeDrawer(GravityCompat.END); } else { super.onBackPressed(); } @@ -58,7 +60,7 @@ @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.request_list, menu); + getMenuInflater().inflate(R.menu.activity_request_list_drawer, menu); return true; } @@ -70,7 +72,7 @@ int id = item.getItemId(); //noinspection SimplifiableIfStatement - if (id == R.id.action_settings) { + if (id == R.id.nav_close) { return true; } @@ -86,18 +88,18 @@ if (id == R.id.nav_camera) { // Handle the camera action } else if (id == R.id.nav_gallery) { - +// Intent intent = new Intent(RequestListActivity.this, AddMemberActivity.class); +// startActivity(intent); } else if (id == R.id.nav_slideshow) { } else if (id == R.id.nav_share) { - } else if (id == R.id.nav_send) { + } else if (id == R.id.nav_close) { } -// int gravity = Gravity.RIGHT; DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); - drawer.closeDrawer(GravityCompat.START); + drawer.closeDrawer(GravityCompat.END); return true; } } diff --git a/app/src/main/res/layout/activity_request_list.xml b/app/src/main/res/layout/activity_request_list.xml index 7a60ce0..9d6c0be 100644 --- a/app/src/main/res/layout/activity_request_list.xml +++ b/app/src/main/res/layout/activity_request_list.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" - tools:openDrawer="start"> + tools:openDrawer="end"> diff --git a/app/src/main/res/layout/app_bar_request_list.xml b/app/src/main/res/layout/app_bar_request_list.xml index 384f57a..ffe1966 100644 --- a/app/src/main/res/layout/app_bar_request_list.xml +++ b/app/src/main/res/layout/app_bar_request_list.xml @@ -32,4 +32,39 @@ app:maxImageSize="70dp" app:srcCompat="@android:drawable/ic_input_add" /> + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_request_list.xml b/app/src/main/res/layout/nav_header_request_list.xml deleted file mode 100644 index 4c3439a..0000000 --- a/app/src/main/res/layout/nav_header_request_list.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/menu/activity_request_list_drawer.xml b/app/src/main/res/menu/activity_request_list_drawer.xml index 040c871..f379009 100644 --- a/app/src/main/res/menu/activity_request_list_drawer.xml +++ b/app/src/main/res/menu/activity_request_list_drawer.xml @@ -1,10 +1,15 @@ + @@ -18,16 +23,12 @@ android:title="通知" /> - + - + android:icon="@drawable/ic_menu_manage" + android:title="設定" /> diff --git a/app/src/main/res/menu/request_list.xml b/app/src/main/res/menu/request_list.xml index a2411e3..f379009 100644 --- a/app/src/main/res/menu/request_list.xml +++ b/app/src/main/res/menu/request_list.xml @@ -1,9 +1,35 @@ - + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + tools:showIn="navigation_view"> + + + + + + + + + + + + + +