Fix banner text and search function

This commit is contained in:
h4h13 2019-06-04 09:30:11 +05:30
parent 192ceb4438
commit c229af5b36
26 changed files with 345 additions and 110 deletions

View file

@ -31,7 +31,7 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 326 versionCode 328
versionName '3.1.800' versionName '3.1.800'
multiDexEnabled true multiDexEnabled true

View file

@ -52,9 +52,10 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, SearchCon
setUpToolBar() setUpToolBar()
setupSearchView() setupSearchView()
if (intent.getBooleanExtra("mic_search", false)) { if (intent.getBooleanExtra(EXTRA_SHOW_MIC, false)) {
startMicSearch() startMicSearch()
} }
back.setOnClickListener { onBackPressed() } back.setOnClickListener { onBackPressed() }
voiceSearch.setOnClickListener { startMicSearch() } voiceSearch.setOnClickListener { startMicSearch() }
@ -215,9 +216,11 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, SearchCon
} }
companion object { companion object {
val TAG: String = SearchActivity::class.java.simpleName val TAG: String = SearchActivity::class.java.simpleName
const val EXTRA_SHOW_MIC = "extra_show_mic"
const val QUERY: String = "query" const val QUERY: String = "query"
private const val REQ_CODE_SPEECH_INPUT = 9002 private const val REQ_CODE_SPEECH_INPUT = 9002
} }
} }

View file

@ -9,6 +9,7 @@ import android.os.Bundle
import android.provider.DocumentsContract import android.provider.DocumentsContract
import android.provider.MediaStore import android.provider.MediaStore
import android.provider.MediaStore.Images.Media.getBitmap import android.provider.MediaStore.Images.Media.getBitmap
import android.text.TextUtils
import android.view.MenuItem import android.view.MenuItem
import android.widget.Toast import android.widget.Toast
import androidx.core.content.FileProvider import androidx.core.content.FileProvider
@ -76,19 +77,19 @@ class UserInfoActivity : AbsBaseActivity() {
showBannerOptions() showBannerOptions()
} }
next.setOnClickListener { next.setOnClickListener {
/*val nameString = name.text.toString().trim { it <= ' ' } val nameString = name.text.toString().trim { it <= ' ' }
if (TextUtils.isEmpty(nameString)) { if (TextUtils.isEmpty(nameString)) {
Toast.makeText(this, "Umm name is empty", Toast.LENGTH_SHORT).show() Toast.makeText(this, "Umm name is empty", Toast.LENGTH_SHORT).show()
return@setOnClickListener return@setOnClickListener
} }
val bioString = bio.text.toString().trim() { it <= ' ' } /*val bioString = bio.text.toString().trim() { it <= ' ' }
if (TextUtils.isEmpty(bioString)) { if (TextUtils.isEmpty(bioString)) {
Toast.makeText(this, "Umm bio is empty", Toast.LENGTH_SHORT).show() Toast.makeText(this, "Umm bio is empty", Toast.LENGTH_SHORT).show()
return@setOnClickListener return@setOnClickListener
} }*/
PreferenceUtil.getInstance().userName = nameString PreferenceUtil.getInstance().userName = nameString
PreferenceUtil.getInstance().userBio = bioString*/ //PreferenceUtil.getInstance().userBio = bioString
setResult(Activity.RESULT_OK) setResult(Activity.RESULT_OK)
finish() finish()
} }

View file

@ -12,6 +12,8 @@ import androidx.core.util.Pair
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.retromusic.R 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.GlideApp
import code.name.monkey.retromusic.glide.RetroGlideExtension import code.name.monkey.retromusic.glide.RetroGlideExtension
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget 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.interfaces.CabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.model.Song 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.MusicUtil
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
import java.util.*
open class AlbumAdapter(protected val activity: AppCompatActivity, open class AlbumAdapter(protected val activity: AppCompatActivity,
@ -200,7 +199,10 @@ open class AlbumAdapter(protected val activity: AppCompatActivity,
if (isInQuickSelectMode) { if (isInQuickSelectMode) {
toggleChecked(adapterPosition) toggleChecked(adapterPosition)
} else { } 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) NavigationUtil.goToAlbum(activity, dataSet[adapterPosition].id, *albumPairs)
} }
} }

