code refactor
parent
8d9fb4c0df
commit
4aa0ccc283
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="RetroMusicPlayer" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="java-gradle" name="Java-Gradle">
|
||||
<configuration>
|
||||
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
|
||||
<option name="BUILDABLE" value="false" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="imageWizard">
|
||||
<value>
|
||||
<PersistentState />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/jsoup-1.11.2.jar:unspecified@jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/app/libs/jsoup-1.11.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: com.mpatric:mp3agic:0.8.3@jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mpatric/mp3agic/0.8.3/ddbccc4219ef1bd38f7f6ed6fa0a5374159f9b9f/mp3agic-0.8.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mpatric/mp3agic/0.8.3/bfd1267d2d5bdf5fa8ce9a4197cdfc0ed9bc5205/mp3agic-0.8.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,14 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: jp.wasabeef:glide-transformations-2.0.2">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/glide-transformations-2.0.2.aar/a8e2dae52526ebad94e3e6c842f0daec/res" />
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/glide-transformations-2.0.2.aar/a8e2dae52526ebad94e3e6c842f0daec/jars/classes.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/jp.wasabeef/glide-transformations/2.0.2/d77158225e8aff098f2269c5b42cebb8cd1ebc6f/glide-transformations-2.0.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/jp.wasabeef/glide-transformations/2.0.2/87061eb6c96686339ab1a2d30dbd77c247486014/glide-transformations-2.0.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -5,25 +5,32 @@
|
|||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="5">
|
||||
<list size="6">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="4">
|
||||
<list size="5">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (4)" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
|
@ -2,7 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/RetroMusicPlayer.iml" filepath="$PROJECT_DIR$/.idea/RetroMusicPlayer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/RetroMusicPlayer.iml" filepath="$PROJECT_DIR$/RetroMusicPlayer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/appthemehelper/appthemehelper.iml" filepath="$PROJECT_DIR$/appthemehelper/appthemehelper.iml" />
|
||||
</modules>
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -13,7 +13,7 @@
|
|||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="1.8 (4)" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -130,6 +130,8 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-libraries" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
|
@ -141,11 +143,16 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/linked_res_for_bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged-not-compiled-resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/module_bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
|
||||
|
@ -159,7 +166,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 28 Platform (1)" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:okhttp3-integration:1.5.0@jar" level="project" />
|
||||
|
|
|
@ -11,8 +11,8 @@ android {
|
|||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
applicationId "code.name.monkey.retromusic"
|
||||
versionCode 206
|
||||
versionName 'R - 1.7.10'
|
||||
versionCode 207
|
||||
versionName '1.7.10'
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package code.name.monkey.retromusic.swipebtn;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
final class DimentionUtils {
|
||||
|
||||
private DimentionUtils() {
|
||||
}
|
||||
|
||||
static float convertPixelsToSp(float px, Context context) {
|
||||
return px / context.getResources().getDisplayMetrics().scaledDensity;
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package code.name.monkey.retromusic.swipebtn;
|
||||
|
||||
public interface OnActiveListener {
|
||||
void onActive();
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package code.name.monkey.retromusic.swipebtn;
|
||||
|
||||
public interface OnStateChangeListener {
|
||||
void onStateChange(boolean active);
|
||||
}
|
|
@ -1,486 +0,0 @@
|
|||
package code.name.monkey.retromusic.swipebtn;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
|
||||
public class SwipeButton extends RelativeLayout {
|
||||
|
||||
|
||||
private static final int ENABLED = 0;
|
||||
private static final int DISABLED = 1;
|
||||
private ImageView swipeButtonInner;
|
||||
private float initialX;
|
||||
private boolean active;
|
||||
private TextView centerText;
|
||||
private ViewGroup background;
|
||||
private Drawable disabledDrawable;
|
||||
private Drawable enabledDrawable;
|
||||
private OnStateChangeListener onStateChangeListener;
|
||||
private OnActiveListener onActiveListener;
|
||||
private int collapsedWidth;
|
||||
private int collapsedHeight;
|
||||
|
||||
private LinearLayout layer;
|
||||
private boolean trailEnabled = false;
|
||||
private boolean hasActivationState;
|
||||
|
||||
public SwipeButton(Context context) {
|
||||
super(context);
|
||||
|
||||
init(context, null, -1, -1);
|
||||
}
|
||||
|
||||
public SwipeButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
init(context, attrs, -1, -1);
|
||||
}
|
||||
|
||||
public SwipeButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
init(context, attrs, defStyleAttr, -1);
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
public SwipeButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
init(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public void setCenterTextColor(int color) {
|
||||
if (centerText == null) {
|
||||
return;
|
||||
}
|
||||
centerText.setTextColor(color);
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
centerText.setText(text);
|
||||
}
|
||||
|
||||
public void setBackground(Drawable drawable) {
|
||||
background.setBackground(drawable);
|
||||
}
|
||||
|
||||
public ViewGroup getSwipeBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
public void setSlidingButtonBackground(Drawable drawable) {
|
||||
background.setBackground(drawable);
|
||||
}
|
||||
|
||||
public void setDisabledDrawable(Drawable drawable) {
|
||||
disabledDrawable = drawable;
|
||||
|
||||
if (!active) {
|
||||
swipeButtonInner.setImageDrawable(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
public void setButtonBackground(Drawable buttonBackground) {
|
||||
if (buttonBackground != null) {
|
||||
swipeButtonInner.setBackground(buttonBackground);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnabledDrawable(Drawable drawable) {
|
||||
enabledDrawable = drawable;
|
||||
|
||||
if (active) {
|
||||
swipeButtonInner.setImageDrawable(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnStateChangeListener(OnStateChangeListener onStateChangeListener) {
|
||||
this.onStateChangeListener = onStateChangeListener;
|
||||
}
|
||||
|
||||
public void setOnActiveListener(OnActiveListener onActiveListener) {
|
||||
this.onActiveListener = onActiveListener;
|
||||
}
|
||||
|
||||
public void setInnerTextPadding(int left, int top, int right, int bottom) {
|
||||
centerText.setPadding(left, top, right, bottom);
|
||||
}
|
||||
|
||||
public void setSwipeButtonPadding(int left, int top, int right, int bottom) {
|
||||
swipeButtonInner.setPadding(left, top, right, bottom);
|
||||
}
|
||||
|
||||
public void setHasActivationState(boolean hasActivationState) {
|
||||
this.hasActivationState = hasActivationState;
|
||||
}
|
||||
|
||||
private void init(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
hasActivationState = true;
|
||||
|
||||
background = new RelativeLayout(context);
|
||||
|
||||
LayoutParams layoutParamsView = new LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
layoutParamsView.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
||||
|
||||
addView(background, layoutParamsView);
|
||||
|
||||
final TextView centerText = new TextView(context);
|
||||
this.centerText = centerText;
|
||||
centerText.setGravity(Gravity.CENTER);
|
||||
|
||||
LayoutParams layoutParams = new LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
||||
|
||||
background.addView(centerText, layoutParams);
|
||||
|
||||
final ImageView swipeButton = new ImageView(context);
|
||||
this.swipeButtonInner = swipeButton;
|
||||
|
||||
if (attrs != null && defStyleAttr == -1 && defStyleRes == -1) {
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.SwipeButton,
|
||||
defStyleAttr, defStyleRes);
|
||||
|
||||
collapsedWidth = (int) typedArray.getDimension(R.styleable.SwipeButton_button_image_width,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
collapsedHeight = (int) typedArray.getDimension(R.styleable.SwipeButton_button_image_height,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
trailEnabled = typedArray.getBoolean(R.styleable.SwipeButton_button_trail_enabled,
|
||||
false);
|
||||
Drawable trailingDrawable = typedArray.getDrawable(R.styleable.SwipeButton_button_trail_drawable);
|
||||
|
||||
Drawable backgroundDrawable = typedArray.getDrawable(R.styleable.SwipeButton_inner_text_background);
|
||||
|
||||
if (backgroundDrawable != null) {
|
||||
background.setBackground(backgroundDrawable);
|
||||
} else {
|
||||
background.setBackground(ContextCompat.getDrawable(context, R.drawable.shape_rounded_edit));
|
||||
}
|
||||
|
||||
if (trailEnabled) {
|
||||
layer = new LinearLayout(context);
|
||||
|
||||
if (trailingDrawable != null) {
|
||||
layer.setBackground(trailingDrawable);
|
||||
} else {
|
||||
layer.setBackground(typedArray.getDrawable(R.styleable.SwipeButton_button_background));
|
||||
}
|
||||
|
||||
layer.setGravity(Gravity.START);
|
||||
layer.setVisibility(View.GONE);
|
||||
background.addView(layer, layoutParamsView);
|
||||
}
|
||||
|
||||
centerText.setText(typedArray.getText(R.styleable.SwipeButton_inner_text));
|
||||
centerText.setTextColor(typedArray.getColor(R.styleable.SwipeButton_inner_text_color,
|
||||
Color.WHITE));
|
||||
|
||||
float textSize = DimentionUtils.convertPixelsToSp(
|
||||
typedArray.getDimension(R.styleable.SwipeButton_inner_text_size, 0), context);
|
||||
|
||||
if (textSize != 0) {
|
||||
centerText.setTextSize(textSize);
|
||||
} else {
|
||||
centerText.setTextSize(12);
|
||||
}
|
||||
|
||||
disabledDrawable = typedArray.getDrawable(R.styleable.SwipeButton_button_image_disabled);
|
||||
enabledDrawable = typedArray.getDrawable(R.styleable.SwipeButton_button_image_enabled);
|
||||
float innerTextLeftPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_inner_text_left_padding, 0);
|
||||
float innerTextTopPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_inner_text_top_padding, 0);
|
||||
float innerTextRightPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_inner_text_right_padding, 0);
|
||||
float innerTextBottomPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_inner_text_bottom_padding, 0);
|
||||
|
||||
int initialState = typedArray.getInt(R.styleable.SwipeButton_initial_state, DISABLED);
|
||||
|
||||
if (initialState == ENABLED) {
|
||||
LayoutParams layoutParamsButton = new LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
layoutParamsButton.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
|
||||
layoutParamsButton.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
|
||||
|
||||
swipeButton.setImageDrawable(enabledDrawable);
|
||||
|
||||
addView(swipeButton, layoutParamsButton);
|
||||
|
||||
active = true;
|
||||
} else {
|
||||
LayoutParams layoutParamsButton = new LayoutParams(collapsedWidth, collapsedHeight);
|
||||
|
||||
layoutParamsButton.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
|
||||
layoutParamsButton.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
|
||||
|
||||
swipeButton.setImageDrawable(disabledDrawable);
|
||||
|
||||
addView(swipeButton, layoutParamsButton);
|
||||
|
||||
active = false;
|
||||
}
|
||||
|
||||
centerText.setPadding((int) innerTextLeftPadding,
|
||||
(int) innerTextTopPadding,
|
||||
(int) innerTextRightPadding,
|
||||
(int) innerTextBottomPadding);
|
||||
|
||||
Drawable buttonBackground = typedArray.getDrawable(R.styleable.SwipeButton_button_background);
|
||||
|
||||
if (buttonBackground != null) {
|
||||
swipeButton.setBackground(buttonBackground);
|
||||
} else {
|
||||
swipeButton.setBackground(ContextCompat.getDrawable(context, R.drawable.shape_rounded_edit));
|
||||
}
|
||||
|
||||
float buttonLeftPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_button_left_padding, 0);
|
||||
float buttonTopPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_button_top_padding, 0);
|
||||
float buttonRightPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_button_right_padding, 0);
|
||||
float buttonBottomPadding = typedArray.getDimension(
|
||||
R.styleable.SwipeButton_button_bottom_padding, 0);
|
||||
|
||||
swipeButton.setPadding((int) buttonLeftPadding,
|
||||
(int) buttonTopPadding,
|
||||
(int) buttonRightPadding,
|
||||
(int) buttonBottomPadding);
|
||||
|
||||
hasActivationState = typedArray.getBoolean(R.styleable.SwipeButton_has_activate_state, true);
|
||||
|
||||
typedArray.recycle();
|
||||
}
|
||||
|
||||
setOnTouchListener(getButtonTouchListener());
|
||||
}
|
||||
|
||||
private OnTouchListener getButtonTouchListener() {
|
||||
return new OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
return !TouchUtils.isTouchOutsideInitialPosition(event, swipeButtonInner);
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
if (initialX == 0) {
|
||||
initialX = swipeButtonInner.getX();
|
||||
}
|
||||
|
||||
if (event.getX() > swipeButtonInner.getWidth() / 2 &&
|
||||
event.getX() + swipeButtonInner.getWidth() / 2 < getWidth()) {
|
||||
swipeButtonInner.setX(event.getX() - swipeButtonInner.getWidth() / 2);
|
||||
centerText.setAlpha(1 - 1.3f * (swipeButtonInner.getX() + swipeButtonInner.getWidth()) / getWidth());
|
||||
setTrailingEffect();
|
||||
}
|
||||
|
||||
if (event.getX() + swipeButtonInner.getWidth() / 2 > getWidth() &&
|
||||
swipeButtonInner.getX() + swipeButtonInner.getWidth() / 2 < getWidth()) {
|
||||
swipeButtonInner.setX(getWidth() - swipeButtonInner.getWidth());
|
||||
}
|
||||
|
||||
if (event.getX() < swipeButtonInner.getWidth() / 2) {
|
||||
swipeButtonInner.setX(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (active) {
|
||||
collapseButton();
|
||||
} else {
|
||||
if (swipeButtonInner.getX() + swipeButtonInner.getWidth() > getWidth() * 0.9) {
|
||||
if (hasActivationState) {
|
||||
expandButton();
|
||||
} else if (onActiveListener != null) {
|
||||
onActiveListener.onActive();
|
||||
moveButtonBack();
|
||||
}
|
||||
} else {
|
||||
moveButtonBack();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void expandButton() {
|
||||
final ValueAnimator positionAnimator =
|
||||
ValueAnimator.ofFloat(swipeButtonInner.getX(), 0);
|
||||
positionAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
float x = (Float) positionAnimator.getAnimatedValue();
|
||||
swipeButtonInner.setX(x);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
final ValueAnimator widthAnimator = ValueAnimator.ofInt(
|
||||
swipeButtonInner.getWidth(),
|
||||
getWidth());
|
||||
|
||||
widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
ViewGroup.LayoutParams params = swipeButtonInner.getLayoutParams();
|
||||
params.width = (Integer) widthAnimator.getAnimatedValue();
|
||||
swipeButtonInner.setLayoutParams(params);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
|
||||
active = true;
|
||||
swipeButtonInner.setImageDrawable(enabledDrawable);
|
||||
|
||||
if (onStateChangeListener != null) {
|
||||
onStateChangeListener.onStateChange(active);
|
||||
}
|
||||
|
||||
if (onActiveListener != null) {
|
||||
onActiveListener.onActive();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
animatorSet.playTogether(positionAnimator, widthAnimator);
|
||||
animatorSet.start();
|
||||
}
|
||||
|
||||
private void moveButtonBack() {
|
||||
final ValueAnimator positionAnimator =
|
||||
ValueAnimator.ofFloat(swipeButtonInner.getX(), 0);
|
||||
positionAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
positionAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
float x = (Float) positionAnimator.getAnimatedValue();
|
||||
swipeButtonInner.setX(x);
|
||||
setTrailingEffect();
|
||||
}
|
||||
});
|
||||
|
||||
positionAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
if (layer != null) {
|
||||
layer.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(
|
||||
centerText, "alpha", 1);
|
||||
|
||||
positionAnimator.setDuration(200);
|
||||
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.playTogether(objectAnimator, positionAnimator);
|
||||
animatorSet.start();
|
||||
}
|
||||
|
||||
private void collapseButton() {
|
||||
int finalWidth;
|
||||
|
||||
if (collapsedWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
|
||||
finalWidth = swipeButtonInner.getHeight();
|
||||
} else {
|
||||
finalWidth = collapsedWidth;
|
||||
}
|
||||
|
||||
final ValueAnimator widthAnimator = ValueAnimator.ofInt(swipeButtonInner.getWidth(), finalWidth);
|
||||
|
||||
widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
ViewGroup.LayoutParams params = swipeButtonInner.getLayoutParams();
|
||||
params.width = (Integer) widthAnimator.getAnimatedValue();
|
||||
swipeButtonInner.setLayoutParams(params);
|
||||
setTrailingEffect();
|
||||
}
|
||||
});
|
||||
|
||||
widthAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
active = false;
|
||||
swipeButtonInner.setImageDrawable(disabledDrawable);
|
||||
if (onStateChangeListener != null) {
|
||||
onStateChangeListener.onStateChange(active);
|
||||
}
|
||||
if (layer != null) {
|
||||
layer.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(
|
||||
centerText, "alpha", 1);
|
||||
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
|
||||
animatorSet.playTogether(objectAnimator, widthAnimator);
|
||||
animatorSet.start();
|
||||
}
|
||||
|
||||
private void setTrailingEffect() {
|
||||
if (trailEnabled) {
|
||||
layer.setVisibility(View.VISIBLE);
|
||||
layer.setLayoutParams(new LayoutParams(
|
||||
(int) (swipeButtonInner.getX() + swipeButtonInner.getWidth() / 3), centerText.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
public void toggleState() {
|
||||
if (isActive()) {
|
||||
collapseButton();
|
||||
} else {
|
||||
expandButton();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package code.name.monkey.retromusic.swipebtn;
|
||||
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
final class TouchUtils {
|
||||
private TouchUtils() {
|
||||
}
|
||||
|
||||
static boolean isTouchOutsideInitialPosition(MotionEvent event, View view) {
|
||||
return event.getX() > view.getX() + view.getWidth();
|
||||
}
|
||||
}
|
|
@ -77,9 +77,6 @@ public abstract class AbsThemeActivity extends ATHToolbarActivity implements Run
|
|||
: ContextCompat.getDrawable(this, R.drawable.square_window);
|
||||
background = TintHelper.createTintedDrawable(background, ThemeStore.primaryColor(this));
|
||||
getWindow().setBackgroundDrawable(background);
|
||||
//View decor = getWindow().getDecorView();
|
||||
//GradientDrawable gradientDrawable = (GradientDrawable) decor.getBackground();
|
||||
//gradientDrawable.setColor(ThemeStore.primaryColor(this));
|
||||
}
|
||||
|
||||
protected void setDrawUnderStatusBar(boolean drawUnderStatusbar) {
|
||||
|
|
|
@ -120,7 +120,7 @@ public abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A extend
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
applyRecyclerViewPaddingForLayoutRes(getRecyclerView(), currentLayoutRes);
|
||||
}
|
||||
|
|
|
@ -12,9 +12,6 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
@ -22,6 +19,7 @@ import code.name.monkey.appthemehelper.ThemeStore;
|
|||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||
import code.name.monkey.retromusic.util.ViewUtil;
|
||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||
|
||||
|
||||
public abstract class AbsLibraryPagerRecyclerViewFragment<A extends RecyclerView.Adapter, LM extends RecyclerView.LayoutManager> extends
|
||||
|
@ -79,7 +77,8 @@ public abstract class AbsLibraryPagerRecyclerViewFragment<A extends RecyclerView
|
|||
}
|
||||
|
||||
private void checkForPadding() {
|
||||
int height = (MusicPlayerRemote.getPlayingQueue().isEmpty() ? getResources().getDimensionPixelSize(R.dimen.mini_player_height) : 0);
|
||||
int height = (MusicPlayerRemote.getPlayingQueue().isEmpty() ? getResources()
|
||||
.getDimensionPixelSize(R.dimen.mini_player_height) : 0);
|
||||
recyclerView.setPadding(0, 0, 0, height);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.model.Album;
|
||||
import code.name.monkey.retromusic.mvp.contract.AlbumContract;
|
||||
|
@ -14,6 +11,7 @@ import code.name.monkey.retromusic.mvp.presenter.AlbumPresenter;
|
|||
import code.name.monkey.retromusic.ui.adapter.album.AlbumAdapter;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AlbumsFragment extends
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager> implements
|
||||
|
@ -125,7 +123,7 @@ public class AlbumsFragment extends
|
|||
public void setMenuVisibility(boolean menuVisible) {
|
||||
super.setMenuVisibility(menuVisible);
|
||||
if (menuVisible) {
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
||||
: R.string.albums);
|
||||
}
|
||||
|
@ -134,7 +132,7 @@ public class AlbumsFragment extends
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.albums);
|
||||
if (getAdapter().getDataSet().isEmpty()) {
|
||||
presenter.subscribe();
|
||||
|
|
|
@ -4,9 +4,6 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.model.Artist;
|
||||
import code.name.monkey.retromusic.mvp.contract.ArtistContract;
|
||||
|
@ -14,6 +11,7 @@ import code.name.monkey.retromusic.mvp.presenter.ArtistPresenter;
|
|||
import code.name.monkey.retromusic.ui.adapter.artist.ArtistAdapter;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ArtistsFragment extends
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager> implements
|
||||
|
@ -129,7 +127,7 @@ public class ArtistsFragment extends
|
|||
public void setMenuVisibility(boolean menuVisible) {
|
||||
super.setMenuVisibility(menuVisible);
|
||||
if (menuVisible) {
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
||||
: R.string.artists);
|
||||
}
|
||||
|
@ -138,7 +136,7 @@ public class ArtistsFragment extends
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.artists);
|
||||
if (getAdapter().getDataSet().isEmpty()) {
|
||||
presenter.subscribe();
|
||||
|
|
|
@ -39,7 +39,7 @@ public class GenreFragment extends
|
|||
public void setMenuVisibility(boolean menuVisible) {
|
||||
super.setMenuVisibility(menuVisible);
|
||||
if (menuVisible) {
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
||||
: R.string.genres);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class GenreFragment extends
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.genres);
|
||||
if (getAdapter().getDataSet().isEmpty()) {
|
||||
mPresenter.subscribe();
|
||||
|
|
|
@ -5,7 +5,9 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.AppBarLayout;
|
||||
import android.support.design.widget.CollapsingToolbarLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
@ -17,11 +19,6 @@ import android.view.MenuItem;
|
|||
import android.view.SubMenu;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.afollestad.materialcab.MaterialCab;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
@ -37,16 +34,13 @@ import code.name.monkey.retromusic.helper.SortOrder;
|
|||
import code.name.monkey.retromusic.interfaces.CabHolder;
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
||||
import code.name.monkey.retromusic.loaders.SongLoader;
|
||||
import code.name.monkey.retromusic.ui.activities.SearchActivity;
|
||||
import code.name.monkey.retromusic.ui.activities.SettingsActivity;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
|
||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||
import code.name.monkey.retromusic.util.RetroUtil;
|
||||
import code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import com.afollestad.materialcab.MaterialCab;
|
||||
|
||||
public class LibraryFragment extends AbsMainActivityFragment implements CabHolder,
|
||||
MainActivityFragmentCallbacks {
|
||||
|
@ -55,10 +49,11 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
private static final String CURRENT_TAB_ID = "current_tab_id";
|
||||
@BindView(R.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
@BindView(R.id.appbar)
|
||||
@BindView(R.id.app_bar)
|
||||
AppBarLayout appbar;
|
||||
@BindView(R.id.collapsing_toolbar)
|
||||
SansFontCollapsingToolbarLayout collapsingToolbar;
|
||||
CollapsingToolbarLayout collapsingToolbarLayout;
|
||||
|
||||
|
||||
private Unbinder unBinder;
|
||||
private MaterialCab cab;
|
||||
|
@ -72,8 +67,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
return fragment;
|
||||
}
|
||||
|
||||
public SansFontCollapsingToolbarLayout getToolbar() {
|
||||
return collapsingToolbar;
|
||||
public void setTitle(@StringRes int name) {
|
||||
collapsingToolbarLayout.setTitle(getString(name));
|
||||
}
|
||||
|
||||
public void addOnAppBarOffsetChangedListener(
|
||||
|
@ -104,9 +99,13 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
setStatusbarColorAuto(view);
|
||||
|
||||
getMainActivity().setBottomBarVisibility(View.VISIBLE);
|
||||
setupToolbar();
|
||||
|
||||
inflateFragment();
|
||||
}
|
||||
|
||||
private void inflateFragment() {
|
||||
if (getArguments() == null) {
|
||||
selectedFragment(SongsFragment.newInstance());
|
||||
return;
|
||||
|
@ -128,15 +127,14 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private void setupToolbar() {
|
||||
//noinspection ConstantConditions
|
||||
int primaryColor = ThemeStore.primaryColor(getContext());
|
||||
appbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setTitle(R.string.library);
|
||||
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
||||
Objects.requireNonNull(getActivity()).setTitle(R.string.app_name);
|
||||
getMainActivity().setTitle(R.string.app_name);
|
||||
getMainActivity().setSupportActionBar(toolbar);
|
||||
}
|
||||
|
||||
|
@ -324,6 +322,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
ToolbarContentTintHelper.handleOnPrepareOptionsMenu(activity, toolbar);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
//if (pager == null) return false;
|
||||
|
@ -343,16 +342,13 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
CreatePlaylistDialog.create().show(getChildFragmentManager(), "CREATE_PLAYLIST");
|
||||
return true;
|
||||
case R.id.action_shuffle_all:
|
||||
//noinspection ConstantConditions
|
||||
SongLoader.getAllSongs(getContext()).subscribeOn(Schedulers.computation())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(songs -> MusicPlayerRemote.openAndShuffleQueue(songs, true));
|
||||
MusicPlayerRemote.openAndShuffleQueue(SongLoader.getAllSongs(getContext())
|
||||
.blockingFirst(), true);
|
||||
return true;
|
||||
case R.id.action_search:
|
||||
startActivity(new Intent(getActivity(), SearchActivity.class));
|
||||
return true;
|
||||
NavigationUtil.goToSearch(getMainActivity());
|
||||
break;
|
||||
case R.id.action_equalizer:
|
||||
//noinspection ConstantConditions
|
||||
NavigationUtil.openEqualizer(getActivity());
|
||||
return true;
|
||||
case R.id.action_sleep_timer:
|
||||
|
@ -367,6 +363,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
private void setUpGridSizeMenu(
|
||||
@NonNull AbsLibraryPagerRecyclerViewCustomGridSizeFragment fragment,
|
||||
@NonNull SubMenu gridSizeMenu) {
|
||||
|
|
|
@ -54,14 +54,14 @@ public class PlaylistsFragment extends AbsLibraryPagerRecyclerViewFragment<Playl
|
|||
public void setMenuVisibility(boolean menuVisible) {
|
||||
super.setMenuVisibility(menuVisible);
|
||||
if (menuVisible) {
|
||||
getLibraryFragment().getToolbar().setTitle(PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.playlists);
|
||||
getLibraryFragment().setTitle(PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.playlists);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLibraryFragment().getToolbar().setTitle(PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.playlists);
|
||||
getLibraryFragment().setTitle(PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.playlists);
|
||||
if (getAdapter().getDataSet().isEmpty()) {
|
||||
presenter.subscribe();
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.model.Song;
|
||||
import code.name.monkey.retromusic.mvp.contract.SongContract;
|
||||
|
@ -13,7 +12,6 @@ import code.name.monkey.retromusic.ui.adapter.song.ShuffleButtonSongAdapter;
|
|||
import code.name.monkey.retromusic.ui.adapter.song.SongAdapter;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
|
@ -21,7 +19,6 @@ public class SongsFragment extends
|
|||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager> implements
|
||||
SongContract.SongView {
|
||||
|
||||
private static final String TAG = "Songs";
|
||||
private SongPresenter presenter;
|
||||
|
||||
public SongsFragment() {
|
||||
|
@ -118,7 +115,7 @@ public class SongsFragment extends
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.songs);
|
||||
if (getAdapter().getDataSet().isEmpty()) {
|
||||
presenter.subscribe();
|
||||
|
@ -129,7 +126,7 @@ public class SongsFragment extends
|
|||
public void setMenuVisibility(boolean menuVisible) {
|
||||
super.setMenuVisibility(menuVisible);
|
||||
if (menuVisible) {
|
||||
getLibraryFragment().getToolbar().setTitle(
|
||||
getLibraryFragment().setTitle(
|
||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
||||
: R.string.songs);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
@ -31,6 +32,8 @@ import butterknife.Unbinder;
|
|||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||
|
@ -82,6 +85,8 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
CoordinatorLayout coordinatorLayout;
|
||||
@BindView(R.id.container)
|
||||
View container;
|
||||
@BindView(R.id.title)
|
||||
TextView title;
|
||||
@BindView(android.R.id.empty)
|
||||
View empty;
|
||||
@BindView(R.id.toolbar)
|
||||
|
@ -90,10 +95,10 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
BreadCrumbLayout breadCrumbs;
|
||||
@BindView(R.id.appbar)
|
||||
AppBarLayout appbar;
|
||||
@BindView(R.id.status_bar)
|
||||
View statusBar;
|
||||
|
||||
@BindView(R.id.recycler_view)
|
||||
FastScrollRecyclerView recyclerView;
|
||||
|
||||
Comparator<File> fileComparator = (lhs, rhs) -> {
|
||||
if (lhs.isDirectory() && !rhs.isDirectory()) {
|
||||
return -1;
|
||||
|
@ -207,7 +212,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
setStatusbarColorAuto(view);
|
||||
getMainActivity().getSlidingUpPanelLayout().setShadowHeight(0);
|
||||
|
||||
getMainActivity().setBottomBarVisibility(View.GONE);
|
||||
|
||||
setUpAppbarColor();
|
||||
|
@ -215,24 +219,29 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
setUpBreadCrumbs();
|
||||
setUpRecyclerView();
|
||||
setUpAdapter();
|
||||
ViewUtil.setStatusBarHeight(getContext(), statusBar);
|
||||
|
||||
}
|
||||
|
||||
private void setUpAppbarColor() {
|
||||
//noinspection ConstantConditions
|
||||
int primaryColor = ThemeStore.primaryColor(getActivity());
|
||||
appbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setBackgroundColor(primaryColor);
|
||||
TintHelper.setTintAuto(container, primaryColor, true);
|
||||
appbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
||||
toolbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
||||
//breadCrumbs.setBackgroundColor(primaryColor);
|
||||
breadCrumbs.setActivatedContentColor(
|
||||
ToolbarContentTintHelper.toolbarTitleColor(getActivity(), primaryColor));
|
||||
ToolbarContentTintHelper
|
||||
.toolbarTitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
||||
breadCrumbs.setDeactivatedContentColor(
|
||||
ToolbarContentTintHelper.toolbarSubtitleColor(getActivity(), primaryColor));
|
||||
ToolbarContentTintHelper
|
||||
.toolbarSubtitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
||||
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity()
|
||||
.setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
||||
}
|
||||
|
||||
private void setUpToolbar() {
|
||||
//noinspection ConstantConditions
|
||||
title.setTextColor(ThemeStore.textColorPrimary(getContext()));
|
||||
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||
//noinspection ConstantConditions
|
||||
getActivity().setTitle(R.string.folders);
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package code.name.monkey.retromusic.ui.fragments.mainactivity.home;
|
||||
|
||||
import static code.name.monkey.retromusic.Constants.USER_BANNER;
|
||||
import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
|
@ -23,6 +20,15 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
@ -55,15 +61,12 @@ import code.name.monkey.retromusic.util.PreferenceUtil;
|
|||
import code.name.monkey.retromusic.util.RetroUtil;
|
||||
import code.name.monkey.retromusic.views.CircularImageView;
|
||||
import code.name.monkey.retromusic.views.MetalRecyclerViewPager;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
|
||||
import static code.name.monkey.retromusic.Constants.USER_BANNER;
|
||||
import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
||||
|
||||
public class HomeFragment extends AbsMainActivityFragment implements MainActivityFragmentCallbacks,
|
||||
HomeContract.HomeView {
|
||||
|
|
|
@ -16,20 +16,19 @@ import android.view.animation.LinearInterpolator;
|
|||
import android.widget.ImageButton;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.Unbinder;
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper;
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener;
|
||||
import code.name.monkey.retromusic.service.MusicService;
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment;
|
||||
import code.name.monkey.retromusic.util.MusicUtil;
|
||||
|
@ -41,6 +40,7 @@ import code.name.monkey.retromusic.views.PlayPauseDrawable;
|
|||
*/
|
||||
|
||||
public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
||||
|
||||
@BindView(R.id.player_play_pause_button)
|
||||
ImageButton playPauseFab;
|
||||
@BindView(R.id.player_prev_button)
|
||||
|
@ -216,7 +216,8 @@ public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
if (fromUser) {
|
||||
MusicPlayerRemote.seekTo(progress);
|
||||
onUpdateProgressViews(MusicPlayerRemote.getSongProgressMillis(), MusicPlayerRemote.getSongDurationMillis());
|
||||
onUpdateProgressViews(MusicPlayerRemote.getSongProgressMillis(),
|
||||
MusicPlayerRemote.getSongDurationMillis());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -285,17 +286,27 @@ public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
}
|
||||
|
||||
if (PreferenceUtil.getInstance(getContext()).getAdaptiveColor()) {
|
||||
TintHelper.setTintAuto(playPauseFab, MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(dark)), false);
|
||||
TintHelper.setTintAuto(playPauseFab,
|
||||
MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(dark)),
|
||||
false);
|
||||
TintHelper.setTintAuto(playPauseFab, dark, true);
|
||||
setProgressBarColor(progressSlider, dark);
|
||||
setProgressBarColor(dark);
|
||||
} else {
|
||||
int accentColor = ThemeStore.accentColor(getContext());
|
||||
setProgressBarColor(accentColor);
|
||||
TintHelper.setTintAuto(playPauseFab,
|
||||
MaterialValueHelper
|
||||
.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(accentColor)),
|
||||
false);
|
||||
TintHelper.setTintAuto(playPauseFab, accentColor, true);
|
||||
}
|
||||
updateRepeatState();
|
||||
updateShuffleState();
|
||||
updatePrevNextColor();
|
||||
}
|
||||
|
||||
public void setProgressBarColor(SeekBar progressBar, int newColor) {
|
||||
LayerDrawable ld = (LayerDrawable) progressBar.getProgressDrawable();
|
||||
public void setProgressBarColor(int newColor) {
|
||||
LayerDrawable ld = (LayerDrawable) progressSlider.getProgressDrawable();
|
||||
ClipDrawable clipDrawable = (ClipDrawable) ld.findDrawableByLayerId(android.R.id.progress);
|
||||
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
@ -303,7 +314,8 @@ public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
private void setUpPlayPauseFab() {
|
||||
playerFabPlayPauseDrawable = new PlayPauseDrawable(getActivity());
|
||||
|
||||
playPauseFab.setImageDrawable(playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called
|
||||
playPauseFab.setImageDrawable(
|
||||
playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called
|
||||
//playPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN);
|
||||
//playPauseFab.setOnClickListener(new PlayPauseButtonOnClickHandler());
|
||||
playPauseFab.post(() -> {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package code.name.monkey.retromusic.ui.fragments.player.simple;
|
||||
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.ClipDrawable;
|
||||
import android.graphics.drawable.LayerDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
@ -12,9 +10,7 @@ import android.view.ViewGroup;
|
|||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
@ -39,6 +35,7 @@ import code.name.monkey.retromusic.views.PlayPauseDrawable;
|
|||
*/
|
||||
|
||||
public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
||||
|
||||
@BindView(R.id.player_play_pause_button)
|
||||
ImageButton playPauseFab;
|
||||
@BindView(R.id.player_prev_button)
|
||||
|
@ -101,7 +98,8 @@ public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_simple_controls_fragment, container, false);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
return view;
|
||||
|
@ -123,7 +121,8 @@ public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
setUpMusicControllers();
|
||||
volumeContainer.setVisibility(PreferenceUtil.getInstance(getContext()).getVolumeToggle() ? View.VISIBLE : View.GONE);
|
||||
volumeContainer.setVisibility(
|
||||
PreferenceUtil.getInstance(getContext()).getVolumeToggle() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void setUpMusicControllers() {
|
||||
|
@ -257,7 +256,8 @@ public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
|
||||
@Override
|
||||
public void onUpdateProgressViews(int progress, int total) {
|
||||
songCurrentProgress.setText(String.format("%s / %s", MusicUtil.getReadableDurationString(progress),
|
||||
songCurrentProgress
|
||||
.setText(String.format("%s / %s", MusicUtil.getReadableDurationString(progress),
|
||||
MusicUtil.getReadableDurationString(total)));
|
||||
}
|
||||
|
||||
|
@ -277,11 +277,19 @@ public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
}
|
||||
|
||||
if (PreferenceUtil.getInstance(getContext()).getAdaptiveColor()) {
|
||||
TintHelper.setTintAuto(playPauseFab, MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(dark)), false);
|
||||
TintHelper.setTintAuto(playPauseFab,
|
||||
MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(dark)),
|
||||
false);
|
||||
TintHelper.setTintAuto(playPauseFab, dark, true);
|
||||
text.setTextColor(dark);
|
||||
} else {
|
||||
text.setTextColor(ThemeStore.accentColor(getContext()));
|
||||
int accentColor = ThemeStore.accentColor(getContext());
|
||||
text.setTextColor(accentColor);
|
||||
TintHelper.setTintAuto(playPauseFab,
|
||||
MaterialValueHelper
|
||||
.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(accentColor)),
|
||||
false);
|
||||
TintHelper.setTintAuto(playPauseFab, accentColor, true);
|
||||
}
|
||||
|
||||
updateRepeatState();
|
||||
|
@ -289,16 +297,11 @@ public class SimplePlaybackControlsFragment extends AbsPlayerControlsFragment {
|
|||
updatePrevNextColor();
|
||||
}
|
||||
|
||||
public void setProgressBarColor(SeekBar progressBar, int newColor) {
|
||||
LayerDrawable ld = (LayerDrawable) progressBar.getProgressDrawable();
|
||||
ClipDrawable clipDrawable = (ClipDrawable) ld.findDrawableByLayerId(android.R.id.progress);
|
||||
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
private void setUpPlayPauseFab() {
|
||||
playerFabPlayPauseDrawable = new PlayPauseDrawable(getActivity());
|
||||
|
||||
playPauseFab.setImageDrawable(playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called
|
||||
playPauseFab.setImageDrawable(
|
||||
playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called
|
||||
//playPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN);
|
||||
//playPauseFab.setOnClickListener(new PlayPauseButtonOnClickHandler());
|
||||
playPauseFab.post(() -> {
|
||||
|
|
|
@ -87,18 +87,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_typedef_file" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_zip" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/consumer_proguard_file" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/intermediate-jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_and_local_jars_jni" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged_res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/platform_r_txt" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/public_res" />
|
||||
|
@ -111,7 +108,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 27 Platform (1)" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
|
||||
|
|
|
@ -7,7 +7,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0-alpha15'
|
||||
classpath 'com.android.tools.build:gradle:3.2.0-alpha18'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
#Mon May 14 20:13:41 IST 2018
|
||||
#Fri Jul 27 20:58:25 IST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
@ -6,42 +6,6 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
@ -60,6 +24,46 @@ cd "`dirname \"$PRG\"`/" >/dev/null
|
|||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
@ -85,7 +89,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -150,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
|
@ -46,10 +46,9 @@ echo location of your Java installation.
|
|||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
|||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# This API key is provided for convenience. Please go to https://www.last.fm/api/account/create and create your own.
|
||||
|
||||
GOOGLE_PLAY_LICENSE_KEY = MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnWuCg0k+BBB25J7vZUZeTf5sxzSzJhXLdyj9zRKr2k0Xf/RNAmqSXTfshQiP5dZyTeJ+cpRP4xeKijW66/bTwKgH3h0x48pgn7tQMIEdH9KaZUlPzHH9pcp+N9iJlKhX+vacZUpbnlOp0PjrJXP1Xg6gz1gs3nMDhX1z5Tr4vPKd+Wf7E3tyTc15jpfqSKSzqYzIlT4VFdcmLcPypCwRzgRzWOGqj3/oz8rxLCQ4bxtDHwtZhHAz/N6go5oZodpfrA2ETiyeNsqta2Xmwt38CyYukSQ+eYJ2irZ5wqnr1iN9duzZRfMi7id+tgC8iwicDSanUiYFt/r43C0UkGNx6wIDAQAB
|
||||
LASTFM_API_KEY=206993ea109315882749d5bc7b2e704d
|
||||
LASTFM_API_KEY_NEW=17c9e96bc741842d7fc84d3961a25a04
|
Loading…
Reference in New Issue