From 667f81c921bb67abe198be07bce5395f240ce3e6 Mon Sep 17 00:00:00 2001 From: nuclearfog <32868976+nuclearfog@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:17:52 +0200 Subject: [PATCH] bug fix, layout fix, restructured theme and animations --- .../apollo/ui/activities/ActivityBase.java | 20 +++--- .../apollo/ui/activities/AudioFxActivity.java | 13 ++-- .../ui/activities/AudioPlayerActivity.java | 70 +++++++------------ .../apollo/ui/activities/SearchActivity.java | 21 +++--- .../ui/activities/SettingsActivity.java | 4 ++ .../ui/adapters/viewpager/QueueAdapter.java | 35 ---------- .../preference/PreferenceFragment.java | 2 +- .../apollo/ui/views/PlayerSeekbar.java | 1 + .../apollo/utils/AnimatorUtils.java | 27 +++++-- .../nuclearfog/apollo/utils/Constants.java | 8 ++- .../nuclearfog/apollo/utils/ThemeUtils.java | 9 +++ .../res/layout-land/activity_player_base.xml | 4 +- app/src/main/res/layout/activity_audiofx.xml | 3 +- app/src/main/res/layout/activity_base.xml | 1 - .../main/res/layout/activity_player_base.xml | 8 ++- .../main/res/layout/activity_profile_base.xml | 3 +- app/src/main/res/layout/bottom_action_bar.xml | 1 + app/src/main/res/layout/grid_search.xml | 3 +- app/src/main/res/layout/settings_layout.xml | 4 +- app/src/main/res/xml/app_widget_large.xml | 4 +- .../res/xml/app_widget_large_alternate.xml | 2 + app/src/main/res/xml/app_widget_recents.xml | 2 + app/src/main/res/xml/app_widget_small.xml | 4 +- app/src/main/res/xml/settings.xml | 3 +- 24 files changed, 121 insertions(+), 131 deletions(-) delete mode 100644 app/src/main/java/org/nuclearfog/apollo/ui/adapters/viewpager/QueueAdapter.java diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/activities/ActivityBase.java b/app/src/main/java/org/nuclearfog/apollo/ui/activities/ActivityBase.java index d2335161..3ee3d119 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/activities/ActivityBase.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/activities/ActivityBase.java @@ -25,7 +25,6 @@ import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; -import android.view.animation.AlphaAnimation; import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.TextView; @@ -50,11 +49,13 @@ import org.nuclearfog.apollo.ui.views.RepeatButton; import org.nuclearfog.apollo.ui.views.ShuffleButton; import org.nuclearfog.apollo.ui.views.theme.HoloSelector; +import org.nuclearfog.apollo.utils.AnimatorUtils; import org.nuclearfog.apollo.utils.ApolloUtils; import org.nuclearfog.apollo.utils.Constants; import org.nuclearfog.apollo.utils.MusicUtils; import org.nuclearfog.apollo.utils.NavUtils; import org.nuclearfog.apollo.utils.ServiceBinder.ServiceBinderCallback; +import org.nuclearfog.apollo.utils.ThemeUtils; import java.util.List; @@ -115,7 +116,9 @@ public abstract class ActivityBase extends AppCompatActivity implements ServiceB @Override protected final void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setVolumeControlStream(AudioManager.STREAM_MUSIC); setContentView(getContentView()); + View v = getWindow().getDecorView().getRootView(); // Play and pause button mPlayPauseButton = findViewById(R.id.action_button_play); // Shuffle button @@ -136,15 +139,15 @@ protected final void onCreate(Bundle savedInstanceState) { View nextButton = findViewById(R.id.action_button_next); // background of bottom action bar View bottomActionBar = findViewById(R.id.bottom_action_bar_background); - // Control the media volume - setVolumeControlStream(AudioManager.STREAM_MUSIC); - // Initialize the broadcast receiver + mPlaybackStatus = new PlaybackStatusReceiver(this); songLoader = new SongLoader(this); + ThemeUtils mTheme = new ThemeUtils(this); + // set bottom action bar color bottomActionBar.setBackground(new HoloSelector(this)); - // hide player controls - playbackControls.setVisibility(View.INVISIBLE); + // set background + mTheme.setBackground(v); previousButton.setOnClickListener(this); nextButton.setOnClickListener(this); @@ -223,10 +226,7 @@ protected void onDestroy() { public void onServiceConnected() { // fade in playback controls if (playbackControls.getVisibility() != View.VISIBLE) { - AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f); - anim.setDuration(250); - playbackControls.startAnimation(anim); - playbackControls.setVisibility(View.VISIBLE); + AnimatorUtils.fade(playbackControls, true); playbackControls.scrollTo(0, 0); } // Set the playback drawables diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioFxActivity.java b/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioFxActivity.java index ace881ab..d31907fb 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioFxActivity.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioFxActivity.java @@ -76,35 +76,34 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { setContentView(R.layout.activity_audiofx); Toolbar toolbar = findViewById(R.id.audiofx_toolbar); RecyclerView eq_bands = findViewById(R.id.audiofx_eq_scroll); + View root = findViewById(R.id.audiofx_root); presetLabel = findViewById(R.id.audiofx_preset_label); presetSelector = findViewById(R.id.audiofx_preset); enableFx = findViewById(R.id.audiofx_enable); bassBoost = findViewById(R.id.audiofx_bass_boost); reverb = findViewById(R.id.audiofx_reverb); - presetAdapter = new PresetAdapter(); - presetLoader = new PresetLoader(this); int sessionId = getIntent().getIntExtra(KEY_SESSION_ID, 0); + presetAdapter = new PresetAdapter(); + presetLoader = new PresetLoader(this); audioEffects = AudioEffects.getInstance(this, sessionId); - - // set theme colors + ThemeUtils mResources = new ThemeUtils(this); PreferenceUtils mPrefs = PreferenceUtils.getInstance(this); ColorFilter colorFilter = new PorterDuffColorFilter(mPrefs.getDefaultThemeColor(), PorterDuff.Mode.SRC_IN); + bassBoost.getProgressDrawable().setColorFilter(colorFilter); bassBoost.getThumb().setColorFilter(colorFilter); reverb.getProgressDrawable().setColorFilter(colorFilter); reverb.getThumb().setColorFilter(colorFilter); enableFx.getThumbDrawable().setColorFilter(colorFilter); - bassBoost.setMax(BASS_STEPS); reverb.setMax(AudioEffects.MAX_REVERB); eq_bands.setLayoutManager(new LinearLayoutManager(this, RecyclerView.HORIZONTAL, false)); - presetSelector.setAdapter(presetAdapter); + mResources.setBackground(root); setSupportActionBar(toolbar); if (getSupportActionBar() != null) { - ThemeUtils mResources = new ThemeUtils(this); getSupportActionBar().setDisplayHomeAsUpEnabled(true); mResources.themeActionBar(getSupportActionBar(), R.string.title_audio_effects); } diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioPlayerActivity.java b/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioPlayerActivity.java index e89abf66..a34f5842 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioPlayerActivity.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/activities/AudioPlayerActivity.java @@ -29,7 +29,6 @@ import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; -import android.view.animation.AlphaAnimation; import android.widget.ImageView; import android.widget.TextView; @@ -42,8 +41,8 @@ import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat; import androidx.core.content.FileProvider; +import androidx.fragment.app.FragmentContainerView; import androidx.lifecycle.ViewModelProvider; -import androidx.viewpager.widget.ViewPager; import org.nuclearfog.apollo.BuildConfig; import org.nuclearfog.apollo.R; @@ -59,7 +58,6 @@ import org.nuclearfog.apollo.receiver.PlaybackStatusReceiver.PlayStatusListener; import org.nuclearfog.apollo.service.MusicPlaybackService; import org.nuclearfog.apollo.store.FavoritesStore; -import org.nuclearfog.apollo.ui.adapters.viewpager.QueueAdapter; import org.nuclearfog.apollo.ui.fragments.QueueFragment; import org.nuclearfog.apollo.ui.views.PlayPauseButton; import org.nuclearfog.apollo.ui.views.PlayerSeekbar; @@ -121,10 +119,10 @@ public class AudioPlayerActivity extends AppCompatActivity implements ServiceBin */ private ImageView mAlbumArt; - /** - * album art borders - */ - private View controls, albumArtBorder1, albumArtBorder2; + private View controls, albumArtBorder1; + + @Nullable + private View albumArtBorder2; /** * Tiny artwork */ @@ -141,10 +139,8 @@ public class AudioPlayerActivity extends AppCompatActivity implements ServiceBin * Broadcast receiver */ private PlaybackStatusReceiver mPlaybackStatus; - /** - * ViewPager - */ - private ViewPager mViewPager; + + private FragmentContainerView queueContainer; /** * Image cache */ @@ -171,13 +167,17 @@ public class AudioPlayerActivity extends AppCompatActivity implements ServiceBin @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // Set the layout + setVolumeControlStream(AudioManager.STREAM_MUSIC); + // init views setContentView(R.layout.activity_player_base); mPlayPauseButton = findViewById(R.id.action_button_play); mShuffleButton = findViewById(R.id.action_button_shuffle); mRepeatButton = findViewById(R.id.action_button_repeat); + View root = findViewById(R.id.player_root); + Toolbar toolbar = findViewById(R.id.player_toolbar); RepeatingImageButton mPreviousButton = findViewById(R.id.action_button_previous); RepeatingImageButton mNextButton = findViewById(R.id.action_button_next); + queueContainer = findViewById(R.id.audio_player_pager); controls = findViewById(R.id.audio_player_controls); mTrackName = findViewById(R.id.audio_player_track_name); mArtistName = findViewById(R.id.audio_player_artist_name); @@ -188,39 +188,26 @@ protected void onCreate(Bundle savedInstanceState) { mQueueSwitch = findViewById(R.id.audio_player_switch_queue); mQueueSwitch.setImageResource(R.drawable.btn_switch_queue); playerSeekbar = findViewById(R.id.player_progress); - - // set toolbar - Toolbar toolbar = findViewById(R.id.player_toolbar); - if (toolbar != null) // toolbar only available in portrait mode - setSupportActionBar(toolbar); - // Initialze the theme resources + // mResources = new ThemeUtils(this); + mPrefs = PreferenceUtils.getInstance(this); playlistSongLoader = new PlaylistSongLoader(this); artistSongLoader = new ArtistSongLoader(this); albumSongLoader = new AlbumSongLoader(this); songLoader = new SongLoader(this); - // app preferences - mPrefs = PreferenceUtils.getInstance(this); - // Control the media volume - setVolumeControlStream(AudioManager.STREAM_MUSIC); - // Initialize the image fetcher/cache mImageFetcher = ApolloUtils.getImageFetcher(this); - // Initialize the broadcast receiver mPlaybackStatus = new PlaybackStatusReceiver(this); + viewModel = new ViewModelProvider(this).get(FragmentViewModel.class); // Theme the action bar + if (toolbar != null) + setSupportActionBar(toolbar); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { mResources.themeActionBar(actionBar, R.string.app_name); actionBar.setDisplayHomeAsUpEnabled(true); } - viewModel = new ViewModelProvider(this).get(FragmentViewModel.class); - // View pager - mViewPager = findViewById(R.id.audio_player_pager); - // Offscreen pager loading limit - mViewPager.setOffscreenPageLimit(1); - // Initialize the pager adapter and attach - QueueAdapter mPagerAdapter = new QueueAdapter(getSupportFragmentManager()); - mViewPager.setAdapter(mPagerAdapter); + // set activity background + mResources.setBackground(root); // set colors int themeColor = mPrefs.getDefaultThemeColor(); mShuffleButton.setColor(themeColor); @@ -479,13 +466,12 @@ public void onClick(@NonNull View v) { } // Show the queue, hide the artwork else if (v.getId() == R.id.audio_player_switch_queue) { - mViewPager.setVisibility(View.VISIBLE); + AnimatorUtils.fade(queueContainer, true); + // switch buttons mAlbumArtSmall.setVisibility(View.VISIBLE); - // hide this button mQueueSwitch.setVisibility(View.INVISIBLE); // Fade out the artwork - if (albumArtBorder1 != null) - AnimatorUtils.fade(albumArtBorder1, false); + AnimatorUtils.fade(albumArtBorder1, false); if (albumArtBorder2 != null) AnimatorUtils.fade(albumArtBorder2, false); AnimatorUtils.fade(mAlbumArt, false); @@ -494,13 +480,12 @@ else if (v.getId() == R.id.audio_player_switch_queue) { } // Show the artwork, hide the queue else if (v.getId() == R.id.audio_player_switch_album_art) { - mViewPager.setVisibility(View.INVISIBLE); + AnimatorUtils.fade(queueContainer, false); + // switch buttons mQueueSwitch.setVisibility(View.VISIBLE); - // hide this button mAlbumArtSmall.setVisibility(View.INVISIBLE); // Fade in the album art - if (albumArtBorder1 != null) - AnimatorUtils.fade(albumArtBorder1, true); + AnimatorUtils.fade(albumArtBorder1, true); if (albumArtBorder2 != null) AnimatorUtils.fade(albumArtBorder2, true); AnimatorUtils.fade(mAlbumArt, true); @@ -649,10 +634,7 @@ private void updatePlaybackControls() { boolean isPlaying = MusicUtils.isPlaying(this); // fade in player control after initialization if (controls.getVisibility() != View.VISIBLE && controls.getAnimation() == null) { - AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f); - anim.setDuration(500); - controls.setVisibility(View.VISIBLE); - controls.startAnimation(anim); + AnimatorUtils.fade(controls, true); } // Set the play and pause image mPlayPauseButton.updateState(isPlaying); diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/activities/SearchActivity.java b/app/src/main/java/org/nuclearfog/apollo/ui/activities/SearchActivity.java index 01794834..9076bb57 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/activities/SearchActivity.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/activities/SearchActivity.java @@ -13,7 +13,6 @@ import android.app.SearchManager; import android.content.Intent; -import android.media.AudioManager; import android.os.Bundle; import android.text.TextUtils; import android.view.ContextMenu; @@ -112,23 +111,23 @@ protected void init(Bundle savedInstanceState) { GridView mGridView = findViewById(R.id.grid_search); TextView emptyText = findViewById(R.id.grid_search_empty_info); Toolbar toolbar = findViewById(R.id.grid_search_toolbar); - // Initialize the theme resources + View root = findViewById(R.id.grid_search_root); + + mAdapter = new SearchAdapter(this); + albumSongLoader = new AlbumSongLoader(this); + artistSongLoader = new ArtistSongLoader(this); + mLoader = new MusicSearchLoader(this); ThemeUtils mResources = new ThemeUtils(this); + setSupportActionBar(toolbar); if (getSupportActionBar() != null) { mResources.themeActionBar(getSupportActionBar(), R.string.app_name); } - // Control the media volume - setVolumeControlStream(AudioManager.STREAM_MUSIC); // Get the query String query = getIntent().getStringExtra(SearchManager.QUERY); mFilterString = !TextUtils.isEmpty(query) ? query : ""; - // Action bar subtitle mResources.setSubtitle("\"" + mFilterString + "\""); - // Initialize the adapter - mAdapter = new SearchAdapter(this); - albumSongLoader = new AlbumSongLoader(this); - artistSongLoader = new ArtistSongLoader(this); + mResources.setBackground(root); // Set the prefix mAdapter.setPrefix(mFilterString); // Bind the data @@ -146,9 +145,7 @@ protected void init(Bundle savedInstanceState) { } else { mGridView.setNumColumns(ONE); } - // Prepare the loader. Either re-connect with an existing one, - // or start a new one. - mLoader = new MusicSearchLoader(this); + // Prepare the loader. Either re-connect with an existing one mLoader.execute(mFilterString, this); } diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/activities/SettingsActivity.java b/app/src/main/java/org/nuclearfog/apollo/ui/activities/SettingsActivity.java index c9ffb75a..b65e8358 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/activities/SettingsActivity.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/activities/SettingsActivity.java @@ -13,11 +13,13 @@ import android.os.Bundle; import android.view.MenuItem; +import android.view.View; import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; + import org.nuclearfog.apollo.R; import org.nuclearfog.apollo.ui.fragments.preference.PreferenceFragment; import org.nuclearfog.apollo.utils.ThemeUtils; @@ -38,6 +40,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.settings_layout); Toolbar toolbar = findViewById(R.id.settings_toolbar); + View root = findViewById(R.id.settings_root); // setup toolbar setSupportActionBar(toolbar); ActionBar actionbar = getSupportActionBar(); @@ -45,6 +48,7 @@ protected void onCreate(Bundle savedInstanceState) { actionbar.setDisplayHomeAsUpEnabled(true); ThemeUtils mResources = new ThemeUtils(this); mResources.themeActionBar(actionbar, R.string.menu_settings); + mResources.setBackground(root); } //attach fragment if (savedInstanceState == null) { diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/adapters/viewpager/QueueAdapter.java b/app/src/main/java/org/nuclearfog/apollo/ui/adapters/viewpager/QueueAdapter.java deleted file mode 100644 index 3b3dba0c..00000000 --- a/app/src/main/java/org/nuclearfog/apollo/ui/adapters/viewpager/QueueAdapter.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.nuclearfog.apollo.ui.adapters.viewpager; - - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentManager; -import androidx.fragment.app.FragmentStatePagerAdapter; - -import org.nuclearfog.apollo.ui.fragments.QueueFragment; - -/** - * @author nuclearfog - */ -public class QueueAdapter extends FragmentStatePagerAdapter { - - /** - * - */ - public QueueAdapter(FragmentManager fm) { - super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT); - } - - - @NonNull - @Override - public Fragment getItem(int position) { - return new QueueFragment(); - } - - - @Override - public int getCount() { - return 1; - } -} \ No newline at end of file diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/fragments/preference/PreferenceFragment.java b/app/src/main/java/org/nuclearfog/apollo/ui/fragments/preference/PreferenceFragment.java index 95a1dc42..2daa2f7e 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/fragments/preference/PreferenceFragment.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/fragments/preference/PreferenceFragment.java @@ -25,8 +25,8 @@ /** * Preference fragment class * - * @see org.nuclearfog.apollo.ui.activities.SettingsActivity * @author nuclearfog + * @see org.nuclearfog.apollo.ui.activities.SettingsActivity */ public class PreferenceFragment extends PreferenceFragmentCompat implements OnPreferenceClickListener { diff --git a/app/src/main/java/org/nuclearfog/apollo/ui/views/PlayerSeekbar.java b/app/src/main/java/org/nuclearfog/apollo/ui/views/PlayerSeekbar.java index adcf79f0..f80413cb 100644 --- a/app/src/main/java/org/nuclearfog/apollo/ui/views/PlayerSeekbar.java +++ b/app/src/main/java/org/nuclearfog/apollo/ui/views/PlayerSeekbar.java @@ -175,6 +175,7 @@ public void seek(long to) { position = 0; seekbar.setProgress(0); } + setCurrentTimeText(position); } /** diff --git a/app/src/main/java/org/nuclearfog/apollo/utils/AnimatorUtils.java b/app/src/main/java/org/nuclearfog/apollo/utils/AnimatorUtils.java index 33475e17..a6d96b47 100644 --- a/app/src/main/java/org/nuclearfog/apollo/utils/AnimatorUtils.java +++ b/app/src/main/java/org/nuclearfog/apollo/utils/AnimatorUtils.java @@ -4,6 +4,7 @@ import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.view.View; +import android.view.animation.AlphaAnimation; import android.view.animation.AnimationUtils; /** @@ -29,11 +30,25 @@ private AnimatorUtils() { * @param visible true to fade in, false to fade out */ public static void fade(View view, boolean visible) { - PropertyValuesHolder holder = visible ? FADE_IN : FADE_OUT; - ObjectAnimator fade = ObjectAnimator.ofPropertyValuesHolder(view, holder); - fade.setInterpolator(AnimationUtils.loadInterpolator(view.getContext(), android.R.anim.accelerate_decelerate_interpolator)); - fade.setDuration(400); - fade.start(); + AlphaAnimation anim; + Runnable post = new Runnable() { + @Override + public void run() { + if (visible) { + view.setVisibility(View.VISIBLE); + } else { + view.setVisibility(View.INVISIBLE); + } + } + }; + if (visible) { + anim = new AlphaAnimation(0.0f, 1.0f); + } else { + anim = new AlphaAnimation(1.0f, 0.0f); + } + anim.setDuration(Constants.ANIMATION_SPEED); + view.startAnimation(anim); + view.post(post); } /** @@ -48,7 +63,7 @@ public static void pulse(View view, boolean enable) { pulse = ObjectAnimator.ofPropertyValuesHolder(view, FADE_IN, FADE_OUT); pulse.setRepeatCount(ObjectAnimator.INFINITE); pulse.setRepeatMode(ObjectAnimator.REVERSE); - pulse.setDuration(500); + pulse.setDuration(Constants.ANIMATION_SPEED); pulse.start(); } } else if (pulse != null) { diff --git a/app/src/main/java/org/nuclearfog/apollo/utils/Constants.java b/app/src/main/java/org/nuclearfog/apollo/utils/Constants.java index c7900e57..c5981b08 100644 --- a/app/src/main/java/org/nuclearfog/apollo/utils/Constants.java +++ b/app/src/main/java/org/nuclearfog/apollo/utils/Constants.java @@ -67,8 +67,14 @@ public final class Constants { * maximal scroll speed when dragging a list element */ public static final float DRAG_DROP_MAX_SPEED = 3.0f; - + /** + * opacity of list items when they are marked as hidden + */ public static final float OPACITY_HIDDEN = 0.4f; + /** + * animation duration in milliseconds + */ + public static final long ANIMATION_SPEED = 500; /** * permissions used for Android 6+ diff --git a/app/src/main/java/org/nuclearfog/apollo/utils/ThemeUtils.java b/app/src/main/java/org/nuclearfog/apollo/utils/ThemeUtils.java index 5375430f..ef5c6f1a 100644 --- a/app/src/main/java/org/nuclearfog/apollo/utils/ThemeUtils.java +++ b/app/src/main/java/org/nuclearfog/apollo/utils/ThemeUtils.java @@ -115,4 +115,13 @@ public void setSubtitle(@NonNull String subtitle) { // Set the subtitle actionBarSubtitle.setText(subtitle); } + + /** + * set view background + * + * @param v view to set the default background + */ + public void setBackground(View v) { + v.setBackgroundResource(R.drawable.pager_background); + } } \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_player_base.xml b/app/src/main/res/layout-land/activity_player_base.xml index d36021cc..76c808bd 100644 --- a/app/src/main/res/layout-land/activity_player_base.xml +++ b/app/src/main/res/layout-land/activity_player_base.xml @@ -16,9 +16,10 @@ + tools:context=".ui.activities.AudioPlayerActivity"> + tools:context=".ui.activities.AudioFxActivity"> + tools:context=".ui.activities.AudioPlayerActivity"> - + android:layout_weight="1"> diff --git a/app/src/main/res/layout/grid_search.xml b/app/src/main/res/layout/grid_search.xml index e5653a4e..e6ca2e40 100644 --- a/app/src/main/res/layout/grid_search.xml +++ b/app/src/main/res/layout/grid_search.xml @@ -2,9 +2,10 @@ + tools:context=".ui.activities.SearchActivity"> + tools:context=".ui.activities.SettingsActivity"> + android:widgetCategory="keyguard|home_screen" + tools:ignore="UnusedAttribute" /> diff --git a/app/src/main/res/xml/app_widget_large_alternate.xml b/app/src/main/res/xml/app_widget_large_alternate.xml index 9ee54017..0fa4e5d4 100644 --- a/app/src/main/res/xml/app_widget_large_alternate.xml +++ b/app/src/main/res/xml/app_widget_large_alternate.xml @@ -14,9 +14,11 @@ limitations under the License. --> diff --git a/app/src/main/res/xml/app_widget_recents.xml b/app/src/main/res/xml/app_widget_recents.xml index 586fa6db..5f656c19 100644 --- a/app/src/main/res/xml/app_widget_recents.xml +++ b/app/src/main/res/xml/app_widget_recents.xml @@ -14,6 +14,7 @@ limitations under the License. --> diff --git a/app/src/main/res/xml/app_widget_small.xml b/app/src/main/res/xml/app_widget_small.xml index 910ea0d5..1afd6a70 100644 --- a/app/src/main/res/xml/app_widget_small.xml +++ b/app/src/main/res/xml/app_widget_small.xml @@ -14,9 +14,11 @@ limitations under the License. --> + android:widgetCategory="keyguard|home_screen" + tools:ignore="UnusedAttribute" /> diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index f21231a6..b846d034 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -1,5 +1,4 @@ - -