diff --git a/app/build.gradle b/app/build.gradle index 3a33fc0f9..63fcd4d96 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -154,10 +154,6 @@ dependencies { apt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_VERSION" provided 'org.glassfish:javax.annotation:10.0-b28' - compile('com.mikepenz:materialdrawer:4.6.4@aar') { - transitive = true - } - compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') { transitive = true } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a6bdb7cdf..8bf4d710e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,8 @@ android:hardwareAccelerated="true" android:theme="@style/AppTheme" > + android:name=".ui.main.MainActivity" + android:theme="@style/AppTheme.BrandedLaunch"> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt index 3193ed983..1a8a5e3d9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt @@ -24,6 +24,7 @@ import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.EndlessGridScrollListener import eu.kanade.tachiyomi.widget.EndlessListScrollListener import kotlinx.android.synthetic.main.fragment_catalogue.* +import kotlinx.android.synthetic.main.toolbar.* import nucleus.factory.RequiresPresenter import rx.Subscription import rx.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt index 8503603db..659092e13 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt @@ -28,7 +28,7 @@ class CatalogueGridHolder(private val view: View, adapter: CatalogueAdapter, lis view.title.text = manga.title // Set visibility of in library icon. - view.favorite_sticker.visibility = if (manga.favorite) View.VISIBLE else View.GONE +// view.favorite_sticker.visibility = if (manga.favorite) View.VISIBLE else View.GONE // Set alpha of thumbnail. view.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadFragment.kt index 05094dd84..fd6436062 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadFragment.kt @@ -7,6 +7,9 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment +import eu.kanade.tachiyomi.ui.main.MainActivity +import eu.kanade.tachiyomi.util.setInformationDrawable +import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.fragment_download_queue.* import nucleus.factory.RequiresPresenter import rx.Subscription @@ -73,6 +76,9 @@ class DownloadFragment : BaseRxFragment() { override fun onViewCreated(view: View, savedState: Bundle?) { setToolbarTitle(R.string.label_download_queue) + // Check if download queue is empty and update information accordingly. + setInformationView() + // Initialize adapter. adapter = DownloadAdapter(activity) recycler.adapter = adapter @@ -138,6 +144,9 @@ class DownloadFragment : BaseRxFragment() { startButton?.isVisible = !running && !presenter.downloadQueue.isEmpty() pauseButton?.isVisible = running clearButton?.isVisible = running + + // Check if download queue is empty and update information accordingly. + setInformationView() } /** @@ -177,4 +186,14 @@ class DownloadFragment : BaseRxFragment() { return recycler.findViewHolderForItemId(download.chapter.id) as? DownloadHolder } + /** + * Set information view when queue is empty + */ + private fun setInformationView() { + if (presenter.downloadQueue.isEmpty()) { + ( activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_file_download_grey_128dp) + ( activity as MainActivity).text_label.text = getString(R.string.information_no_downloads) + } + } + } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt index ff2c0d75d..102923465 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt @@ -20,7 +20,9 @@ import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.category.CategoryActivity import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.util.inflate +import eu.kanade.tachiyomi.util.setInformationDrawable import eu.kanade.tachiyomi.util.toast +import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.fragment_library.* import nucleus.factory.RequiresPresenter import org.greenrobot.eventbus.EventBus @@ -124,7 +126,7 @@ class LibraryFragment : BaseRxFragment(), ActionMode.Callback override fun onViewCreated(view: View, savedState: Bundle?) { setToolbarTitle(getString(R.string.label_library)) - appBar = (activity as MainActivity).appBar + appBar = (activity as MainActivity).appbar tabs = appBar.inflate(R.layout.library_tab_layout) as TabLayout // Workaround to prevent: Tab belongs to a different TabLayout. @@ -257,6 +259,15 @@ class LibraryFragment : BaseRxFragment(), ActionMode.Callback * @param mangaMap a map containing the manga for each category. */ fun onNextLibraryUpdate(categories: List, mangaMap: Map>) { + // Check if library is empty and update information accordingly. + if (mangaMap.isEmpty()) { + (activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_book_grey_128dp) + (activity as MainActivity).text_label.text = getString(R.string.information_empty_library) + } else { + ( activity as MainActivity).image_view.setInformationDrawable(null) + ( activity as MainActivity).text_label.text = "" + } + // Get the current active category. val activeCat = if (adapter.categories != null) view_pager.currentItem else activeCategory diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.java b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.java deleted file mode 100644 index b54223eb7..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.java +++ /dev/null @@ -1,220 +0,0 @@ -package eu.kanade.tachiyomi.ui.main; - -import android.content.Intent; -import android.os.Bundle; -import android.support.design.widget.AppBarLayout; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.widget.Toolbar; -import android.widget.FrameLayout; - -import com.mikepenz.materialdrawer.Drawer; -import com.mikepenz.materialdrawer.DrawerBuilder; -import com.mikepenz.materialdrawer.holder.ImageHolder; -import com.mikepenz.materialdrawer.model.DividerDrawerItem; -import com.mikepenz.materialdrawer.model.PrimaryDrawerItem; - -import butterknife.Bind; -import butterknife.ButterKnife; -import eu.kanade.tachiyomi.R; -import eu.kanade.tachiyomi.ui.base.activity.BaseActivity; -import eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment; -import eu.kanade.tachiyomi.ui.download.DownloadFragment; -import eu.kanade.tachiyomi.ui.library.LibraryFragment; -import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment; -import eu.kanade.tachiyomi.ui.setting.SettingsActivity; -import icepick.State; -import nucleus.view.ViewWithPresenter; - -public class MainActivity extends BaseActivity { - - @Bind(R.id.appbar) AppBarLayout appBar; - @Bind(R.id.toolbar) Toolbar toolbar; - @Bind(R.id.drawer_container) FrameLayout container; - @State - int selectedItem; - private Drawer drawer; - private FragmentStack fragmentStack; - private int prevIdentifier = -1; - - @Override - protected void onCreate(Bundle savedState) { - super.onCreate(savedState); - - // Do not let the launcher create a new activity - if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) { - finish(); - return; - } - - setContentView(R.layout.activity_main); - ButterKnife.bind(this); - - setupToolbar(toolbar); - - fragmentStack = new FragmentStack(this, getSupportFragmentManager(), R.id.content_layout, - fragment -> { - if (fragment instanceof ViewWithPresenter) - ((ViewWithPresenter) fragment).getPresenter().destroy(); - }); - - drawer = new DrawerBuilder() - .withActivity(this) - .withRootView(container) - .withToolbar(toolbar) - .withActionBarDrawerToggleAnimated(true) - .withOnDrawerNavigationListener(view -> { - if (fragmentStack.size() > 1) { - onBackPressed(); - return true; - } - return false; - }) - .addDrawerItems( - new PrimaryDrawerItem() - .withName(R.string.label_library) - .withIdentifier(R.id.nav_drawer_library) - .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_book_grey_24dp)), - new PrimaryDrawerItem() - .withName(R.string.label_recent_updates) - .withIdentifier(R.id.nav_drawer_recent_updates) - .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_history_grey_24dp)), - new PrimaryDrawerItem() - .withName(R.string.label_catalogues) - .withIdentifier(R.id.nav_drawer_catalogues) - .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_explore_grey_24dp)), - new PrimaryDrawerItem() - .withName(R.string.label_download_queue) - .withIdentifier(R.id.nav_drawer_downloads) - .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_file_download_grey_24dp)), - new DividerDrawerItem(), - new PrimaryDrawerItem() - .withName(R.string.label_settings) - .withIdentifier(R.id.nav_drawer_settings) - .withSelectable(false) - .withIcon(ContextCompat.getDrawable(this, R.drawable.ic_settings_grey_24dp)) - ) - .withSavedInstance(savedState) - .withOnDrawerItemClickListener( - (view, position, drawerItem) -> { - if (drawerItem != null) { - int identifier = drawerItem.getIdentifier(); - if (prevIdentifier != -1) - setIconBackToGrey(prevIdentifier, identifier); - prevIdentifier = identifier; - - switch (identifier) { - case R.id.nav_drawer_library: - drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_book_blue_24dp))); - setFragment(LibraryFragment.newInstance()); - break; - case R.id.nav_drawer_recent_updates: - drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_history_blue_24dp))); - setFragment(RecentChaptersFragment.newInstance()); - break; - case R.id.nav_drawer_catalogues: - drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_explore_blue_24dp))); - setFragment(CatalogueFragment.newInstance()); - break; - case R.id.nav_drawer_downloads: - drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_file_download_blue_24dp))); - setFragment(DownloadFragment.newInstance()); - break; - case R.id.nav_drawer_settings: - startActivity(new Intent(this, SettingsActivity.class)); - break; - } - } - return false; - } - ) - .build(); - - if (savedState != null) { - // Recover icon state after rotation - if (fragmentStack.size() > 1) { - showBackArrow(); - } - - // Set saved selection - drawer.setSelection(selectedItem, false); - } else { - // Set default selection - drawer.setSelection(R.id.nav_drawer_library); - } - } - - 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 - protected void onSaveInstanceState(Bundle outState) { - selectedItem = drawer.getCurrentSelection(); - super.onSaveInstanceState(outState); - } - - public void setFragment(Fragment fragment) { - fragmentStack.replace(fragment); - } - - public void pushFragment(Fragment fragment) { - fragmentStack.push(fragment); - if (fragmentStack.size() > 1) { - showBackArrow(); - } - } - - @Override - public void onBackPressed() { - if (!fragmentStack.pop()) { - super.onBackPressed(); - } else if (fragmentStack.size() == 1) { - showHamburgerIcon(); - drawer.getActionBarDrawerToggle().syncState(); - } - } - - private void showHamburgerIcon() { - if (getSupportActionBar() != null) { - getSupportActionBar().setDisplayHomeAsUpEnabled(false); - drawer.getActionBarDrawerToggle().setDrawerIndicatorEnabled(true); - drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); - } - } - - private void showBackArrow() { - if (getSupportActionBar() != null) { - drawer.getActionBarDrawerToggle().setDrawerIndicatorEnabled(false); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); - } - } - - public Toolbar getToolbar() { - return toolbar; - } - - public AppBarLayout getAppBar() { - return appBar; - } - -} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt new file mode 100644 index 000000000..770ef5d32 --- /dev/null +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -0,0 +1,101 @@ +package eu.kanade.tachiyomi.ui.main + +import android.content.Intent +import android.os.Bundle +import android.support.v4.app.Fragment +import android.support.v4.view.GravityCompat +import android.view.MenuItem +import eu.kanade.tachiyomi.R +import eu.kanade.tachiyomi.ui.base.activity.BaseActivity +import eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment +import eu.kanade.tachiyomi.ui.download.DownloadFragment +import eu.kanade.tachiyomi.ui.library.LibraryFragment +import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment +import eu.kanade.tachiyomi.ui.setting.SettingsActivity +import eu.kanade.tachiyomi.util.setInformationDrawable +import kotlinx.android.synthetic.main.activity_main.* +import kotlinx.android.synthetic.main.toolbar.* +import nucleus.view.ViewWithPresenter + +class MainActivity : BaseActivity() { + lateinit var fragmentStack: FragmentStack + + + override fun onCreate(savedState: Bundle?) { + setTheme(R.style.AppTheme); + super.onCreate(savedState) + + // Do not let the launcher create a new activity + if (intent.flags and Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT != 0) { + finish() + return + } + + // Inflate activity_edit_categories.xml. + setContentView(R.layout.activity_main) + + // Handle Toolbar + setupToolbar(toolbar) + supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp) + + fragmentStack = FragmentStack(this, supportFragmentManager, R.id.frame_container + ) { fragment -> + if (fragment is ViewWithPresenter<*>) + fragment.presenter.destroy() + } + + // Set behavior of Navigation drawer + nav_view.setNavigationItemSelectedListener( + { menuItem -> + // Make information view invisible + image_view.setInformationDrawable(null) + text_label.text = "" + + when (menuItem.itemId) { + R.id.nav_drawer_library -> { + setFragment(LibraryFragment.newInstance()) + menuItem.isChecked = true + drawer.closeDrawer(GravityCompat.START) + } + R.id.nav_drawer_recent_updates -> { + setFragment(RecentChaptersFragment.newInstance()) + menuItem.isChecked = true + drawer.closeDrawer(GravityCompat.START) + } + R.id.nav_drawer_catalogues -> { + setFragment(CatalogueFragment.newInstance()) + menuItem.isChecked = true + drawer.closeDrawer(GravityCompat.START) + } + R.id.nav_drawer_downloads -> { + setFragment(DownloadFragment.newInstance()) + menuItem.isChecked = true + drawer.closeDrawer(GravityCompat.START) + } + R.id.nav_drawer_settings -> { + menuItem.isChecked = true + startActivity(Intent(this, SettingsActivity::class.java)) + drawer.closeDrawer(GravityCompat.START) + } + } + true + }) + + setFragment(LibraryFragment.newInstance()) + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + android.R.id.home -> { + drawer.openDrawer(GravityCompat.START) + return true + } + } + return super.onOptionsItemSelected(item) + } + + + fun setFragment(fragment: Fragment) { + fragmentStack.replace(fragment) + } +} diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt index c83eff48b..ac7d9e8a9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt @@ -15,7 +15,10 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment +import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity +import eu.kanade.tachiyomi.util.setInformationDrawable +import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.fragment_recent_chapters.* import nucleus.factory.RequiresPresenter import rx.Observable @@ -75,6 +78,11 @@ class RecentChaptersFragment : BaseRxFragment(), Flexib // Update toolbar text setToolbarTitle(R.string.label_recent_updates) + + // Check if recent chapters is empty and update information accordingly. + (activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_history_grey_128dp) + (activity as MainActivity).text_label.text = getString(R.string.information_no_recent) + (activity as MainActivity).information_layout.bringToFront() } /** @@ -121,6 +129,10 @@ class RecentChaptersFragment : BaseRxFragment(), Flexib * @param chapters list of chapters */ fun onNextMangaChapters(chapters: List) { + if (!chapters.isEmpty()) { + ( activity as MainActivity).image_view.setInformationDrawable(null) + ( activity as MainActivity).text_label.text = "" + } adapter.setItems(chapters) } diff --git a/app/src/main/res/drawable-hdpi/application_logo_144dp.png b/app/src/main/res/drawable-hdpi/application_logo_144dp.png new file mode 100644 index 000000000..87f8ef081 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/application_logo_144dp.png differ diff --git a/app/src/main/res/drawable-mdpi/application_logo_144dp.png b/app/src/main/res/drawable-mdpi/application_logo_144dp.png new file mode 100644 index 000000000..d40042f0b Binary files /dev/null and b/app/src/main/res/drawable-mdpi/application_logo_144dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xhdpi/application_logo_144dp.png new file mode 100644 index 000000000..4e32de55e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/application_logo_144dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png new file mode 100644 index 000000000..b3aa86fb4 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png new file mode 100644 index 000000000..212a2fbe9 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png differ diff --git a/app/src/main/res/drawable/branded_logo.xml b/app/src/main/res/drawable/branded_logo.xml new file mode 100644 index 000000000..1fc2ba120 --- /dev/null +++ b/app/src/main/res/drawable/branded_logo.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/header.png b/app/src/main/res/drawable/header.png new file mode 100644 index 000000000..9379dcb71 Binary files /dev/null and b/app/src/main/res/drawable/header.png differ diff --git a/app/src/main/res/drawable/ic_book_grey_128dp.xml b/app/src/main/res/drawable/ic_book_grey_128dp.xml new file mode 100644 index 000000000..24c101cff --- /dev/null +++ b/app/src/main/res/drawable/ic_book_grey_128dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_file_download_grey_128dp.xml b/app/src/main/res/drawable/ic_file_download_grey_128dp.xml new file mode 100644 index 000000000..4dfee6ce1 --- /dev/null +++ b/app/src/main/res/drawable/ic_file_download_grey_128dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_history_grey_128dp.xml b/app/src/main/res/drawable/ic_history_grey_128dp.xml new file mode 100644 index 000000000..85c4ba121 --- /dev/null +++ b/app/src/main/res/drawable/ic_history_grey_128dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_menu_white_24dp.xml b/app/src/main/res/drawable/ic_menu_white_24dp.xml new file mode 100644 index 000000000..cf37e2a39 --- /dev/null +++ b/app/src/main/res/drawable/ic_menu_white_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/test.png b/app/src/main/res/drawable/test.png new file mode 100644 index 000000000..b577e1c28 Binary files /dev/null and b/app/src/main/res/drawable/test.png differ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index c4ffbf1ce..feb03e35d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,32 +1,66 @@ - + + android:fitsSystemWindows="true"> - + android:layout_height="match_parent"> - + - + + + - - - + android:layout_height="match_parent" + android:layout_below="@id/appbar"> + + + + + + + + - - \ No newline at end of file + + + + + diff --git a/app/src/main/res/layout/item_catalogue_grid.xml b/app/src/main/res/layout/item_catalogue_grid.xml index cadc73342..52b8f9357 100644 --- a/app/src/main/res/layout/item_catalogue_grid.xml +++ b/app/src/main/res/layout/item_catalogue_grid.xml @@ -49,17 +49,17 @@ android:visibility="gone"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/menu_navigation.xml b/app/src/main/res/menu/menu_navigation.xml new file mode 100644 index 000000000..21ab47a2e --- /dev/null +++ b/app/src/main/res/menu/menu_navigation.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/values-v21/dimens.xml b/app/src/main/res/values-v21/dimens.xml new file mode 100644 index 000000000..8b96d2cad --- /dev/null +++ b/app/src/main/res/values-v21/dimens.xml @@ -0,0 +1,5 @@ + + + + 41dp + \ No newline at end of file diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml new file mode 100644 index 000000000..9413e0586 --- /dev/null +++ b/app/src/main/res/values-v21/styles.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 0b80b8588..29ffc74df 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -16,9 +16,9 @@ @color/md_light_dividers @color/md_white_1000 - @color/md_light_primary_text - @color/md_light_secondary - @color/md_light_disabled + #000000 + #000000 + #000000 @color/md_green_900 @color/colorPrimaryLight @@ -33,4 +33,687 @@ #99252525 @color/colorPrimarySuperDark + @color/md_blue_400 + + + + + @color/md_red_500 + @color/md_red_50 + @color/md_red_100 + @color/md_red_200 + @color/md_red_300 + @color/md_red_400 + @color/md_red_600 + @color/md_red_700 + @color/md_red_800 + @color/md_red_900 + @color/md_red_A100 + @color/md_red_A200 + @color/md_red_A400 + @color/md_red_A700 + + #ffebee + #ffcdd2 + #ef9a9a + #e57373 + #ef5350 + #f44336 + #e53935 + #d32f2f + #c62828 + #b71c1c + #ff8a80 + #ff5252 + #ff1744 + #d50000 + #40f44336 + #80f44336 + #c0f44336 + + + @color/md_pink_500 + @color/md_pink_50 + @color/md_pink_100 + @color/md_pink_200 + @color/md_pink_300 + @color/md_pink_400 + @color/md_pink_600 + @color/md_pink_700 + @color/md_pink_800 + @color/md_pink_900 + @color/md_pink_A100 + @color/md_pink_A200 + @color/md_pink_A400 + @color/md_pink_A700 + + #fce4ec + #f8bbd0 + #f48fb1 + #f06292 + #ec407a + #e91e63 + #d81b60 + #c2185b + #ad1457 + #880e4f + #ff80ab + #ff4081 + #f50057 + #c51162 + #40e91e63 + #80e91e63 + #c0e91e63 + + + @color/md_purple_500 + @color/md_purple_50 + @color/md_purple_100 + @color/md_purple_200 + @color/md_purple_300 + @color/md_purple_400 + @color/md_purple_600 + @color/md_purple_700 + @color/md_purple_800 + @color/md_purple_900 + @color/md_purple_A100 + @color/md_purple_A200 + @color/md_purple_A400 + @color/md_purple_A700 + + #f3e5f5 + #e1bee7 + #ce93d8 + #ba68c8 + #ab47bc + #9c27b0 + #8e24aa + #7b1fa2 + #6a1b9a + #4a148c + #ea80fc + #e040fb + #d500f9 + #aa00ff + #409c27b0 + #809c27b0 + #c09c27b0 + + + @color/md_deep_purple_500 + @color/md_deep_purple_50 + @color/md_deep_purple_100 + @color/md_deep_purple_200 + @color/md_deep_purple_300 + @color/md_deep_purple_400 + @color/md_deep_purple_600 + @color/md_deep_purple_700 + @color/md_deep_purple_800 + @color/md_deep_purple_900 + @color/md_deep_purple_A100 + @color/md_deep_purple_A200 + @color/md_deep_purple_A400 + @color/md_deep_purple_A700 + + #ede7f6 + #d1c4e9 + #b39ddb + #9575cd + #7e57c2 + #673ab7 + #5e35b1 + #512da8 + #4527a0 + #311b92 + #b388ff + #7c4dff + #651fff + #6200ea + #40673ab7 + #80673ab7 + #c0673ab7 + + + @color/md_indigo_500 + @color/md_indigo_50 + @color/md_indigo_100 + @color/md_indigo_200 + @color/md_indigo_300 + @color/md_indigo_400 + @color/md_indigo_600 + @color/md_indigo_700 + @color/md_indigo_800 + @color/md_indigo_900 + @color/md_indigo_A100 + @color/md_indigo_A200 + @color/md_indigo_A400 + @color/md_indigo_A700 + + #e8eaf6 + #c5cae9 + #9fa8da + #7986cb + #5c6bc0 + #3f51b5 + #3949ab + #303f9f + #283593 + #1a237e + #8c9eff + #536dfe + #3d5afe + #304ffe + #403f51b5 + #803f51b5 + #c03f51b5 + + + @color/md_blue_500 + @color/md_blue_50 + @color/md_blue_100 + @color/md_blue_200 + @color/md_blue_300 + @color/md_blue_400 + @color/md_blue_600 + @color/md_blue_700 + @color/md_blue_800 + @color/md_blue_900 + @color/md_blue_A100 + @color/md_blue_A200 + @color/md_blue_A400 + @color/md_blue_A700 + + #e3f2fd + #bbdefb + #90caf9 + #64b5f6 + #42a5f5 + #2196f3 + #1e88e5 + #1976d2 + #1565c0 + #0d47a1 + #82b1ff + #448aff + #2979ff + #2962ff + #402196f3 + #802196f3 + #c02196f3 + + + @color/md_light_blue_500 + @color/md_light_blue_50 + @color/md_light_blue_100 + @color/md_light_blue_200 + @color/md_light_blue_300 + @color/md_light_blue_400 + @color/md_light_blue_600 + @color/md_light_blue_700 + @color/md_light_blue_800 + @color/md_light_blue_900 + @color/md_light_blue_A100 + @color/md_light_blue_A200 + @color/md_light_blue_A400 + @color/md_light_blue_A700 + + #e1f5fe + #b3e5fc + #81d4fa + #4fc3f7 + #29b6f6 + #03a9f4 + #039be5 + #0288d1 + #0277bd + #01579b + #80d8ff + #40c4ff + #00b0ff + #0091ea + #4003a9f4 + #8003a9f4 + #c003a9f4 + + + @color/md_cyan_500 + @color/md_cyan_50 + @color/md_cyan_100 + @color/md_cyan_200 + @color/md_cyan_300 + @color/md_cyan_400 + @color/md_cyan_600 + @color/md_cyan_700 + @color/md_cyan_800 + @color/md_cyan_900 + @color/md_cyan_A100 + @color/md_cyan_A200 + @color/md_cyan_A400 + @color/md_cyan_A700 + + #e0f7fa + #b2ebf2 + #80deea + #4dd0e1 + #26c6da + #00bcd4 + #00acc1 + #0097a7 + #00838f + #006064 + #84ffff + #18ffff + #00e5ff + #00b8d4 + #4000bcd4 + #8000bcd4 + #c000bcd4 + + + @color/md_teal_500 + @color/md_teal_50 + @color/md_teal_100 + @color/md_teal_200 + @color/md_teal_300 + @color/md_teal_400 + @color/md_teal_600 + @color/md_teal_700 + @color/md_teal_800 + @color/md_teal_900 + @color/md_teal_A100 + @color/md_teal_A200 + @color/md_teal_A400 + @color/md_teal_A700 + + #e0f2f1 + #b2dfdb + #80cbc4 + #4db6ac + #26a69a + #009688 + #00897b + #00796b + #00695c + #004d40 + #a7ffeb + #64ffda + #1de9b6 + #00bfa5 + #40009688 + #80009688 + #c8009688 + + + @color/md_green_500 + @color/md_green_50 + @color/md_green_100 + @color/md_green_200 + @color/md_green_300 + @color/md_green_400 + @color/md_green_600 + @color/md_green_700 + @color/md_green_800 + @color/md_green_900 + @color/md_green_A100 + @color/md_green_A200 + @color/md_green_A400 + @color/md_green_A700 + + #e8f5e9 + #c8e6c9 + #a5d6a7 + #81c784 + #66bb6a + #4caf50 + #43a047 + #388e3c + #2e7d32 + #1b5e20 + #b9f6ca + #69f0ae + #00e676 + #00c853 + #404caf50 + #804caf50 + #c04caf50 + + + @color/md_light_green_500 + @color/md_light_green_50 + @color/md_light_green_100 + @color/md_light_green_200 + @color/md_light_green_300 + @color/md_light_green_400 + @color/md_light_green_600 + @color/md_light_green_700 + @color/md_light_green_800 + @color/md_light_green_900 + @color/md_light_green_A100 + @color/md_light_green_A200 + @color/md_light_green_A400 + @color/md_light_green_A700 + + #f1f8e9 + #dcedc8 + #c5e1a5 + #aed581 + #9ccc65 + #8bc34a + #7cb342 + #689f38 + #558b2f + #33691e + #ccff90 + #b2ff59 + #76ff03 + #64dd17 + #408bc34a + #808bc34a + #c88bc34a + + + @color/md_lime_500 + @color/md_lime_50 + @color/md_lime_100 + @color/md_lime_200 + @color/md_lime_300 + @color/md_lime_400 + @color/md_lime_600 + @color/md_lime_700 + @color/md_lime_800 + @color/md_lime_900 + @color/md_lime_A100 + @color/md_lime_A200 + @color/md_lime_A400 + @color/md_lime_A700 + + #f9fbe7 + #f0f4c3 + #e6ee9c + #dce775 + #d4e157 + #cddc39 + #c0ca33 + #afb42b + #9e9d24 + #827717 + #f4ff81 + #eeff41 + #c6ff00 + #aeea00 + #40cddc39 + #80cddc39 + #c0cddc39 + + + @color/md_yellow_500 + @color/md_yellow_50 + @color/md_yellow_100 + @color/md_yellow_200 + @color/md_yellow_300 + @color/md_yellow_400 + @color/md_yellow_600 + @color/md_yellow_700 + @color/md_yellow_800 + @color/md_yellow_900 + @color/md_yellow_A100 + @color/md_yellow_A200 + @color/md_yellow_A400 + @color/md_yellow_A700 + + #fffde7 + #fff9c4 + #fff59d + #fff176 + #ffee58 + #ffeb3b + #fdd835 + #fbc02d + #f9a825 + #f57f17 + #ffff8d + #ffff00 + #ffea00 + #ffd600 + #40ffeb3b + #80ffeb3b + #c0ffeb3b + + + @color/md_amber_500 + @color/md_amber_50 + @color/md_amber_100 + @color/md_amber_200 + @color/md_amber_300 + @color/md_amber_400 + @color/md_amber_600 + @color/md_amber_700 + @color/md_amber_800 + @color/md_amber_900 + @color/md_amber_A100 + @color/md_amber_A200 + @color/md_amber_A400 + @color/md_amber_A700 + + #fff8e1 + #ffecb3 + #ffe082 + #ffd54f + #ffca28 + #ffc107 + #ffb300 + #ffa000 + #ff8f00 + #ff6f00 + #ffe57f + #ffd740 + #ffc400 + #ffab00 + #40ffc107 + #80ffc107 + #c0ffc107 + + + @color/md_orange_500 + @color/md_orange_50 + @color/md_orange_100 + @color/md_orange_200 + @color/md_orange_300 + @color/md_orange_400 + @color/md_orange_600 + @color/md_orange_700 + @color/md_orange_800 + @color/md_orange_900 + @color/md_orange_A100 + @color/md_orange_A200 + @color/md_orange_A400 + @color/md_orange_A700 + + #fff3e0 + #ffe0b2 + #ffcc80 + #ffb74d + #ffa726 + #ff9800 + #fb8c00 + #f57c00 + #ef6c00 + #e65100 + #ffd180 + #ffab40 + #ff9100 + #ff6d00 + #40ff9800 + #80ff9800 + #c0ff9800 + + + @color/md_deep_orange_500 + @color/md_deep_orange_50 + @color/md_deep_orange_100 + @color/md_deep_orange_200 + @color/md_deep_orange_300 + @color/md_deep_orange_400 + @color/md_deep_orange_600 + @color/md_deep_orange_700 + @color/md_deep_orange_800 + @color/md_deep_orange_900 + @color/md_deep_orange_A100 + @color/md_deep_orange_A200 + @color/md_deep_orange_A400 + @color/md_deep_orange_A700 + + #fbe9e7 + #ffccbc + #ffab91 + #ff8a65 + #ff7043 + #ff5722 + #f4511e + #e64a19 + #d84315 + #bf360c + #ff9e80 + #ff6e40 + #ff3d00 + #dd2c00 + #40ff5722 + #80ff5722 + #c0ff5722 + + + @color/md_brown_500 + @color/md_brown_50 + @color/md_brown_100 + @color/md_brown_200 + @color/md_brown_300 + @color/md_brown_400 + @color/md_brown_600 + @color/md_brown_700 + @color/md_brown_800 + @color/md_brown_900 + + #efebe9 + #d7ccc8 + #bcaaa4 + #a1887f + #8d6e63 + #795548 + #6d4c41 + #5d4037 + #4e342e + #3e2723 + #40795548 + #80795548 + #c0795548 + + + @color/md_grey_500 + @color/md_grey_50 + @color/md_grey_100 + @color/md_grey_200 + @color/md_grey_300 + @color/md_grey_400 + @color/md_grey_600 + @color/md_grey_700 + @color/md_grey_800 + @color/md_grey_900 + @color/md_black_1000 + @color/md_white_1000 + + #fafafa + #f5f5f5 + #eeeeee + #e0e0e0 + #bdbdbd + #9e9e9e + #757575 + #616161 + #424242 + #212121 + #409e9e9e + #809e9e9e + #c09e9e9e + #ffffff + #1affffff + #22ffffff + #33ffffff + #40ffffff + #80ffffff + #99ffffff + #c0ffffff + #1a000000 + #26000000 + #33000000 + #40000000 + #80000000 + #c0000000 + #000000 + + + @color/md_blue_grey_500 + @color/md_blue_grey_50 + @color/md_blue_grey_100 + @color/md_blue_grey_200 + @color/md_blue_grey_300 + @color/md_blue_grey_400 + @color/md_blue_grey_600 + @color/md_blue_grey_700 + @color/md_blue_grey_800 + @color/md_blue_grey_900 + + #eceff1 + #cfd8dc + #b0bec5 + #90a4ae + #78909c + #607d8b + #546e7a + #455a64 + #37474f + #263238 + #40607d8b + #80607d8b + #c0607d8b + + + @color/md_text_white + @color/md_text_white_87 + @color/md_secondary_text_icons_white + @color/md_disabled_hint_text_white + @color/md_divider_white + + #ffffffff + #dfffffff + #b3ffffff + #4dffffff + #1fffffff + + @color/md_text + @color/md_secondary_text_icons + @color/md_disabled_hint_text + @color/md_divider + + #df000000 + #8a000000 + #4c000000 + #1f000000 + + + @color/md_falcon_400 + @color/md_falcon_500 + @color/md_falcon_700 + + #ff38628b + #384e77 + #2b3e5f + #598bae + #40384e77 + #80384e77 + #c0384e77 + #40598bae + + #4000 + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index eea86b5e7..e36f06a21 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,16 +1,16 @@ - 16dp - 16dp - 16dp - 16dp - 16dp - 16dp - 16dp + 0dp + 0dp + 0dp + 0dp + 0dp + 0dp + 0dp 56dp - 24dp - 20dp + 0dp + 0dp 24sp 22sp @@ -19,4 +19,8 @@ 16sp 14sp + + + 16dp + diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml deleted file mode 100644 index 0c52cefae..000000000 --- a/app/src/main/res/values/ids.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - nav_drawer_library - nav_drawer_recent_updates - nav_drawer_catalogues - nav_drawer_settings - nav_drawer_downloads - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bff8953b0..90b6bfe5d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -256,4 +256,9 @@ Backdrop image of selected manga Cover of selected manga + + No Downloads + No Recent Chapters + Empty Library + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 854e17895..daed9974c 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,6 +1,8 @@ - + + +