Skip to content

Commit

Permalink
Update androidTest dependencies; Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
w2sv committed Jan 9, 2023
1 parent 4620435 commit cbbcbbe
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ class FlowFieldFragment :
}

private fun ViewModel.setLiveDataObservers() {
hideForegroundLive.observe(viewLifecycleOwner) {
if (it) {
requireActivity().hideSystemBars()
with(binding.foregroundLayout) {
hideForegroundLive.observe(viewLifecycleOwner) { hideForeground ->
binding.highAlphaForegroundLayout.let {
if (hideForeground) {
requireActivity().hideSystemBars()
if (lifecycle.currentState == Lifecycle.State.STARTED)
hide()
it.hide()
else
foregroundToggleAnimation = fadeOut()
foregroundToggleAnimation = it.fadeOut()
}
else {
requireActivity().showSystemBars()
foregroundToggleAnimation = it.fadeIn()
}
}
else {
requireActivity().showSystemBars()
foregroundToggleAnimation = binding.foregroundLayout.fadeIn()
}
}
}
Expand All @@ -194,12 +194,7 @@ class FlowFieldFragment :
?: false

if (!viewModel.fadedInButtons) {
fadeIn(
binding.navigationViewToggleButton,
binding.imageSelectionButton,
binding.foregroundToggleButton,
duration = resources.getLong(R.integer.duration_flowfield_buttons_fade_in)
)
binding.foregroundLayout.fadeIn(resources.getLong(R.integer.duration_flowfield_buttons_fade_in))

if (savedAnyCrops)
lifecycleScope.launchDelayed(resources.getLong(R.integer.duration_flowfield_buttons_half_faded_in)) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout-land/fragment_flowfield.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_height="match_parent">

<RelativeLayout
android:id="@+id/foreground_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand All @@ -32,7 +33,7 @@
android:backgroundTint="@color/low_alpha_gray" />

<RelativeLayout
android:id="@+id/foreground_layout"
android:id="@+id/high_alpha_foreground_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_flowfield.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_height="match_parent">

<RelativeLayout
android:id="@+id/foreground_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand All @@ -32,7 +33,7 @@
android:backgroundTint="@color/low_alpha_gray" />

<RelativeLayout
android:id="@+id/foreground_layout"
android:id="@+id/high_alpha_foreground_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lottie = 'com.airbnb.android:lottie:5.2.0'

## unitTest
junit5 = 'org.junit.jupiter:junit-jupiter:5.9.1'
androidx-junit = 'androidx.test.ext:junit:1.1.4'
androidx-junit = 'androidx.test.ext:junit:1.1.5'

## androidTest
androidx-testrunner = 'androidx.test:runner:1.5.1'
Expand All @@ -45,8 +45,8 @@ junit5-mannodermaus-runner = 'de.mannodermaus.junit5:android-test-runner:1.3.0'
junit5-params = 'org.junit.jupiter:junit-jupiter-params:5.9.1'

# espresso
androidx-espresso-core = 'androidx.test.espresso:espresso-core:3.5.0'
androidx-espresso-intents = 'androidx.test.espresso:espresso-intents:3.5.0'
androidx-espresso-core = 'androidx.test.espresso:espresso-core:3.5.1'
androidx-espresso-intents = 'androidx.test.espresso:espresso-intents:3.5.1'

[bundles]
unitTest = ["junit5", "androidx-junit"]
Expand Down

0 comments on commit cbbcbbe

Please sign in to comment.