View file

@ -32,6 +32,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.customview.customView import com.afollestad.materialdialogs.customview.customView
import kotlinx.android.synthetic.main.fragment_main_settings.*
class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener { class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
@ -73,7 +74,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
private lateinit var actionRate: View private lateinit var actionRate: View
private lateinit var actionShare: View private lateinit var actionShare: View
private lateinit var actionBugReport: View private lateinit var actionBugReport: View
private lateinit var buyProContainer: CardView
private lateinit var materialDialog: MaterialDialog private lateinit var materialDialog: MaterialDialog
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
@ -86,7 +86,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
actionRate = layout.findViewById(R.id.actionRate) actionRate = layout.findViewById(R.id.actionRate)
actionShare = layout.findViewById(R.id.actionShare) actionShare = layout.findViewById(R.id.actionShare)
actionBugReport = layout.findViewById(R.id.actionBugReport) actionBugReport = layout.findViewById(R.id.actionBugReport)
buyProContainer = layout.findViewById(R.id.buyProContainer)
actionSettings.setOnClickListener(this) actionSettings.setOnClickListener(this)
actionSleepTimer.setOnClickListener(this) actionSleepTimer.setOnClickListener(this)
@ -97,13 +96,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
actionShare.setOnClickListener(this) actionShare.setOnClickListener(this)
actionBugReport.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()) materialDialog = MaterialDialog(activity!!, BottomSheet())
.show { .show {
customView(view = layout, scrollable = true) customView(view = layout, scrollable = true)

View file

@ -14,12 +14,14 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.core.util.Pair;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.afollestad.materialcab.MaterialCab; import com.afollestad.materialcab.MaterialCab;
import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.card.MaterialCardView;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -48,6 +50,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
private Toolbar toolbar; private Toolbar toolbar;
private AppBarLayout appBarLayout; private AppBarLayout appBarLayout;
private View contentContainer; private View contentContainer;
private MaterialCardView toolbarContainer;
private MaterialCab cab; private MaterialCab cab;
private FragmentManager fragmentManager; private FragmentManager fragmentManager;
@ -81,7 +84,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
View view = inflater.inflate(R.layout.fragment_library, container, false); View view = inflater.inflate(R.layout.fragment_library, container, false);
disposable = new CompositeDisposable(); disposable = new CompositeDisposable();
contentContainer = view.findViewById(R.id.fragmentContainer); contentContainer = view.findViewById(R.id.fragmentContainer);
toolbarContainer = view.findViewById(R.id.toolbarContainer);
appBarLayout = view.findViewById(R.id.appBarLayout); appBarLayout = view.findViewById(R.id.appBarLayout);
toolbar = view.findViewById(R.id.toolbar); toolbar = view.findViewById(R.id.toolbar);
@ -142,7 +145,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
toolbar.setBackgroundColor(primaryColor); toolbar.setBackgroundColor(primaryColor);
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
toolbar.setOnClickListener(v -> { toolbar.setOnClickListener(v -> {
showMainMenu(); Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));
NavigationUtil.goToSearch(getMainActivity(), pair);
}); });
appBarLayout.setBackgroundColor(primaryColor); appBarLayout.setBackgroundColor(primaryColor);
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
@ -353,7 +357,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
int id = item.getItemId(); int id = item.getItemId();
switch (id) { switch (id) {
case R.id.action_search: 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; break;
case R.id.action_new_playlist: case R.id.action_new_playlist:
CreatePlaylistDialog.Companion.create().show(getChildFragmentManager(), "CREATE_PLAYLIST"); CreatePlaylistDialog.Companion.create().show(getChildFragmentManager(), "CREATE_PLAYLIST");

View file

@ -5,10 +5,13 @@ import android.os.Bundle
import android.util.DisplayMetrics import android.util.DisplayMetrics
import android.view.* import android.view.*
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.util.Pair
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.common.ATHToolbarActivity import code.name.monkey.appthemehelper.common.ATHToolbarActivity
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper 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.Constants.USER_BANNER
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.HomeAdapter 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.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers 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_banner_home.*
import kotlinx.android.synthetic.main.fragment_home.recyclerView import kotlinx.android.synthetic.main.fragment_home.recyclerView
import java.io.File 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) 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 private val displayMetrics: DisplayMetrics
get() { get() {
val display = mainActivity.windowManager.defaultDisplay val display = mainActivity.windowManager.defaultDisplay
@ -109,6 +133,12 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
homePresenter.subscribe() homePresenter.subscribe()
checkPadding() checkPadding()
userInfoContainer.setOnClickListener {
NavigationUtil.goToUserInfo(activity!!)
}
titleWelcome.setTextColor(ThemeStore.textColorPrimary(context!!))
titleWelcome.text = String.format("%s", PreferenceUtil.getInstance().userName)
} }
private fun checkPadding() { private fun checkPadding() {
@ -124,7 +154,11 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
toolbar.apply { toolbar.apply {
setBackgroundColor(ThemeStore.primaryColor(context)) setBackgroundColor(ThemeStore.primaryColor(context))
setNavigationIcon(R.drawable.ic_menu_white_24dp) 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) mainActivity.setSupportActionBar(toolbar)
} }
@ -194,7 +228,8 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == R.id.action_search) { 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) return super.onOptionsItemSelected(item)
} }
@ -235,6 +270,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
.subscribe { bannerImage!!.setImageBitmap(it) }) .subscribe { bannerImage!!.setImageBitmap(it) })
} }
} }
loadImageFromStorage()
} }
companion object { companion object {

View file

@ -20,6 +20,10 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.fragment.app.Fragment 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.R
import code.name.monkey.retromusic.activities.SettingsActivity import code.name.monkey.retromusic.activities.SettingsActivity
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil
@ -59,6 +63,22 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
otherSettings.setOnClickListener(this) otherSettings.setOnClickListener(this)
aboutSettings.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) { private fun inflateFragment(fragment: Fragment, @StringRes title: Int) {

View file

@ -26,10 +26,8 @@ import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat; import androidx.core.app.ActivityOptionsCompat;
import androidx.core.util.Pair; import androidx.core.util.Pair;
import code.name.monkey.retromusic.R; 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.AboutActivity;
import code.name.monkey.retromusic.activities.AlbumDetailsActivity; import code.name.monkey.retromusic.activities.AlbumDetailsActivity;
import code.name.monkey.retromusic.activities.ArtistDetailActivity; 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.SupportDevelopmentActivity;
import code.name.monkey.retromusic.activities.UserInfoActivity; import code.name.monkey.retromusic.activities.UserInfoActivity;
import code.name.monkey.retromusic.activities.WhatsNewActivity; 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.Constants.RATE_ON_GOOGLE_PLAY;
import static code.name.monkey.retromusic.util.RetroUtil.openUrl; 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); ActivityCompat.startActivity(activity, new Intent(activity, LicenseActivity.class), null);
} }
public static void goToSearch(Activity activity) { public static void goToSearch(@NonNull Activity activity,
ActivityCompat.startActivity(activity, new Intent(activity, SearchActivity.class), null); @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); 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); 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); ActivityCompat.startActivity(activity, new Intent(activity, WhatsNewActivity.class), null);
} }
} }

