all: reformat code
Periodic reformatting.
This commit is contained in:
parent
966789238e
commit
78523021fd
17 changed files with 44 additions and 43 deletions
|
@ -28,9 +28,7 @@ import androidx.appcompat.widget.Toolbar
|
|||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.transition.TransitionManager
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.transition.MaterialFade
|
||||
import java.lang.reflect.Field
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.ui.AuxioAppBarLayout
|
||||
|
@ -113,11 +111,12 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
this.titleAnimator =
|
||||
ValueAnimator.ofFloat(from, to).apply {
|
||||
addUpdateListener { titleView.alpha = it.animatedValue as Float }
|
||||
duration = if (titleShown == true) {
|
||||
context.resources.getInteger(R.integer.anim_fade_enter_duration).toLong()
|
||||
} else {
|
||||
context.resources.getInteger(R.integer.anim_fade_exit_duration).toLong()
|
||||
}
|
||||
duration =
|
||||
if (titleShown == true) {
|
||||
context.resources.getInteger(R.integer.anim_fade_enter_duration).toLong()
|
||||
} else {
|
||||
context.resources.getInteger(R.integer.anim_fade_exit_duration).toLong()
|
||||
}
|
||||
start()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,19 +161,20 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
|
||||
if (isActivated) {
|
||||
targetVis = VISIBLE
|
||||
targetDuration = context.resources.getInteger(R.integer.anim_fade_enter_duration).toLong()
|
||||
targetDuration =
|
||||
context.resources.getInteger(R.integer.anim_fade_enter_duration).toLong()
|
||||
} else {
|
||||
targetVis = INVISIBLE
|
||||
targetDuration = context.resources.getInteger(R.integer.anim_fade_exit_duration).toLong()
|
||||
targetDuration =
|
||||
context.resources.getInteger(R.integer.anim_fade_exit_duration).toLong()
|
||||
}
|
||||
|
||||
if (selectionIndicator.visibility == targetVis) {
|
||||
return
|
||||
}
|
||||
|
||||
TransitionManager.beginDelayedTransition(this, MaterialFade().apply {
|
||||
duration = targetDuration
|
||||
})
|
||||
TransitionManager.beginDelayedTransition(
|
||||
this, MaterialFade().apply { duration = targetDuration })
|
||||
|
||||
selectionIndicator.visibility = targetVis
|
||||
}
|
||||
|
|
|
@ -33,12 +33,9 @@ import androidx.core.view.isInvisible
|
|||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.transition.TransitionManager
|
||||
import com.google.android.material.transition.MaterialFade
|
||||
import kotlin.math.abs
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.ui.recycler.AuxioRecyclerView
|
||||
import org.oxycblt.auxio.util.getDimen
|
||||
import org.oxycblt.auxio.util.getDimenSize
|
||||
import org.oxycblt.auxio.util.getDrawableCompat
|
||||
import org.oxycblt.auxio.util.isRtl
|
||||
|
@ -467,14 +464,16 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
|
||||
private fun animateViewIn(view: View) {
|
||||
logD(view.translationX)
|
||||
view.animate()
|
||||
view
|
||||
.animate()
|
||||
.alpha(1f)
|
||||
.setDuration(context.resources.getInteger(R.integer.anim_fade_enter_duration).toLong())
|
||||
.start()
|
||||
}
|
||||
|
||||
private fun animateViewOut(view: View) {
|
||||
view.animate()
|
||||
view
|
||||
.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(context.resources.getInteger(R.integer.anim_fade_exit_duration).toLong())
|
||||
.start()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.12" android:color="?attr/colorPrimary" android:state_activated="true"/>
|
||||
<item android:alpha="0.12" android:color="?attr/colorPrimary" android:state_activated="true" />
|
||||
</selector>
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?android:attr/textColorSecondary" android:state_selected="true" />
|
||||
<item android:alpha="0.5" android:color="?android:attr/textColorSecondary" android:state_enabled="false" />
|
||||
<item android:color="?android:attr/textColorSecondary" />
|
||||
</selector>
|
|
@ -1,10 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M8.229,14.062 L4.708,10.521 5.75,9.479 8.229,11.938 14.25,5.938 15.292,7Z"/>
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M8.229,14.062 L4.708,10.521 5.75,9.479 8.229,11.938 14.25,5.938 15.292,7Z" />
|
||||
</vector>
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:name="bg">
|
||||
<group android:name="bg">
|
||||
<path
|
||||
android:fillColor="@color/fill_icon_bg"
|
||||
android:pathData="M0 0h108v108H0z"
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector android:width="24dp"
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M6,14Q5.175,14 4.588,13.412Q4,12.825 4,12Q4,11.175 4.588,10.587Q5.175,10 6,10Q6.825,10 7.412,10.587Q8,11.175 8,12Q8,12.825 7.412,13.412Q6.825,14 6,14ZM12,14Q11.175,14 10.588,13.412Q10,12.825 10,12Q10,11.175 10.588,10.587Q11.175,10 12,10Q12.825,10 13.413,10.587Q14,11.175 14,12Q14,12.825 13.413,13.412Q12.825,14 12,14ZM18,14Q17.175,14 16.587,13.412Q16,12.825 16,12Q16,11.175 16.587,10.587Q17.175,10 18,10Q18.825,10 19.413,10.587Q20,11.175 20,12Q20,12.825 19.413,13.412Q18.825,14 18,14Z"/>
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,14Q5.175,14 4.588,13.412Q4,12.825 4,12Q4,11.175 4.588,10.587Q5.175,10 6,10Q6.825,10 7.412,10.587Q8,11.175 8,12Q8,12.825 7.412,13.412Q6.825,14 6,14ZM12,14Q11.175,14 10.588,13.412Q10,12.825 10,12Q10,11.175 10.588,10.587Q11.175,10 12,10Q12.825,10 13.413,10.587Q14,11.175 14,12Q14,12.825 13.413,13.412Q12.825,14 12,14ZM18,14Q17.175,14 16.587,13.412Q16,12.825 16,12Q16,11.175 16.587,10.587Q17.175,10 18,10Q18.825,10 19.413,10.587Q20,11.175 20,12Q20,12.825 19.413,13.412Q18.825,14 18,14Z" />
|
||||
</vector>
|
|
@ -10,8 +10,7 @@
|
|||
<solid android:color="@color/sel_item_activated_bg" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/def">
|
||||
<item android:id="@+id/def">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
</shape>
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
android:id="@+id/detail_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
app:indeterminateAnimationType="disjoint" />
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_mid_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_mid_medium">
|
||||
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_clear_queue_item"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:src="@drawable/ic_delete_24"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
app:tint="?attr/colorOnError" />
|
||||
|
||||
<FrameLayout
|
||||
|
@ -39,8 +39,8 @@
|
|||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_mid_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_mid_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_mid_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Auxio.V31" parent="Theme.Auxio.V29">
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_anim</item>
|
||||
</style>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<item name="home_artist_list" type="id" />
|
||||
<item name="home_genre_list" type="id" />
|
||||
|
||||
<integer name="anim_fade_enter_duration">150</integer>
|
||||
<integer name="anim_fade_exit_duration">84</integer>
|
||||
<integer name="anim_fade_enter_duration">200</integer>
|
||||
<integer name="anim_fade_exit_duration">100</integer>
|
||||
|
||||
<declare-styleable name="StyledImageView">
|
||||
<attr name="cornerRadius" format="dimension" />
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
android:initialLayout="@layout/widget_default"
|
||||
android:minWidth="@dimen/widget_width_def"
|
||||
android:minHeight="@dimen/widget_height_def"
|
||||
android:minResizeHeight="@dimen/widget_height_def"
|
||||
android:minResizeWidth="@dimen/widget_width_def"
|
||||
android:minResizeHeight="@dimen/widget_height_def"
|
||||
android:previewImage="@drawable/ui_widget_preview"
|
||||
android:previewLayout="@layout/widget_small"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
app:title="@string/set_lib_tabs" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:key="@string/set_key_hide_collaborators"
|
||||
app:summary="@string/set_hide_collaborators_desc"
|
||||
app:title="@string/set_hide_collaborators"
|
||||
app:defaultValue="false" />
|
||||
app:title="@string/set_hide_collaborators" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
android:initialLayout="@layout/widget_default"
|
||||
android:minWidth="@dimen/widget_width_def"
|
||||
android:minHeight="@dimen/widget_height_def"
|
||||
android:minResizeHeight="@dimen/widget_height_def"
|
||||
android:minResizeWidth="@dimen/widget_width_def"
|
||||
android:minResizeHeight="@dimen/widget_height_def"
|
||||
android:previewImage="@drawable/ui_widget_preview"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:updatePeriodMillis="0"
|
||||
|
|
Loading…
Reference in a new issue