Fix banner text and search function
This commit is contained in:
parent
192ceb4438
commit
c229af5b36
26 changed files with 345 additions and 110 deletions
|
@ -31,7 +31,7 @@ android {
|
|||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
applicationId "code.name.monkey.retromusic"
|
||||
versionCode 326
|
||||
versionCode 328
|
||||
versionName '3.1.800'
|
||||
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -52,9 +52,10 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, SearchCon
|
|||
setUpToolBar()
|
||||
setupSearchView()
|
||||
|
||||
if (intent.getBooleanExtra("mic_search", false)) {
|
||||
if (intent.getBooleanExtra(EXTRA_SHOW_MIC, false)) {
|
||||
startMicSearch()
|
||||
}
|
||||
|
||||
back.setOnClickListener { onBackPressed() }
|
||||
voiceSearch.setOnClickListener { startMicSearch() }
|
||||
|
||||
|
@ -215,9 +216,11 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, SearchCon
|
|||
}
|
||||
|
||||
companion object {
|
||||
|
||||
val TAG: String = SearchActivity::class.java.simpleName
|
||||
|
||||
const val EXTRA_SHOW_MIC = "extra_show_mic"
|
||||
const val QUERY: String = "query"
|
||||
|
||||
private const val REQ_CODE_SPEECH_INPUT = 9002
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.os.Bundle
|
|||
import android.provider.DocumentsContract
|
||||
import android.provider.MediaStore
|
||||
import android.provider.MediaStore.Images.Media.getBitmap
|
||||
import android.text.TextUtils
|
||||
import android.view.MenuItem
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.FileProvider
|
||||
|
@ -76,19 +77,19 @@ class UserInfoActivity : AbsBaseActivity() {
|
|||
showBannerOptions()
|
||||
}
|
||||
next.setOnClickListener {
|
||||
/*val nameString = name.text.toString().trim { it <= ' ' }
|
||||
val nameString = name.text.toString().trim { it <= ' ' }
|
||||
if (TextUtils.isEmpty(nameString)) {
|
||||
Toast.makeText(this, "Umm name is empty", Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
val bioString = bio.text.toString().trim() { it <= ' ' }
|
||||
/*val bioString = bio.text.toString().trim() { it <= ' ' }
|
||||
if (TextUtils.isEmpty(bioString)) {
|
||||
Toast.makeText(this, "Umm bio is empty", Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
|
||||
}
|
||||
}*/
|
||||
PreferenceUtil.getInstance().userName = nameString
|
||||
PreferenceUtil.getInstance().userBio = bioString*/
|
||||
//PreferenceUtil.getInstance().userBio = bioString
|
||||
setResult(Activity.RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ import androidx.core.util.Pair
|
|||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
|
||||
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
||||
import code.name.monkey.retromusic.glide.GlideApp
|
||||
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||
|
@ -21,13 +23,10 @@ import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
|
|||
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
|
||||
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.NavigationUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||
import java.util.*
|
||||
|
||||
|
||||
open class AlbumAdapter(protected val activity: AppCompatActivity,
|
||||
|
@ -200,7 +199,10 @@ open class AlbumAdapter(protected val activity: AppCompatActivity,
|
|||
if (isInQuickSelectMode) {
|
||||
toggleChecked(adapterPosition)
|
||||
} else {
|
||||
val albumPairs = arrayOf<Pair<*, *>>(Pair.create(image, activity.resources.getString(R.string.transition_album_art)))
|
||||
val pairImageView = Pair.create<View, String>(image, activity.resources.getString(R.string.transition_album_art))
|
||||
val pairs = ArrayList<Pair<View, String>>()
|
||||
pairs.add(pairImageView)
|
||||
val albumPairs: Array<Pair<View, String>> = pairs.toTypedArray()
|
||||
NavigationUtil.goToAlbum(activity, dataSet[adapterPosition].id, *albumPairs)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
|||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import kotlinx.android.synthetic.main.fragment_main_settings.*
|
||||
|
||||
class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||
|
||||
|
@ -73,7 +74,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
|||
private lateinit var actionRate: View
|
||||
private lateinit var actionShare: View
|
||||
private lateinit var actionBugReport: View
|
||||
private lateinit var buyProContainer: CardView
|
||||
private lateinit var materialDialog: MaterialDialog
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
|
@ -86,7 +86,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
|||
actionRate = layout.findViewById(R.id.actionRate)
|
||||
actionShare = layout.findViewById(R.id.actionShare)
|
||||
actionBugReport = layout.findViewById(R.id.actionBugReport)
|
||||
buyProContainer = layout.findViewById(R.id.buyProContainer)
|
||||
|
||||
actionSettings.setOnClickListener(this)
|
||||
actionSleepTimer.setOnClickListener(this)
|
||||
|
@ -97,13 +96,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
|||
actionShare.setOnClickListener(this)
|
||||
actionBugReport.setOnClickListener(this)
|
||||
|
||||
buyProContainer.apply {
|
||||
setCardBackgroundColor(ThemeStore.accentColor(context!!))
|
||||
visibility = if (!App.isProVersion) View.VISIBLE else View.GONE
|
||||
setOnClickListener {
|
||||
NavigationUtil.goToProVersion(context)
|
||||
}
|
||||
}
|
||||
materialDialog = MaterialDialog(activity!!, BottomSheet())
|
||||
.show {
|
||||
customView(view = layout, scrollable = true)
|
||||
|
|
|
@ -14,12 +14,14 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.afollestad.materialcab.MaterialCab;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -48,6 +50,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
private Toolbar toolbar;
|
||||
private AppBarLayout appBarLayout;
|
||||
private View contentContainer;
|
||||
private MaterialCardView toolbarContainer;
|
||||
|
||||
private MaterialCab cab;
|
||||
private FragmentManager fragmentManager;
|
||||
|
@ -81,7 +84,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
View view = inflater.inflate(R.layout.fragment_library, container, false);
|
||||
disposable = new CompositeDisposable();
|
||||
contentContainer = view.findViewById(R.id.fragmentContainer);
|
||||
|
||||
toolbarContainer = view.findViewById(R.id.toolbarContainer);
|
||||
appBarLayout = view.findViewById(R.id.appBarLayout);
|
||||
toolbar = view.findViewById(R.id.toolbar);
|
||||
|
||||
|
@ -142,7 +145,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
toolbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||
toolbar.setOnClickListener(v -> {
|
||||
showMainMenu();
|
||||
Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));
|
||||
NavigationUtil.goToSearch(getMainActivity(), pair);
|
||||
});
|
||||
appBarLayout.setBackgroundColor(primaryColor);
|
||||
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||
|
@ -353,7 +357,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_search:
|
||||
NavigationUtil.goToSearch(getMainActivity());
|
||||
Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));
|
||||
NavigationUtil.goToSearch(getMainActivity(), pair);
|
||||
break;
|
||||
case R.id.action_new_playlist:
|
||||
CreatePlaylistDialog.Companion.create().show(getChildFragmentManager(), "CREATE_PLAYLIST");
|
||||
|
|
|
@ -5,10 +5,13 @@ import android.os.Bundle
|
|||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.util.Pair
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
import code.name.monkey.retromusic.Constants
|
||||
import code.name.monkey.retromusic.Constants.USER_BANNER
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.HomeAdapter
|
||||
|
@ -31,6 +34,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import kotlinx.android.synthetic.main.abs_playlists.*
|
||||
import kotlinx.android.synthetic.main.fragment_banner_home.*
|
||||
import kotlinx.android.synthetic.main.fragment_home.recyclerView
|
||||
import java.io.File
|
||||
|
@ -55,6 +59,26 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
return inflater.inflate(if (PreferenceUtil.getInstance().isHomeBanner) R.layout.fragment_banner_home else R.layout.fragment_home, viewGroup, false)
|
||||
}
|
||||
|
||||
private fun loadImageFromStorage() {
|
||||
disposable.add(Compressor(context!!)
|
||||
.setMaxHeight(300)
|
||||
.setMaxWidth(300)
|
||||
.setQuality(75)
|
||||
.setCompressFormat(Bitmap.CompressFormat.WEBP)
|
||||
.compressToBitmapAsFlowable(File(PreferenceUtil.getInstance().profileImage, Constants.USER_PROFILE))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it != null) {
|
||||
userImage.setImageBitmap(it)
|
||||
} else {
|
||||
userImage.setImageDrawable(ContextCompat.getDrawable(context!!, R.drawable.ic_person_flat))
|
||||
}
|
||||
}) {
|
||||
userImage.setImageDrawable(ContextCompat.getDrawable(context!!, R.drawable.ic_person_flat))
|
||||
})
|
||||
}
|
||||
|
||||
private val displayMetrics: DisplayMetrics
|
||||
get() {
|
||||
val display = mainActivity.windowManager.defaultDisplay
|
||||
|
@ -109,6 +133,12 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
homePresenter.subscribe()
|
||||
|
||||
checkPadding()
|
||||
|
||||
userInfoContainer.setOnClickListener {
|
||||
NavigationUtil.goToUserInfo(activity!!)
|
||||
}
|
||||
titleWelcome.setTextColor(ThemeStore.textColorPrimary(context!!))
|
||||
titleWelcome.text = String.format("%s", PreferenceUtil.getInstance().userName)
|
||||
}
|
||||
|
||||
private fun checkPadding() {
|
||||
|
@ -124,7 +154,11 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
toolbar.apply {
|
||||
setBackgroundColor(ThemeStore.primaryColor(context))
|
||||
setNavigationIcon(R.drawable.ic_menu_white_24dp)
|
||||
setOnClickListener { showMainMenu() }
|
||||
setOnClickListener {
|
||||
|
||||
val pairImageView = Pair.create<View, String>(toolbarContainer, resources.getString(R.string.transition_toolbar))
|
||||
NavigationUtil.goToSearch(activity!!, pairImageView)
|
||||
}
|
||||
}
|
||||
mainActivity.setSupportActionBar(toolbar)
|
||||
}
|
||||
|
@ -194,7 +228,8 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.action_search) {
|
||||
NavigationUtil.goToSearch(mainActivity)
|
||||
val pairImageView = Pair.create<View, String>(toolbarContainer, resources.getString(R.string.transition_toolbar))
|
||||
NavigationUtil.goToSearch(mainActivity, true, pairImageView)
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
@ -235,6 +270,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
.subscribe { bannerImage!!.setImageBitmap(it) })
|
||||
}
|
||||
}
|
||||
loadImageFromStorage()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -20,6 +20,10 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.fragment.app.Fragment
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.SettingsActivity
|
||||
import code.name.monkey.retromusic.util.NavigationUtil
|
||||
|
@ -59,6 +63,22 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
otherSettings.setOnClickListener(this)
|
||||
aboutSettings.setOnClickListener(this)
|
||||
|
||||
buyProContainer.apply {
|
||||
setCardBackgroundColor(ThemeStore.accentColor(context!!))
|
||||
visibility = if (!App.isProVersion) View.VISIBLE else View.GONE
|
||||
setOnClickListener {
|
||||
NavigationUtil.goToProVersion(context)
|
||||
}
|
||||
}
|
||||
buyPremium.setOnClickListener {
|
||||
NavigationUtil.goToProVersion(context!!)
|
||||
}
|
||||
val primaryColor = MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(ThemeStore.accentColor(context!!)))
|
||||
text.setTextColor(ColorUtil.withAlpha(primaryColor, 0.75f))
|
||||
title.setTextColor(primaryColor)
|
||||
text2.setTextColor(primaryColor)
|
||||
text3.setTextColor(primaryColor)
|
||||
|
||||
}
|
||||
|
||||
private fun inflateFragment(fragment: Fragment, @StringRes title: Int) {
|
||||
|
|
|
@ -26,10 +26,8 @@ import androidx.annotation.Nullable;
|
|||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.app.ActivityOptionsCompat;
|
||||
import androidx.core.util.Pair;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||
import code.name.monkey.retromusic.model.Genre;
|
||||
import code.name.monkey.retromusic.model.Playlist;
|
||||
import code.name.monkey.retromusic.activities.AboutActivity;
|
||||
import code.name.monkey.retromusic.activities.AlbumDetailsActivity;
|
||||
import code.name.monkey.retromusic.activities.ArtistDetailActivity;
|
||||
|
@ -45,6 +43,9 @@ import code.name.monkey.retromusic.activities.SettingsActivity;
|
|||
import code.name.monkey.retromusic.activities.SupportDevelopmentActivity;
|
||||
import code.name.monkey.retromusic.activities.UserInfoActivity;
|
||||
import code.name.monkey.retromusic.activities.WhatsNewActivity;
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||
import code.name.monkey.retromusic.model.Genre;
|
||||
import code.name.monkey.retromusic.model.Playlist;
|
||||
|
||||
import static code.name.monkey.retromusic.Constants.RATE_ON_GOOGLE_PLAY;
|
||||
import static code.name.monkey.retromusic.util.RetroUtil.openUrl;
|
||||
|
@ -146,19 +147,28 @@ public class NavigationUtil {
|
|||
ActivityCompat.startActivity(activity, new Intent(activity, LicenseActivity.class), null);
|
||||
}
|
||||
|
||||
public static void goToSearch(Activity activity) {
|
||||
ActivityCompat.startActivity(activity, new Intent(activity, SearchActivity.class), null);
|
||||
public static void goToSearch(@NonNull Activity activity,
|
||||
@Nullable Pair... sharedElements) {
|
||||
ActivityCompat.startActivity(activity, new Intent(activity, SearchActivity.class),
|
||||
ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElements).toBundle());
|
||||
}
|
||||
|
||||
public static void goToSupportDevelopment(Activity activity) {
|
||||
public static void goToSearch(@NonNull Activity activity, boolean isMicOpen,
|
||||
@Nullable Pair... sharedElements) {
|
||||
ActivityCompat.startActivity(activity, new Intent(activity, SearchActivity.class)
|
||||
.putExtra(SearchActivity.EXTRA_SHOW_MIC, isMicOpen),
|
||||
ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElements).toBundle());
|
||||
}
|
||||
|
||||
public static void goToSupportDevelopment(@NonNull Activity activity) {
|
||||
ActivityCompat.startActivity(activity, new Intent(activity, SupportDevelopmentActivity.class), null);
|
||||
}
|
||||
|
||||
public static void goToPlayStore(Activity activity) {
|
||||
public static void goToPlayStore(@NonNull Activity activity) {
|
||||
openUrl(activity, RATE_ON_GOOGLE_PLAY);
|
||||
}
|
||||
|
||||
public static void gotoWhatNews(Activity activity) {
|
||||
public static void gotoWhatNews(@NonNull Activity activity) {
|
||||
ActivityCompat.startActivity(activity, new Intent(activity, WhatsNewActivity.class), null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,19 +57,21 @@
|
|||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_marginEnd="58dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
android:layout_marginEnd="58dp"
|
||||
android:layout_marginStart="58dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:title="@string/search_hint"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:titleMarginStart="0dp"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -25,12 +25,24 @@
|
|||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:layout_collapseMode="pin"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
|
@ -69,8 +70,9 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -27,12 +27,23 @@
|
|||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
app:title="@string/app_name"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
|
|
@ -1,28 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:id="@+id/sectionIcon"
|
||||
android:layout_width="wrap_content"
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
app:civ_border="false" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="0dp"
|
||||
app:srcCompat="@drawable/ic_person_white_24dp" />
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/sectionTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/for_you" />
|
||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.75"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/welcome" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/titleWelcome"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
tools:text="@string/app_name" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
|
@ -68,7 +69,8 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:title="@string/search_hint"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:titleMarginStart="0dp"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -28,12 +28,23 @@
|
|||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
app:title="@string/app_name"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:titleMarginStart="0dp"
|
||||
app:title="@string/search_hint"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
|
|
@ -1,11 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
app:civ_border="false" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.75"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/welcome" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/titleWelcome"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
tools:text="@string/app_name" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -69,8 +69,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone">
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
|
@ -103,7 +102,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="gone"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
|
||||
|
@ -111,7 +109,9 @@
|
|||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="name"
|
||||
android:hint="@string/my_name"
|
||||
android:importantForAutofill="yes"
|
||||
android:inputType="textPersonName|textCapWords|text"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
tools:text="@string/song" />
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
|
@ -63,7 +64,8 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:title="@string/search_hint"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:titleMarginStart="0dp"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
|
@ -35,8 +36,9 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:title="@string/app_name"
|
||||
app:titleMarginStart="0dp"
|
||||
app:title="@string/search_hint"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
android:id="@+id/toolbarContainer"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
|
|
|
@ -7,42 +7,6 @@
|
|||
android:orientation="vertical"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/buyProContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/md_grey_400"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:contentPadding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@string/upgrade_to_premium"
|
||||
android:textColor="@color/md_grey_200" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@string/buy_pro"
|
||||
android:textColor="@color/md_white_1000" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||
android:id="@+id/actionLibrary"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -13,6 +13,89 @@
|
|||
android:orientation="vertical"
|
||||
tools:background="@color/md_black_1000">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/buyProContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/md_grey_400"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/text"
|
||||
style="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/upgrade_to_premium" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/buy_pro"
|
||||
android:textColor="@color/md_white_1000" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/text2"
|
||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/pro_summary"
|
||||
android:textColor="@color/md_white_1000" />
|
||||
</LinearLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/text3"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="50%"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_margin="8dp"
|
||||
android:id="@+id/buyPremium"
|
||||
android:text="@string/premium" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/generalSettings"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
<item
|
||||
android:id="@+id/action_search"
|
||||
app:showAsAction="always"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
android:icon="@drawable/ic_mic_white_24dp"
|
||||
android:title="@string/action_search" />
|
||||
</menu>
|
|
@ -244,7 +244,7 @@
|
|||
|
||||
<string name="material">Material</string>
|
||||
|
||||
<string name="my_name">My Name</string>
|
||||
<string name="my_name">Name</string>
|
||||
<string name="my_top_tracks">Most played</string>
|
||||
|
||||
<string name="never">Never</string>
|
||||
|
@ -622,4 +622,7 @@
|
|||
<string name="image_gradient">Gradient image</string>
|
||||
<string name="stack">Stack</string>
|
||||
<string name="grid_style_label"><![CDATA[Grids & Style]]></string>
|
||||
<string name="welcome">Welcome,</string>
|
||||
<string name="premium">Get Premium</string>
|
||||
<string name="pro_summary">Now playing themes, Carousel effect, Color theme and more..</string>
|
||||
</resources>
|
||||
|
|
|
@ -7,4 +7,5 @@
|
|||
<string name="transition_artist_name" translatable="false">artist_image_transition</string>
|
||||
<string name="transition_artist_text" translatable="false">artist_image_transition</string>
|
||||
<string name="transition_mini_player" translatable="false">mini_player_transition</string>
|
||||
<string name="transition_toolbar" translatable="false">toolbar_transition</string>
|
||||
</resources>
|
Loading…
Reference in a new issue