View file

@ -57,19 +57,21 @@
</FrameLayout> </FrameLayout>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="58dp"
android:layout_marginEnd="58dp"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="6dp" app:cardElevation="6dp"
android:layout_marginEnd="58dp"
android:layout_marginStart="58dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name" app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View file

@ -25,12 +25,24 @@
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:elevation="0dp" android:elevation="0dp"
app:elevation="0dp"> 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"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name" app:title="@string/search_hint"
app:layout_collapseMode="pin" app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View file

@ -59,6 +59,7 @@
</FrameLayout> </FrameLayout>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
@ -69,8 +70,9 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name" app:title="@string/search_hint"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>

View file

@ -27,12 +27,23 @@
android:elevation="0dp" android:elevation="0dp"
app:elevation="0dp"> 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"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:title="@string/search_hint"
app:title="@string/app_name" app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView

View file

@ -1,29 +1,54 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/userInfoContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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 <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/sectionIcon" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="14dp" android:alpha="0.75"
android:paddingEnd="0dp" android:ellipsize="end"
app:srcCompat="@drawable/ic_person_white_24dp" /> android:text="@string/welcome" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/sectionTitle" android:id="@+id/titleWelcome"
style="@style/SubTitleTextAppearance" style="@style/TextAppearance.MaterialComponents.Headline5"
android:text="@string/for_you" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0dp"
tools:text="@string/app_name" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -58,6 +58,7 @@
</FrameLayout> </FrameLayout>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
@ -68,7 +69,8 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name" app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View file

