Skip to content

Commit

Permalink
Spike/issue 103/prepare for beta release (#104)
Browse files Browse the repository at this point in the history
Issue-103 - added new logo and fixed final issues
  • Loading branch information
goldy1992 authored Nov 16, 2019
1 parent e6d1d04 commit 46c63f3
Show file tree
Hide file tree
Showing 46 changed files with 53 additions and 29 deletions.
12 changes: 5 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "com.github.goldy1992.mp3player"
minSdkVersion MARSHMALLOW
targetSdkVersion OREO
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
Expand All @@ -31,8 +31,7 @@ android {

buildTypes {
release {
testCoverageEnabled = true
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
Expand All @@ -46,12 +45,12 @@ android {
full {
applicationIdSuffix ".full"
versionNameSuffix "-full"
resValue "string", "app_name", "MP3 Player"
resValue "string", "app_name", "Music Player"
}
automation {
applicationIdSuffix ".automation"
versionNameSuffix "-automation"
resValue "string", "app_name", "Test Mp3 Player"
resValue "string", "app_name", "Test Music Player"

}
}
Expand Down Expand Up @@ -146,7 +145,6 @@ dependencies {
implementation group: 'org.apache.commons', name: 'commons-lang3', version: COMMONS_LANG_VERSION
implementation group: 'org.apache.commons', name: 'commons-collections4', version: COMMONS_COLLECTIONS4_VERSION
implementation group: 'com.google.guava', name: 'guava', version: GOOGLE_GUAVA_VERSION
implementation group: 'androidx.test', name: 'core', version: TEST_CORE_VERSION
implementation group: 'com.google.android.exoplayer', name: 'exoplayer-core', version: EXO_PLAYER_VERSION
implementation group: 'com.google.android.exoplayer', name: 'exoplayer-ui', version: EXO_PLAYER_VERSION
implementation group: 'com.google.android.exoplayer', name: 'extension-mediasession', version: EXO_PLAYER_VERSION
Expand Down
8 changes: 8 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-assumenosideeffects class android.util.Log {
public static *** v(...);
public static *** d(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:name=".MikesMp3Player"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/my_app_icon"
android:icon="@mipmap/headphone_icon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.Orange">
Expand Down
Binary file added app/src/main/headphone_icon-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import androidx.annotation.VisibleForTesting;
import androidx.appcompat.widget.SearchView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.github.goldy1992.mp3player.LogTagger;
import com.github.goldy1992.mp3player.R;
Expand Down Expand Up @@ -83,7 +84,10 @@ public void onClickOnLayout(View view) {
public void onFocusChange(View v, boolean queryTextFocused) {
Log.i("tag", "focus changed: has focus: " + queryTextFocused);
if (!queryTextFocused) {
getFragmentManager().popBackStack();
FragmentManager fragmentManager = getFragmentManager();
if (null != fragmentManager && !fragmentManager.isDestroyed()) {
fragmentManager.popBackStack();
}
}
}
@Override
Expand Down
Binary file removed app/src/main/my_app_icon-web.png
Binary file not shown.
15 changes: 12 additions & 3 deletions app/src/main/res/layout/nav_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="192dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:padding="16dp"
android:theme="@style/ThemeOverlay.AppCompat.Light"
android:orientation="vertical"
android:gravity="bottom"
android:gravity="center"
android:background="?themeColorPrimary">

<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:contentDescription="@string/LOGO_DESCRIPTION"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/headphone_icon" />

<TextView
android:paddingTop="@dimen/default_gap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
android:text="@string/menu"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Headline" />

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/splash_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:contentDescription="@string/LOGO_DESCRIPTION"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/my_app_icon" />
app:srcCompat="@mipmap/headphone_icon" />
<View
android:layout_width="match_parent"
android:layout_height="10dp"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/menu/themes_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<group android:checkableBehavior="single" android:menuCategory="container"
android:orderInCategory="1">

<item android:id="@+id/action_settings"
android:orderInCategory="1"
android:title="@string/action_settings"
app:showAsAction="never" />
<!-- <item android:id="@+id/action_settings"-->
<!-- android:orderInCategory="1"-->
<!-- android:title="@string/action_settings"-->
<!-- app:showAsAction="never" />-->

<item android:id="@+id/themes_menu_item"
android:title="Themes"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/headphone_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/headphone_icon_background"/>
<foreground android:drawable="@mipmap/headphone_icon_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/headphone_icon_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/headphone_icon_background"/>
<foreground android:drawable="@mipmap/headphone_icon_foreground"/>
</adaptive-icon>
5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/my_app_icon.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/my_app_icon_round.xml

This file was deleted.

Binary file added app/src/main/res/mipmap-hdpi/headphone_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-hdpi/my_app_icon.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/my_app_icon_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-mdpi/headphone_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-mdpi/my_app_icon.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/my_app_icon_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xhdpi/headphone_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xhdpi/my_app_icon.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/my_app_icon_round.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/headphone_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xxhdpi/my_app_icon.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/my_app_icon_round.png
Diff not rendered.
Binary file removed app/src/main/res/mipmap-xxxhdpi/my_app_icon.png
Diff not rendered.
Diff not rendered.
4 changes: 4 additions & 0 deletions app/src/main/res/values/headphone_icon_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="headphone_icon_background">#FFFFFF</color>
</resources>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
<string name="PLAYBACK_SPEED_DEFAULT_VALUE">1.00x</string>
<string name="SEARCH_BUTTON_DESCRIPT">Search for an audio track</string>
<string name="LOGO_DESCRIPTION">The title logo</string>
<string name="APP_TITLE">Mike\'s MP3 Player</string>
<string name="APP_TITLE">Music Player</string>
<string name="APP_TITLE_H1"><![CDATA[<h1>Mike\'s MP3 Player</h1>]]></string>
<string name="FOLDER_NAME">%1$s</string>
<string name="FOLDER_PATH"></string>
<string name="NO_MEDIA_FOUND">No audio tracks found on your device.</string>
<string name="search_hint">Search media</string>
<string name="notification_channel_name">channel_name</string>
<string name="channel_description">channel description</string>
<string name="menu">Menu</string>
<!-- THEME NAMES !-->
<string name="THEME_BLUE">Blue</string>
<string name="THEME_ORANGE">Orange</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/resources/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:name=".MikesMp3Player"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/my_app_icon"
android:icon="@mipmap/headphone_icon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.Orange" />
Expand Down

0 comments on commit 46c63f3

Please sign in to comment.