From ecdfafb6eb7aca16c0d02c9a09e9b7809042bf57 Mon Sep 17 00:00:00 2001 From: yaamanetaisei Date: Wed, 29 Jan 2020 18:45:45 +0900 Subject: [PATCH 1/8] =?UTF-8?q?drawer=5Fmenu.xml=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../res/layout/activity_preserved_foods_list.xml | 4 ++-- app/src/main/res/layout/drawer_menu.xml | 12 ++++++++++++ build.gradle | 1 - gradle/wrapper/gradle-wrapper.properties | 3 ++- 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/layout/drawer_menu.xml diff --git a/app/src/main/res/layout/activity_preserved_foods_list.xml b/app/src/main/res/layout/activity_preserved_foods_list.xml index f495882..6648eb5 100644 --- a/app/src/main/res/layout/activity_preserved_foods_list.xml +++ b/app/src/main/res/layout/activity_preserved_foods_list.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/main/res/layout/drawer_menu.xml b/app/src/main/res/layout/drawer_menu.xml new file mode 100644 index 0000000..b2ba592 --- /dev/null +++ b/app/src/main/res/layout/drawer_menu.xml @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index c3a5eda..71374b4 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" implementation 'com.google.android.material:material:' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e5a4169..7337f6d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=\ + https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip From a5c72a293ce55ae0d627b209200976ae62c1ca33 Mon Sep 17 00:00:00 2001 From: yaamanetaisei Date: Sun, 2 Feb 2020 18:24:54 +0900 Subject: [PATCH 2/8] =?UTF-8?q?build.gradle=E3=81=AE=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=81=A8=E4=BF=9D=E5=AD=98=E9=A3=9F=E4=B8=80=E8=A6=A7=E3=81=AE?= =?UTF-8?q?xml=E3=82=92=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 -- .../res/layout/activity_preserved_foods_list.xml | 8 +++----- app/src/main/res/layout/drawer_menu.xml | 12 ------------ app/src/main/res/values/styles.xml | 2 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 app/src/main/res/layout/drawer_menu.xml diff --git a/app/build.gradle b/app/build.gradle index 1ec3df8..56e679a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,6 +34,4 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation 'com.google.android.material:material:1.0.0' } diff --git a/app/src/main/res/layout/activity_preserved_foods_list.xml b/app/src/main/res/layout/activity_preserved_foods_list.xml index 6648eb5..1520055 100644 --- a/app/src/main/res/layout/activity_preserved_foods_list.xml +++ b/app/src/main/res/layout/activity_preserved_foods_list.xml @@ -1,5 +1,5 @@ - - - - - + + \ No newline at end of file diff --git a/app/src/main/res/layout/drawer_menu.xml b/app/src/main/res/layout/drawer_menu.xml deleted file mode 100644 index b2ba592..0000000 --- a/app/src/main/res/layout/drawer_menu.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 42bdff6..95b5a5c 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..4ab4520 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ + + + 16dp + 16dp + 8dp + 176dp + 16dp + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1481b7a..9a4ee83 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -53,4 +53,18 @@ 登録した保存食を\n追加購入まで\n管理できます。 わからないことは\n"簡単入門"で確認できます。\nまずは初期設定をしましょう。 設定へ + MenuActivity + Open navigation drawer + Close navigation drawer + Android Studio + android.studio@android.com + Navigation header + Settings + + Home + Gallery + Slideshow + Tools + Share + Send diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a1e5786..ba14dbf 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -14,4 +14,13 @@ 20sp @android:color/black + + + + - From 89da05cbc1d2ef809966cd5f1346ccf18588ed41 Mon Sep 17 00:00:00 2001 From: yaamanetaisei Date: Wed, 5 Feb 2020 20:42:33 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E9=96=8B=E3=81=8F=E7=94=A8=E3=81=AE=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 2 +- .../kanazawaapp_2019/PreservedFoodListActivity.kt | 7 +++++++ app/src/main/res/layout/activity_menu.xml | 2 +- .../main/res/layout/activity_preserved_foods_list.xml | 1 + app/src/main/res/values/styles.xml | 11 +++++++++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index be14d4f..14a99c8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,7 +26,7 @@ android:theme="@style/NoActionBar"> + android:theme="@style/DrawerTheme"> diff --git a/app/src/main/java/com/example/kanazawaapp_2019/PreservedFoodListActivity.kt b/app/src/main/java/com/example/kanazawaapp_2019/PreservedFoodListActivity.kt index ebc39ca..2eba98a 100644 --- a/app/src/main/java/com/example/kanazawaapp_2019/PreservedFoodListActivity.kt +++ b/app/src/main/java/com/example/kanazawaapp_2019/PreservedFoodListActivity.kt @@ -2,8 +2,10 @@ package com.example.kanazawaapp_2019 import android.os.Bundle import android.util.Log +import androidx.appcompat.app.ActionBarDrawerToggle import androidx.appcompat.app.AppCompatActivity import com.google.android.material.tabs.TabLayout +import kotlinx.android.synthetic.main.activity_menu.* import kotlinx.android.synthetic.main.activity_preserved_foods_list.* class PreservedFoodListActivity : AppCompatActivity() { @@ -17,6 +19,11 @@ class PreservedFoodListActivity : AppCompatActivity() { it.setDisplayHomeAsUpEnabled(true) it.setHomeButtonEnabled(true) }?:IllegalAccessError("toolbar cannot be,null") + + val actionBarDrawerToggle = ActionBarDrawerToggle(this, drawer_layout,toolBar,R.string.app_name, R.string.app_name) + drawer_layout.addDrawerListener(actionBarDrawerToggle) + actionBarDrawerToggle.syncState() + // set adapter val fragmentAdapter = PagerAdapterFoodList(supportFragmentManager) viewPager.adapter = fragmentAdapter diff --git a/app/src/main/res/layout/activity_menu.xml b/app/src/main/res/layout/activity_menu.xml index b8c7952..34284dc 100644 --- a/app/src/main/res/layout/activity_menu.xml +++ b/app/src/main/res/layout/activity_menu.xml @@ -2,9 +2,9 @@ diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ba14dbf..35c176c 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -23,4 +23,15 @@ +