Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes part of #4120, part of #1051: Fix a lot of build-time warnings #5402

Merged
merged 149 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 148 commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
9ca7e2b
Migrate to rules_jvm_external 5.1.
BenHenning Mar 27, 2023
7238b59
Fix JVm dep build warnings.
BenHenning Mar 27, 2023
f6188ac
Fix Maven license check & update the list.
BenHenning Mar 28, 2023
2c3b6ea
Fix issues with compute_affected_tests.
BenHenning Mar 29, 2023
c325bc9
Use base SHA for computing affected tests.
BenHenning Mar 29, 2023
2012647
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 29, 2023
47f9c02
Post-merge lint fix.
BenHenning Mar 29, 2023
8ae5aa8
Fix updated TODOs.
BenHenning Mar 29, 2023
de3cf14
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 29, 2023
b2ca68b
Fix Dagger structure.
BenHenning Mar 30, 2023
839be0f
Upgrade Dagger version.
BenHenning Mar 30, 2023
c2fe337
Fix test builds that depend on Dagger generation.
BenHenning Mar 30, 2023
a543500
Update Maven dependency licenses.
BenHenning Mar 30, 2023
b882832
Fix broken test & binary builds.
BenHenning Mar 30, 2023
aaa0299
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Apr 1, 2023
d520fa9
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Apr 1, 2023
037be61
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Apr 1, 2023
8a19b4e
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 11, 2023
773f7ff
Fix breakage from develop.
BenHenning May 11, 2023
311951f
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 11, 2023
9e377d5
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 12, 2023
525a601
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Jun 6, 2023
6cca78f
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Jun 6, 2023
327114d
Post-merge fixes.
BenHenning Jun 6, 2023
bb4ff28
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Jun 6, 2023
5d924f4
Post-merge fixes.
BenHenning Jun 6, 2023
667bf89
Fix a variety of dev platform-specific issues.
BenHenning Aug 22, 2023
fb59232
Tidy some things up, and revert fragment test.
BenHenning Aug 28, 2023
2551d4b
Fix test behavior inconsistency in test.
BenHenning Sep 11, 2023
714f3ea
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Sep 11, 2023
7488b9f
Fix broken ProfileAndDeviceIdFragmentTest test.
BenHenning Sep 13, 2023
e3d4091
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Oct 26, 2023
5671673
Post-merge fix.
BenHenning Oct 26, 2023
f5ed0c9
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Oct 26, 2023
bd1466d
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Jan 16, 2024
d9b38ea
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Jan 16, 2024
9f1a2ec
Some follow-up post-merge fixes.
BenHenning Jan 17, 2024
39a3add
Make TodoOpenCheck locally runnable.
BenHenning Jan 18, 2024
4f7bfd6
Simplify GitHubIssue & some static fixes/docs.
BenHenning Jan 18, 2024
000bba3
Add ScriptBackgroundCoroutineDispatcher.
BenHenning Jan 18, 2024
79878cd
Some more robustness fixes.
BenHenning Jan 19, 2024
a5f71d6
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 19, 2024
0b55bd4
Post-merge fixes.
BenHenning Jan 19, 2024
53d6727
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 19, 2024
00c7c28
Post-merge fixes & adjustments.
BenHenning Jan 20, 2024
bd97611
Fix BUILD file lint issue.
BenHenning Jan 20, 2024
d54829d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 20, 2024
fa9cae4
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 20, 2024
0618b12
Static fix checks.
BenHenning Jan 20, 2024
fb148ea
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Jan 20, 2024
ab326ff
Post-merge fixes.
BenHenning Jan 20, 2024
d5bfad5
Merge branch 'upgrade-compute-affected-tests' of github.com:oppia/opp…
BenHenning Jan 20, 2024
1067a18
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Jan 20, 2024
1e2df14
Post-merge fixes.
BenHenning Jan 20, 2024
211487c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 6, 2024
1a666a9
Post-merge fixes.
BenHenning Feb 6, 2024
a2ee5d3
Add smoke tests for instr. binaries & tests.
BenHenning Feb 7, 2024
d5b9012
Some minor refactoring for readability.
BenHenning Feb 7, 2024
e6ec869
Fixed broken instrumentation builds.
BenHenning Feb 7, 2024
9f50469
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 7, 2024
8dbf4dc
Add missing CODEOWNERS line.
BenHenning Feb 7, 2024
9c38057
Remove old files from CODEOWNERS.
BenHenning Feb 7, 2024
f2ff4e3
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 7, 2024
fad48ed
Add missing tests for TestBlazeWorkspace changes.
BenHenning Feb 8, 2024
e1802c8
Add missing Firebase auth tests.
BenHenning Feb 8, 2024
00c32f6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
2f87f4d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
aa3547c
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
d3cbd93
Post-merge fixes for previously missed tests.
BenHenning Feb 8, 2024
13e4358
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
622aced
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
50f41d2
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 8, 2024
c8df70e
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
c85d421
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 9, 2024
dcf27b6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 9, 2024
2369514
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 9, 2024
c7ec5d4
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 9, 2024
4b418bd
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
d6a9f70
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 9, 2024
8de4d51
Improve new test robustness.
BenHenning Feb 9, 2024
3f69f11
Fix updated Maven license deps.
BenHenning Feb 9, 2024
ea8e0b1
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
2916770
Update scripts/src/javatests/org/oppia/android/scripts/common/GitClie…
BenHenning Feb 14, 2024
f2d810a
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
808f412
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
2315aea
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
af51395
Add tests for GitHubClient & TodoOpenCheck.
BenHenning Feb 14, 2024
6856e3c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
5a050de
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
13b8d4b
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
280b3ec
Add missing docs.
BenHenning Feb 14, 2024
0bd7e2f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 14, 2024
5951c0f
Post-merge fixes.
BenHenning Feb 15, 2024
ee71b32
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Feb 15, 2024
3627067
Update Maven dep list checker & updater scripts.
BenHenning Feb 15, 2024
a5eb624
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Feb 20, 2024
ae239b3
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 20, 2024
34ea6aa
Fix broken TodoOpenCheck tests & check exemptions.
BenHenning Feb 20, 2024
df61985
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 20, 2024
161ae8d
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Feb 20, 2024
8c87993
Fix broken checks & failing static checks.
BenHenning Feb 22, 2024
bb6e681
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Feb 22, 2024
5c812a1
Post merge build, test, and static check fixes.
BenHenning Feb 23, 2024
e0e74d5
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 4, 2024
2dd0cd7
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 4, 2024
79a2f0f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Mar 4, 2024
60458bf
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning Mar 4, 2024
228a037
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning Mar 4, 2024
70df9b3
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 14, 2024
04fc8b8
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 14, 2024
c301eed
Address reviewer comment.
BenHenning Mar 14, 2024
51a96ce
Merge branch 'develop' into introduce-better-script-execution-support
seanlip Mar 15, 2024
b3e2fd9
Merge commit 'e2f94e41e4cba3bc5b5f3af65f7c43a6543b4c52' into introduc…
BenHenning Mar 20, 2024
73a8bce
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 20, 2024
f48f78e
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning Mar 20, 2024
02ccc87
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning May 16, 2024
28fcb9d
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning May 16, 2024
aa8988c
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 16, 2024
658c9f0
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 16, 2024
4cf06d4
Address self-review comments.
BenHenning May 16, 2024
0cc5d5d
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 17, 2024
c43c036
Address review comment.
BenHenning May 17, 2024
c30a839
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 17, 2024
fbac9a2
Post-merge fixes.
BenHenning May 17, 2024
956b358
Upgrade to rules_kotlin 1.5.0 beta 3.
BenHenning May 21, 2024
f5c07fc
Fix build-time Kotlin & Java warnings.
BenHenning May 22, 2024
0429177
Fix a few follow-up issues.
BenHenning May 22, 2024
3dc6b7b
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 22, 2024
acd1c0d
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 22, 2024
c672af0
Address reviewer comment.
BenHenning May 22, 2024
1b19f5b
Merge branch 'upgrade-compute-affected-tests' into update-rules-jvm-e…
BenHenning May 22, 2024
3e923e2
Follow-up variable rename for clarity.
BenHenning May 22, 2024
9af41bd
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 22, 2024
6100394
Merge branch 'update-dagger-structure' into upgrade-to-newer-rules-ko…
BenHenning May 22, 2024
b6c3ebe
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 22, 2024
441e293
Move forward TODO fixes from #4937.
BenHenning May 23, 2024
2f1eed7
Remove unused view model bridge classes.
BenHenning May 23, 2024
785d408
Pull in other warning fixes from #4886.
BenHenning May 26, 2024
7951d46
Merge branch 'develop' into update-rules-jvm-external
BenHenning May 26, 2024
d4d8646
Merge branch 'develop' into update-rules-jvm-external
BenHenning May 27, 2024
b6cfd74
Merge branch 'update-rules-jvm-external' into update-dagger-structure
BenHenning May 27, 2024
0468e81
Merge branch 'develop' into update-dagger-structure
BenHenning May 27, 2024
47ad078
Merge branch 'update-dagger-structure' into upgrade-to-newer-rules-ko…
BenHenning May 27, 2024
828e43e
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 27, 2024
7c186c3
Merge branch 'develop' into upgrade-to-newer-rules-kotlin
BenHenning May 28, 2024
dffff83
Merge branch 'upgrade-to-newer-rules-kotlin' into fix-build-time-kotl…
BenHenning May 28, 2024
bc79bf7
Address review comment.
BenHenning May 29, 2024
2d3f5d5
Merge branch 'develop' into fix-build-time-kotlin-java-warnings
BenHenning May 29, 2024
4b26fd5
Merge branch 'develop' into fix-build-time-kotlin-java-warnings
BenHenning Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ kt_android_library(
"//app/src/main/java/org/oppia/android/app/utility/math:math_expression_accessibility_util",
"//app/src/main/java/org/oppia/android/app/viewmodel:observable_array_list",
"//app/src/main/java/org/oppia/android/app/viewmodel:observable_view_model",
"//app/src/main/java/org/oppia/android/app/viewmodel:view_model_provider",
"//domain",
"//domain/src/main/java/org/oppia/android/domain/audio:audio_player_controller",
"//domain/src/main/java/org/oppia/android/domain/clipboard:clipboard_controller",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class AdministratorControlsActivity :
if (fragment is ProfileEditFragment) {
administratorControlsActivityPresenter.handleOnBackPressed()
} else {
@Suppress("DEPRECATION") // TODO(#5404): Migrate to a back pressed dispatcher.
super.onBackPressed()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.oppia.android.app.administratorcontrols
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.databinding.DataBindingUtil
import org.oppia.android.R
import org.oppia.android.app.activity.ActivityScope
Expand Down Expand Up @@ -62,14 +61,11 @@ class AdministratorControlsActivityPresenter @Inject constructor(
if (isMultipane) {
val adminControlsActivity = activity as AdministratorControlsActivity
when (lastLoadedFragment) {
PROFILE_LIST_FRAGMENT -> (activity as AdministratorControlsActivity).loadProfileList()
APP_VERSION_FRAGMENT -> (activity as AdministratorControlsActivity).loadAppVersion()
PROFILE_LIST_FRAGMENT -> activity.loadProfileList()
APP_VERSION_FRAGMENT -> activity.loadAppVersion()
PROFILE_EDIT_FRAGMENT -> selectedProfileId.let { profileId ->
if (extraControlsTitle != null) {
(activity as AdministratorControlsActivity).loadProfileEdit(
profileId = profileId,
profileName = extraControlsTitle
)
activity.loadProfileEdit(profileId = profileId, profileName = extraControlsTitle)
if (isProfileDeletionDialogVisible && profileId != 0) {
val fragment = activity.supportFragmentManager.findFragmentById(
R.id.administrator_controls_fragment_multipane_placeholder
Expand All @@ -88,7 +84,7 @@ class AdministratorControlsActivityPresenter @Inject constructor(

/** Sets up the navigation drawer. */
private fun setUpNavigationDrawer() {
val toolbar = binding.administratorControlsActivityToolbar as Toolbar
val toolbar = binding.administratorControlsActivityToolbar
activity.setSupportActionBar(toolbar)
activity.supportActionBar!!.setDisplayShowHomeEnabled(true)
navigationDrawerFragment = activity
Expand Down Expand Up @@ -206,9 +202,9 @@ class AdministratorControlsActivityPresenter @Inject constructor(
outState.putString(SELECTED_CONTROLS_TITLE_SAVED_KEY, titleTextView.text.toString())
}
outState.putString(LAST_LOADED_FRAGMENT_EXTRA_KEY, lastLoadedFragment)
isProfileDeletionDialogVisible?.let {
isProfileDeletionDialogVisible.let {
outState.putBoolean(IS_PROFILE_DELETION_DIALOG_VISIBLE_KEY, it)
}
selectedProfileId?.let { outState.putInt(SELECTED_PROFILE_ID_SAVED_KEY, it) }
selectedProfileId.let { outState.putInt(SELECTED_PROFILE_ID_SAVED_KEY, it) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AppVersionActivity : InjectableAutoLocalizedAppCompatActivity() {

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
@Suppress("DEPRECATION") // TODO(#5404): Migrate to a back pressed dispatcher.
onBackPressed()
}
return super.onOptionsItemSelected(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import org.oppia.android.app.fragment.FragmentScope
import org.oppia.android.app.viewmodel.ViewModelProvider
import org.oppia.android.databinding.AppVersionFragmentBinding
import javax.inject.Inject

/** The presenter for [AppVersionFragment]. */
@FragmentScope
class AppVersionFragmentPresenter @Inject constructor(
private val fragment: Fragment,
private val viewModelProvider: ViewModelProvider<AppVersionViewModel>
private val appVersionViewModel: AppVersionViewModel
) {
private lateinit var binding: AppVersionFragmentBinding

Expand All @@ -26,12 +25,8 @@ class AppVersionFragmentPresenter @Inject constructor(
)
binding.let {
it.lifecycleOwner = fragment
it.viewModel = getAppVersionViewModel()
it.viewModel = appVersionViewModel
}
return binding.root
}

private fun getAppVersionViewModel(): AppVersionViewModel {
return viewModelProvider.getForFragment(fragment, AppVersionViewModel::class.java)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ProfileAndDeviceIdActivity : InjectableAutoLocalizedAppCompatActivity() {

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
@Suppress("DEPRECATION") // TODO(#5404): Migrate to a back pressed dispatcher.
onBackPressed()
}
return super.onOptionsItemSelected(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.GridLayoutManager
import org.oppia.android.R
import org.oppia.android.app.recyclerview.BindableAdapter
import org.oppia.android.app.viewmodel.ViewModelProvider
import org.oppia.android.databinding.CompletedStoryItemBinding
import org.oppia.android.databinding.CompletedStoryListFragmentBinding
import javax.inject.Inject
Expand All @@ -17,7 +16,7 @@ import javax.inject.Inject
class CompletedStoryListFragmentPresenter @Inject constructor(
private val activity: AppCompatActivity,
private val fragment: Fragment,
private val viewModelProvider: ViewModelProvider<CompletedStoryListViewModel>,
private val viewModel: CompletedStoryListViewModel,
private val singleTypeBuilderFactory: BindableAdapter.SingleTypeBuilder.Factory
) {

Expand All @@ -29,7 +28,6 @@ class CompletedStoryListFragmentPresenter @Inject constructor(
container: ViewGroup?,
internalProfileId: Int
): View? {
val viewModel = getCompletedStoryListViewModel()
viewModel.setProfileId(internalProfileId)

binding = CompletedStoryListFragmentBinding
Expand Down Expand Up @@ -61,8 +59,4 @@ class CompletedStoryListFragmentPresenter @Inject constructor(
)
.build()
}

private fun getCompletedStoryListViewModel(): CompletedStoryListViewModel {
return viewModelProvider.getForFragment(fragment, CompletedStoryListViewModel::class.java)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
public final class AppCompatCheckBoxBindingAdapters {
/** Sets the button tint for the specified checkbox, via data-binding. */
@BindingAdapter("app:buttonTint")
@BindingAdapter("buttonTint")
public static void setButtonTint(@NonNull AppCompatCheckBox checkBox, @ColorInt int colorRgb) {
CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(colorRgb));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class CircularProgressIndicatorAdapters {
* @param progress the numerical progress to set on the indicator (which will be displayed based
* on the indicator's customized minimum and maximum progress values)
*/
@BindingAdapter("app:animatedProgress")
@BindingAdapter("animatedProgress")
public static void setAnimatedProgress(CircularProgressIndicator indicator, int progress) {
if (progress > 0) {
indicator.setProgressCompat(progress, /* animated = */ true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class ConstraintLayoutAdapters {

/** Binding adapter for setting a layout_constraintEnd_toEndOf to a view. */
@BindingAdapter("app:layout_constraintEnd_toEndOf")
@BindingAdapter("layout_constraintEnd_toEndOf")
public static void setConstraintEndToEndOf(@NonNull View view, int constraintToId) {
ConstraintLayout constraintLayout = (ConstraintLayout) view.getParent();
ConstraintSet constraintSet = new ConstraintSet();
Expand All @@ -20,7 +20,7 @@ public static void setConstraintEndToEndOf(@NonNull View view, int constraintToI
}

/** Binding adapter for setting layout_constraintHorizontal_bias to a view. */
@BindingAdapter("app:layout_constraintHorizontal_bias")
@BindingAdapter("layout_constraintHorizontal_bias")
public static void setHorizontalBias(@NonNull View view, float value) {
ConstraintLayout constraintLayout = (ConstraintLayout) view.getParent();
ConstraintSet constraintSet = new ConstraintSet();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void setBackgroundColor(@NonNull View view, @ColorInt int colorRgb
}

/** Used to set a rounded-rect background drawable with a data-bound color. */
@BindingAdapter("app:roundedRectDrawableWithColor")
@BindingAdapter("roundedRectDrawableWithColor")
public static void setBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.rounded_rect_background);
// The input color needs to have alpha channel prepended to it.
Expand All @@ -29,7 +29,7 @@ public static void setBackgroundDrawable(@NonNull View view, @ColorInt int color
}

/** Used to set a top rounded-rect background drawable with a data-bound color. */
@BindingAdapter("app:topRoundedRectDrawableWithColor")
@BindingAdapter("topRoundedRectDrawableWithColor")
public static void setTopBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.top_rounded_rect_background);
// The input color needs to have alpha channel prepended to it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public final class EditTextBindingAdapters {

/** Binding adapter for setting a [TextWatcher] as a change listener for an [EditText]. */
@BindingAdapter("app:textChangedListener")
@BindingAdapter("textChangedListener")
public static void bindTextWatcher(@NonNull EditText editText, TextWatcher textWatcher) {
editText.addTextChangedListener(textWatcher);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public final class GuidelineBindingAdapters {

/** Binding adapter for setting the `guidePercent` for a [Guideline]. */
@BindingAdapter("app:layout_constraintGuide_percent")
@BindingAdapter("layout_constraintGuide_percent")
public static void setGuidelinePercentage(@NonNull Guideline guideline, float percentage) {
ConstraintLayout.LayoutParams params =
(ConstraintLayout.LayoutParams) guideline.getLayoutParams();
Expand All @@ -18,7 +18,7 @@ public static void setGuidelinePercentage(@NonNull Guideline guideline, float pe
}

/** Binding adapter for setting the `guideEnd` for a [Guideline]. */
@BindingAdapter("app:layout_constraintGuide_end")
@BindingAdapter("layout_constraintGuide_end")
public static void setConstraintGuidelineEnd(@NonNull Guideline guideline, float guideEndPx) {
ConstraintLayout.LayoutParams params =
(ConstraintLayout.LayoutParams) guideline.getLayoutParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

/** Holds all custom binding adapters that bind to [ImageView]. */
public final class ImageViewBindingAdapters {
@BindingAdapter("app:srcCompat")
@BindingAdapter("srcCompat")
public static void setImageDrawableCompat(
@NonNull ImageView imageView,
@DrawableRes int drawableResourceId
) {
imageView.setImageResource(drawableResourceId);
}

@BindingAdapter("app:srcCompat")
@BindingAdapter("srcCompat")
public static void setImageDrawableCompat(
@NonNull ImageView imageView,
Drawable drawable
Expand All @@ -40,7 +40,7 @@ public static void setImageDrawableCompat(
* @param imageView view where the profile avatar will be loaded into
* @param profileAvatar represents either a colorId or local image uri
*/
@BindingAdapter("profile:src")
@BindingAdapter("profileImageSource")
public static void setProfileImage(ImageView imageView, ProfileAvatar profileAvatar) {
if (profileAvatar != null) {
if (profileAvatar.getAvatarTypeCase() == ProfileAvatar.AvatarTypeCase.AVATAR_COLOR_RGB) {
Expand Down Expand Up @@ -86,7 +86,7 @@ public boolean onResourceReady(
* <p/>
* Reference: https://stackoverflow.com/a/35809319/3689782.
*/
@BindingAdapter("playState:image")
@BindingAdapter("playStateImage")
public static void setPlayStateDrawable(
@NonNull ImageView imageView,
ChapterPlayState chapterPlayState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class MarginBindingAdapters {

/** Sets the start margin for a view, accounting for RTL scenarios. */
@BindingAdapter("app:layoutMarginStart")
@BindingAdapter("layoutMarginStart")
public static void setLayoutMarginStart(@NonNull View view, float marginStart) {
if (view.getLayoutParams() instanceof MarginLayoutParams) {
MarginLayoutParams params = (MarginLayoutParams) view.getLayoutParams();
Expand All @@ -20,7 +20,7 @@ public static void setLayoutMarginStart(@NonNull View view, float marginStart) {
}

/** Sets the end margin for a view, accounting for RTL scenarios. */
@BindingAdapter("app:layoutMarginEnd")
@BindingAdapter("layoutMarginEnd")
public static void setLayoutMarginEnd(@NonNull View view, float marginEnd) {
if (view.getLayoutParams() instanceof MarginLayoutParams) {
MarginLayoutParams params = (MarginLayoutParams) view.getLayoutParams();
Expand All @@ -30,7 +30,7 @@ public static void setLayoutMarginEnd(@NonNull View view, float marginEnd) {
}

/** Used to set a margin-top for views. */
@BindingAdapter("app:layoutMarginTop")
@BindingAdapter("layoutMarginTop")
public static void setLayoutMarginTop(@NonNull View view, float marginTop) {
if (view.getLayoutParams() instanceof MarginLayoutParams) {
MarginLayoutParams params = (MarginLayoutParams) view.getLayoutParams();
Expand All @@ -41,7 +41,7 @@ public static void setLayoutMarginTop(@NonNull View view, float marginTop) {
}

/** Used to set a margin-bottom for views. */
@BindingAdapter("app:layoutMarginBottom")
@BindingAdapter("layoutMarginBottom")
public static void setLayoutMarginBottom(@NonNull View view, float marginBottom) {
if (view.getLayoutParams() instanceof MarginLayoutParams) {
MarginLayoutParams params = (MarginLayoutParams) view.getLayoutParams();
Expand All @@ -52,7 +52,7 @@ public static void setLayoutMarginBottom(@NonNull View view, float marginBottom)
}

/** Used to set a margin for views. */
@BindingAdapter("app:layoutMargin")
@BindingAdapter("layoutMargin")
public static void setLayoutMargin(@NonNull View view, float margin) {
if (view.getLayoutParams() instanceof MarginLayoutParams) {
MarginLayoutParams params = (MarginLayoutParams) view.getLayoutParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public final class StateAssemblerMarginBindingAdapters {
/** Used to set a margin for exploration split-view. */
@BindingAdapter(
value = {
"app:explorationSplitViewMarginApplicable",
"app:explorationSplitViewMarginStart",
"app:explorationSplitViewMarginTop",
"app:explorationSplitViewMarginEnd",
"app:explorationSplitViewMarginBottom",
"explorationSplitViewMarginApplicable",
"explorationSplitViewMarginStart",
"explorationSplitViewMarginTop",
"explorationSplitViewMarginEnd",
"explorationSplitViewMarginBottom",
},
requireAll = false
)
Expand All @@ -36,11 +36,11 @@ public static void setExplorationSplitViewMargin(
/** Used to set a margin for exploration view. */
@BindingAdapter(
value = {
"app:explorationViewMarginApplicable",
"app:explorationViewMarginStart",
"app:explorationViewMarginTop",
"app:explorationViewMarginEnd",
"app:explorationViewMarginBottom",
"explorationViewMarginApplicable",
"explorationViewMarginStart",
"explorationViewMarginTop",
"explorationViewMarginEnd",
"explorationViewMarginBottom",
},
requireAll = false
)
Expand All @@ -58,11 +58,11 @@ public static void setExplorationViewMargin(
/** Used to set a margin for question view. */
@BindingAdapter(
value = {
"app:questionViewMarginApplicable",
"app:questionViewMarginStart",
"app:questionViewMarginTop",
"app:questionViewMarginEnd",
"app:questionViewMarginBottom",
"questionViewMarginApplicable",
"questionViewMarginStart",
"questionViewMarginTop",
"questionViewMarginEnd",
"questionViewMarginBottom",
},
requireAll = false
)
Expand All @@ -80,11 +80,11 @@ public static void setQuestionViewMargin(
/** Used to set a margin for question split-view. */
@BindingAdapter(
value = {
"app:questionSplitViewMarginApplicable",
"app:questionSplitViewMarginStart",
"app:questionSplitViewMarginTop",
"app:questionSplitViewMarginEnd",
"app:questionSplitViewMarginBottom",
"questionSplitViewMarginApplicable",
"questionSplitViewMarginStart",
"questionSplitViewMarginTop",
"questionSplitViewMarginEnd",
"questionSplitViewMarginBottom",
},
requireAll = false
)
Expand Down
Loading
Loading