Added floating labels to all EditTexts. Added accent color in parent themes so EditTexts no longer use the material green as indicator. An artist's albums are now sorted by year.

This commit is contained in:
Karim Abou Zeid 2015-05-31 15:59:44 +02:00
commit ed9524a25d
7 changed files with 107 additions and 151 deletions

View file

@ -2,9 +2,9 @@ package com.kabouzeid.gramophone.ui.activities;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.MenuItemCompat;
@ -17,7 +17,6 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import com.afollestad.materialdialogs.ThemeSingleton;
import com.kabouzeid.gramophone.R;
import com.kabouzeid.gramophone.adapter.SearchAdapter;
import com.kabouzeid.gramophone.ui.activities.base.AbsBaseActivity;
@ -93,13 +92,8 @@ public class SearchActivity extends AbsBaseActivity {
View searchViewPlate = searchView.findViewById(android.support.v7.appcompat.R.id.search_plate);
Drawable drawable = ContextCompat.getDrawable(this, R.drawable.abc_textfield_search_activated_mtrl_alpha);
drawable.setColorFilter(ThemeSingleton.get().widgetColor, PorterDuff.Mode.SRC_IN);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
searchViewPlate.setBackground(drawable);
} else {
//noinspection deprecation
searchViewPlate.setBackgroundDrawable(drawable);
}
drawable.setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.SRC_IN);
searchViewPlate.setBackground(drawable);
ActionBar.LayoutParams params = new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.MATCH_PARENT);
searchView.setLayoutParams(params);

View file

@ -201,7 +201,7 @@ public final class PreferenceUtils {
public final String getArtistAlbumSortOrder() {
return mPreferences.getString(ARTIST_ALBUM_SORT_ORDER,
SortOrder.ArtistAlbumSortOrder.ALBUM_A_Z);
SortOrder.ArtistAlbumSortOrder.ALBUM_YEAR);
}
// public void setAlbumSortOrder(final String value) {