@ -28,12 +28,23 @@
android:elevation="0dp" android:elevation="0dp"
app:elevation="0dp"> 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"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:titleMarginStart="0dp"
app:title="@string/app_name" app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView

View file

@ -1,11 +1,56 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="12dp"> 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 <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -69,8 +69,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_margin="8dp" android:layout_margin="8dp">
android:visibility="gone">
<code.name.monkey.retromusic.views.CircularImageView <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage" android:id="@+id/userImage"
@ -103,7 +102,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:visibility="gone"
app:hintAnimationEnabled="true"> app:hintAnimationEnabled="true">
@ -111,7 +109,9 @@
android:id="@+id/name" android:id="@+id/name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="@string/my_name" android:hint="@string/my_name"
android:importantForAutofill="yes"
android:inputType="textPersonName|textCapWords|text" android:inputType="textPersonName|textCapWords|text"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="@string/song" /> tools:text="@string/song" />

View file

@ -53,6 +53,7 @@
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
@ -63,7 +64,8 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name" app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View file

@ -25,6 +25,7 @@
app:elevation="0dp"> app:elevation="0dp">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
@ -35,8 +36,9 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/app_name"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View file

@ -34,6 +34,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="6dp" app:cardElevation="6dp"
android:id="@+id/toolbarContainer"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">

View file

@ -7,42 +7,6 @@
android:orientation="vertical" android:orientation="vertical"
tools:ignore="MissingPrefix"> 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 <code.name.monkey.retromusic.views.OptionMenuItemView
android:id="@+id/actionLibrary" android:id="@+id/actionLibrary"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -13,6 +13,89 @@
android:orientation="vertical" android:orientation="vertical"
tools:background="@color/md_black_1000"> 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 <LinearLayout
android:id="@+id/generalSettings" android:id="@+id/generalSettings"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -17,6 +17,6 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
app:showAsAction="always" app:showAsAction="always"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_mic_white_24dp"
android:title="@string/action_search" /> android:title="@string/action_search" />
</menu> </menu>

View file

@ -244,7 +244,7 @@
<string name="material">Material</string> <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="my_top_tracks">Most played</string>
<string name="never">Never</string> <string name="never">Never</string>
@ -622,4 +622,7 @@
<string name="image_gradient">Gradient image</string> <string name="image_gradient">Gradient image</string>
<string name="stack">Stack</string> <string name="stack">Stack</string>
<string name="grid_style_label"><![CDATA[Grids & Style]]></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> </resources>

View file

@ -7,4 +7,5 @@
<string name="transition_artist_name" translatable="false">artist_image_transition</string> <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_artist_text" translatable="false">artist_image_transition</string>
<string name="transition_mini_player" translatable="false">mini_player_transition</string> <string name="transition_mini_player" translatable="false">mini_player_transition</string>
<string name="transition_toolbar" translatable="false">toolbar_transition</string>
</resources> </resources>