Merge pull request #204 from NoodleMage/svg_all_the_way

Converted all icon drawables to vector + Removed Android-Iconics library.
This commit is contained in:
inorichi 2016-03-08 00:47:26 +01:00
commit 0ddbfd1036
244 changed files with 381 additions and 41 deletions

View File

@ -158,9 +158,6 @@ dependencies {
transitive = true transitive = true
} }
// Google material icons SVG.
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') { compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') {
transitive = true transitive = true
} }

View File

@ -288,7 +288,7 @@ class LibraryUpdateService : Service() {
setContentTitle(manga.title) setContentTitle(manga.title)
setProgress(total, current, false) setProgress(total, current, false)
setOngoing(true) setOngoing(true)
addAction(R.drawable.ic_clear, getString(R.string.action_cancel), cancelIntent) addAction(R.drawable.ic_clear_black_24dp, getString(R.string.action_cancel), cancelIntent)
} }
notificationManager.notify(UPDATE_NOTIFICATION_ID, n) notificationManager.notify(UPDATE_NOTIFICATION_ID, n)
} }

View File

@ -4,13 +4,14 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.AppBarLayout; import android.support.design.widget.AppBarLayout;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.materialdrawer.Drawer; import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.DrawerBuilder; import com.mikepenz.materialdrawer.DrawerBuilder;
import com.mikepenz.materialdrawer.holder.ImageHolder;
import com.mikepenz.materialdrawer.model.DividerDrawerItem; import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem; import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
@ -35,6 +36,7 @@ public class MainActivity extends BaseActivity {
int selectedItem; int selectedItem;
private Drawer drawer; private Drawer drawer;
private FragmentStack fragmentStack; private FragmentStack fragmentStack;
private int prevIdentifier = -1;
@Override @Override
protected void onCreate(Bundle savedState) { protected void onCreate(Bundle savedState) {
@ -73,42 +75,50 @@ public class MainActivity extends BaseActivity {
new PrimaryDrawerItem() new PrimaryDrawerItem()
.withName(R.string.label_library) .withName(R.string.label_library)
.withIdentifier(R.id.nav_drawer_library) .withIdentifier(R.id.nav_drawer_library)
.withIcon(GoogleMaterial.Icon.gmd_book), .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_book_grey_24dp)),
new PrimaryDrawerItem() new PrimaryDrawerItem()
.withName(R.string.label_recent_updates) .withName(R.string.label_recent_updates)
.withIdentifier(R.id.nav_drawer_recent_updates) .withIdentifier(R.id.nav_drawer_recent_updates)
.withIcon(GoogleMaterial.Icon.gmd_update), .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_history_grey_24dp)),
new PrimaryDrawerItem() new PrimaryDrawerItem()
.withName(R.string.label_catalogues) .withName(R.string.label_catalogues)
.withIdentifier(R.id.nav_drawer_catalogues) .withIdentifier(R.id.nav_drawer_catalogues)
.withIcon(GoogleMaterial.Icon.gmd_explore), .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_explore_grey_24dp)),
new PrimaryDrawerItem() new PrimaryDrawerItem()
.withName(R.string.label_download_queue) .withName(R.string.label_download_queue)
.withIdentifier(R.id.nav_drawer_downloads) .withIdentifier(R.id.nav_drawer_downloads)
.withIcon(GoogleMaterial.Icon.gmd_file_download), .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_file_download_grey_24dp)),
new DividerDrawerItem(), new DividerDrawerItem(),
new PrimaryDrawerItem() new PrimaryDrawerItem()
.withName(R.string.label_settings) .withName(R.string.label_settings)
.withIdentifier(R.id.nav_drawer_settings) .withIdentifier(R.id.nav_drawer_settings)
.withSelectable(false) .withSelectable(false)
.withIcon(GoogleMaterial.Icon.gmd_settings) .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_settings_grey_24dp))
) )
.withSavedInstance(savedState) .withSavedInstance(savedState)
.withOnDrawerItemClickListener( .withOnDrawerItemClickListener(
(view, position, drawerItem) -> { (view, position, drawerItem) -> {
if (drawerItem != null) { if (drawerItem != null) {
int identifier = drawerItem.getIdentifier(); int identifier = drawerItem.getIdentifier();
if (prevIdentifier != -1)
setIconBackToGrey(prevIdentifier, identifier);
prevIdentifier = identifier;
switch (identifier) { switch (identifier) {
case R.id.nav_drawer_library: case R.id.nav_drawer_library:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_book_blue_24dp)));
setFragment(LibraryFragment.newInstance()); setFragment(LibraryFragment.newInstance());
break; break;
case R.id.nav_drawer_recent_updates: case R.id.nav_drawer_recent_updates:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_history_blue_24dp)));
setFragment(RecentChaptersFragment.newInstance()); setFragment(RecentChaptersFragment.newInstance());
break; break;
case R.id.nav_drawer_catalogues: case R.id.nav_drawer_catalogues:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_explore_blue_24dp)));
setFragment(CatalogueFragment.newInstance()); setFragment(CatalogueFragment.newInstance());
break; break;
case R.id.nav_drawer_downloads: case R.id.nav_drawer_downloads:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_file_download_blue_24dp)));
setFragment(DownloadFragment.newInstance()); setFragment(DownloadFragment.newInstance());
break; break;
case R.id.nav_drawer_settings: case R.id.nav_drawer_settings:
@ -135,6 +145,27 @@ public class MainActivity extends BaseActivity {
} }
} }
private void setIconBackToGrey(int prevIdentifier, int identifier) {
// Don't set to grey when settings
if (identifier == R.id.nav_drawer_settings)
return;
switch (prevIdentifier) {
case R.id.nav_drawer_library:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_book_grey_24dp)));
break;
case R.id.nav_drawer_recent_updates:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_history_grey_24dp)));
break;
case R.id.nav_drawer_catalogues:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_explore_grey_24dp)));
break;
case R.id.nav_drawer_downloads:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_file_download_grey_24dp)));
break;
}
}
@Override @Override
protected void onSaveInstanceState(Bundle outState) { protected void onSaveInstanceState(Bundle outState) {
selectedItem = drawer.getCurrentSelection(); selectedItem = drawer.getCurrentSelection();

View File

@ -191,9 +191,9 @@ public class ReaderMenu {
.subscribe(value -> { .subscribe(value -> {
boolean isPortrait = activity.getResources().getConfiguration() boolean isPortrait = activity.getResources().getConfiguration()
.orientation == Configuration.ORIENTATION_PORTRAIT; .orientation == Configuration.ORIENTATION_PORTRAIT;
int resourceId = value == 1 ? R.drawable.ic_screen_rotation : isPortrait ? int resourceId = value == 1 ? R.drawable.ic_screen_rotation_white_24dp : isPortrait ?
R.drawable.ic_screen_lock_portrait : R.drawable.ic_screen_lock_portrait_white_24dp :
R.drawable.ic_screen_lock_landscape; R.drawable.ic_screen_lock_landscape_white_24dp;
lockOrientation.setImageResource(resourceId); lockOrientation.setImageResource(resourceId);
})); }));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Some files were not shown because too many files have changed in this diff Show More