Added font adaptive
This commit is contained in:
parent
10503c183a
commit
e59e7fbfe0
9 changed files with 19 additions and 14 deletions
|
@ -59,12 +59,11 @@ import com.google.android.play.core.appupdate.AppUpdateManagerFactory
|
|||
import com.google.android.play.core.install.InstallState
|
||||
import com.google.android.play.core.install.InstallStateUpdatedListener
|
||||
import com.google.android.play.core.install.model.AppUpdateType
|
||||
import com.google.android.play.core.install.model.InstallStatus
|
||||
import com.google.android.play.core.install.model.InstallStatus.*
|
||||
import com.google.android.play.core.install.model.InstallStatus.DOWNLOADED
|
||||
import com.google.android.play.core.install.model.InstallStatus.INSTALLED
|
||||
import com.google.android.play.core.install.model.UpdateAvailability
|
||||
import com.google.android.play.core.tasks.Task
|
||||
import kotlinx.android.synthetic.main.activity_main_content.*
|
||||
import java.math.BigInteger
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : AbsSlidingMusicPanelActivity(),
|
||||
|
@ -621,6 +620,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
supportFragmentManager.commit {
|
||||
replace(R.id.fragment_container, fragment, tag)
|
||||
}
|
||||
currentFragment = fragment as MainActivityFragmentCallbacks
|
||||
}
|
||||
|
||||
private fun selectedFragment(itemId: Int) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package code.name.monkey.retromusic.glide;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
@ -13,6 +14,8 @@ import com.bumptech.glide.signature.MediaStoreSignature;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||
import code.name.monkey.retromusic.App;
|
||||
import code.name.monkey.retromusic.R;
|
||||
|
||||
|
@ -39,10 +42,12 @@ public class UserProfileGlideRequest {
|
|||
public static class Builder {
|
||||
private RequestManager requestManager;
|
||||
private File profile;
|
||||
private Drawable error;
|
||||
|
||||
private Builder(RequestManager requestManager, File profile) {
|
||||
this.requestManager = requestManager;
|
||||
this.profile = profile;
|
||||
error = TintHelper.createTintedDrawable(App.Companion.getContext(), R.drawable.ic_account_white_24dp, ThemeStore.Companion.accentColor(App.Companion.getContext()));
|
||||
}
|
||||
|
||||
public static Builder from(@NonNull RequestManager requestManager, File profile) {
|
||||
|
@ -51,10 +56,9 @@ public class UserProfileGlideRequest {
|
|||
|
||||
@NonNull
|
||||
public BitmapRequestBuilder<File, Bitmap> build() {
|
||||
//noinspection unchecked
|
||||
return createBaseRequest(requestManager, profile)
|
||||
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
|
||||
.placeholder(DEFAULT_ERROR_IMAGE)
|
||||
.error(error)
|
||||
.animate(DEFAULT_ANIMATION)
|
||||
.signature(createSignature(profile));
|
||||
}
|
||||
|
@ -68,10 +72,9 @@ public class UserProfileGlideRequest {
|
|||
}
|
||||
|
||||
public BitmapRequestBuilder<?, Bitmap> build() {
|
||||
//noinspection unchecked
|
||||
return createBaseRequest(builder.requestManager, builder.profile)
|
||||
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
|
||||
.error(DEFAULT_ERROR_IMAGE)
|
||||
.error(builder.error)
|
||||
.animate(DEFAULT_ANIMATION)
|
||||
.signature(createSignature(builder.profile));
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:overScrollMode="never"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
app:layout_constraintEnd_toStartOf="@android:id/widget_frame"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
app:lineHeightHint="20sp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
app:lineHeightHint="20sp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
app:lineHeightHint="20sp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
@ -71,6 +71,8 @@
|
|||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
app:lineHeightHint="20sp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -109,9 +109,7 @@
|
|||
|
||||
<style name="ErrorHandlingTheme" parent="Theme.MaterialComponents.Light.NoActionBar" />
|
||||
|
||||
<style name="TextViewNormal">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
<style name="TextViewNormal" parent="TextAppearance.AppCompat.Body2" />
|
||||
|
||||
<style name="TextViewHeadline4" parent="TextAppearance.MaterialComponents.Headline4" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue