From 8926113287a75c52a2817d50f76a00d6737b9bb5 Mon Sep 17 00:00:00 2001 From: Vishwajith-Shettigar Date: Mon, 14 Aug 2023 13:55:38 +0530 Subject: [PATCH 01/10] fixed accessability --- app/src/main/AndroidManifest.xml | 2 +- .../android/app/profile/AdminPinActivity.kt | 5 ++++ .../app/profile/AdminPinActivityPresenter.kt | 4 ++++ .../main/res/layout/admin_pin_activity.xml | 23 +++++++++++++++++-- app/src/main/res/values/styles.xml | 4 ++++ 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a27551a2005..13c5aeff043 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -137,7 +137,7 @@ android:windowSoftInputMode="adjustResize" /> (activity, R.layout.admin_pin_activity) + + binding.apply { lifecycleOwner = activity viewModel = adminViewModel } + binding.adminPinToolbar.title = resourceHandler + .getStringInLocale(R.string.admin_auth_activity_add_profiles_title) // [onTextChanged] is a extension function defined at [TextInputEditTextHelper] binding.adminPinInputPinEditText.onTextChanged { pin -> pin?.let { diff --git a/app/src/main/res/layout/admin_pin_activity.xml b/app/src/main/res/layout/admin_pin_activity.xml index e40ed050b9d..a1f9aeb9fe5 100644 --- a/app/src/main/res/layout/admin_pin_activity.xml +++ b/app/src/main/res/layout/admin_pin_activity.xml @@ -13,14 +13,33 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + + + android:scrollbars="none" + + android:layout_marginTop="0dp" + app:layout_constraintTop_toBottomOf="@id/admin_pin_toolbar" + app:layout_constraintBottom_toBottomOf="parent" + > @anim/slide_up @anim/slide_down + + From ef8e5f6e21c9145d9e45c9d9f5dc33aa03020517 Mon Sep 17 00:00:00 2001 From: Vishwajith Shettigar <76042077+Vishwajith-Shettigar@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:10:14 +0530 Subject: [PATCH 02/10] Update AdminPinActivityPresenter.kt --- .../org/oppia/android/app/profile/AdminPinActivityPresenter.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt index 3fd9b0a61ac..81f73c65fb7 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt @@ -45,8 +45,6 @@ class AdminPinActivityPresenter @Inject constructor( val binding = DataBindingUtil.setContentView(activity, R.layout.admin_pin_activity) - - binding.apply { lifecycleOwner = activity viewModel = adminViewModel From 1cfc0f5dccf40057ba6d411ba8b2258c66d0934b Mon Sep 17 00:00:00 2001 From: Vishwajith Shettigar <76042077+Vishwajith-Shettigar@users.noreply.github.com> Date: Wed, 16 Aug 2023 19:12:16 +0530 Subject: [PATCH 03/10] Update admin_pin_activity.xml --- app/src/main/res/layout/admin_pin_activity.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/layout/admin_pin_activity.xml b/app/src/main/res/layout/admin_pin_activity.xml index a1f9aeb9fe5..236f9ad593d 100644 --- a/app/src/main/res/layout/admin_pin_activity.xml +++ b/app/src/main/res/layout/admin_pin_activity.xml @@ -17,10 +17,10 @@ Date: Thu, 17 Aug 2023 09:47:31 +0530 Subject: [PATCH 04/10] added label --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 13c5aeff043..39232e34d5d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -137,6 +137,7 @@ android:windowSoftInputMode="adjustResize" /> Date: Thu, 17 Aug 2023 09:48:50 +0530 Subject: [PATCH 05/10] added label --- .../main/java/org/oppia/android/app/profile/AdminPinActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt index 57884a4c637..1c30f70318d 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt @@ -4,12 +4,12 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.appcompat.widget.Toolbar +import org.oppia.android.R import org.oppia.android.app.activity.ActivityComponentImpl import org.oppia.android.app.activity.InjectableAutoLocalizedAppCompatActivity import org.oppia.android.app.model.ScreenName.ADMIN_PIN_ACTIVITY import org.oppia.android.util.logging.CurrentAppScreenNameIntentDecorator.decorateWithScreenName import javax.inject.Inject -import org.oppia.android.R const val ADMIN_PIN_PROFILE_ID_EXTRA_KEY = "AdminPinActivity.admin_pin_profile_id" const val ADMIN_PIN_COLOR_RGB_EXTRA_KEY = "AdminPinActivity.admin_pin_color_rgb" From 6289efd165864e90c0e7656c404f51bbd76b48d3 Mon Sep 17 00:00:00 2001 From: Vishwajith-Shettigar Date: Fri, 18 Aug 2023 10:22:15 +0530 Subject: [PATCH 06/10] fix --- app/src/main/res/layout/admin_pin_activity.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/layout/admin_pin_activity.xml b/app/src/main/res/layout/admin_pin_activity.xml index 236f9ad593d..1cdaff022e6 100644 --- a/app/src/main/res/layout/admin_pin_activity.xml +++ b/app/src/main/res/layout/admin_pin_activity.xml @@ -29,16 +29,15 @@ Date: Fri, 18 Aug 2023 10:31:37 +0530 Subject: [PATCH 07/10] bgcoloradded --- app/src/main/res/layout/admin_pin_activity.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/admin_pin_activity.xml b/app/src/main/res/layout/admin_pin_activity.xml index 1cdaff022e6..6b22237f3d6 100644 --- a/app/src/main/res/layout/admin_pin_activity.xml +++ b/app/src/main/res/layout/admin_pin_activity.xml @@ -34,6 +34,7 @@ android:fillViewport="true" android:overScrollMode="never" android:scrollbars="none" + android:background="@color/component_color_shared_screen_secondary_background_color" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" From 0801af79bf1dba93970d6337b1f7d66d326b6aed Mon Sep 17 00:00:00 2001 From: Vishwajith-Shettigar Date: Tue, 22 Aug 2023 21:47:56 +0530 Subject: [PATCH 08/10] fix content description --- .../android/app/profile/AdminPinActivityPresenter.kt | 10 +++++++--- app/src/main/res/layout/admin_pin_activity.xml | 1 - build.gradle | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt index 81f73c65fb7..47c579e7e28 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt @@ -2,8 +2,10 @@ package org.oppia.android.app.profile import android.content.Context import android.view.KeyEvent +import android.view.View import android.view.inputmethod.EditorInfo import androidx.appcompat.app.AppCompatActivity +import androidx.appcompat.widget.Toolbar import androidx.databinding.DataBindingUtil import androidx.lifecycle.Observer import org.oppia.android.R @@ -38,13 +40,15 @@ class AdminPinActivityPresenter @Inject constructor( /** Binds ViewModel and sets up text and button listeners. */ fun handleOnCreate() { - activity.supportActionBar?.setDisplayHomeAsUpEnabled(true) - activity.supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp) - activity.supportActionBar?.setHomeActionContentDescription(R.string.admin_auth_close) val binding = DataBindingUtil.setContentView(activity, R.layout.admin_pin_activity) + activity.setSupportActionBar(binding.adminPinToolbar) + activity.supportActionBar?.setDisplayHomeAsUpEnabled(true) + activity.supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp) + activity.supportActionBar?.setHomeActionContentDescription(R.string.admin_auth_close) + binding.apply { lifecycleOwner = activity viewModel = adminViewModel diff --git a/app/src/main/res/layout/admin_pin_activity.xml b/app/src/main/res/layout/admin_pin_activity.xml index 6b22237f3d6..f22760b80dd 100644 --- a/app/src/main/res/layout/admin_pin_activity.xml +++ b/app/src/main/res/layout/admin_pin_activity.xml @@ -24,7 +24,6 @@ style="@style/AdminPinToolbarTextAppearance" app:titleTextAppearance="@style/AdminPinToolbarTextAppearance" app:titleTextColor="@color/component_color_shared_activity_toolbar_text_color" - app:navigationIcon="@drawable/ic_close_white_24dp" app:layout_constraintTop_toTopOf="parent" /> Date: Tue, 22 Aug 2023 22:23:12 +0530 Subject: [PATCH 09/10] fix content description --- .../org/oppia/android/app/profile/AdminPinActivityPresenter.kt | 2 -- build.gradle | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt index 47c579e7e28..5ab5624b99f 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt @@ -2,10 +2,8 @@ package org.oppia.android.app.profile import android.content.Context import android.view.KeyEvent -import android.view.View import android.view.inputmethod.EditorInfo import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.widget.Toolbar import androidx.databinding.DataBindingUtil import androidx.lifecycle.Observer import org.oppia.android.R diff --git a/build.gradle b/build.gradle index 7511969b37c..e0b2d5f2b98 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:3.6.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17' classpath 'com.google.gms:google-services:4.3.3' From 1d48e5aca4ba62f7423c7945e00f003b5e848573 Mon Sep 17 00:00:00 2001 From: Vishwajith Shettigar <76042077+Vishwajith-Shettigar@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:55:33 +0530 Subject: [PATCH 10/10] Update AndroidManifest.xml --- app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 39232e34d5d..897fc034879 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -138,7 +138,7 @@