Kotlin code refactor

This commit is contained in:
Hemanth S 2020-05-25 00:02:32 +05:30
parent b9a4c01a91
commit 530b42608b
14 changed files with 41 additions and 56 deletions

View file

@ -22,11 +22,13 @@
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:background="?attr/colorSurface"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="@string/action_about"
@ -36,9 +38,9 @@
<androidx.core.widget.NestedScrollView
android:id="@+id/container"
android:overScrollMode="never"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/activity_about_content" />

View file

@ -74,7 +74,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
tools:srcCompat="@tools:sample/backgrounds/scenic" />
</com.google.android.material.card.MaterialCardView>
@ -94,7 +94,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/artistCoverContainer"
tools:ignore="MissingPrefix"
tools:text="Title" />
tools:text="@tools:sample/full_names" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text"
@ -109,7 +109,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/artistTitle"
tools:ignore="MissingPrefix"
tools:text="Title" />
tools:text="@tools:sample/full_names" />
<include
layout="@layout/activity_artist_content"

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true">
android:layout_margin="4dp"
app:cardCornerRadius="@dimen/about_card_radius">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
android:id="@+id/sb1"
android:layout_width="wrap_content"
@ -36,7 +36,9 @@
android:overScrollMode="never"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sb1" />
app:layout_constraintTop_toBottomOf="@+id/sb1"
tools:itemCount="3"
tools:listitem="@layout/item_contributor" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View file

@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true">
android:layout_margin="4dp"
app:cardCornerRadius="@dimen/about_card_radius">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View file

@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true">
android:layout_margin="4dp"
app:cardCornerRadius="@dimen/about_card_radius">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View file

@ -32,16 +32,15 @@
android:scaleType="centerCrop"
app:civ_border="false"
app:civ_shadow="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:retroCornerSize="21dp"
app:srcCompat="@drawable/ic_account_white_24dp"
tools:srcCompat="@tools:sample/backgrounds/scenic[20]" />
tools:srcCompat="@tools:sample/backgrounds/scenic" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:textAppearance="@style/TextViewSubtitle1"
@ -54,9 +53,11 @@
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@+id/icon"
@ -64,6 +65,6 @@
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/icon"
app:lineHeightHint="24sp"
tools:text="@tools:sample/full_names" />
tools:text="@tools:sample/lorem/random" />
</androidx.constraintlayout.widget.ConstraintLayout>