Rewrote Theme

This commit is contained in:
NoodleMage 2016-03-12 14:22:40 +01:00 committed by NoodleMage
parent 98d420d5aa
commit 5ef5f9b45f
112 changed files with 1078 additions and 1536 deletions

View file

@ -15,10 +15,10 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:theme="@style/AppTheme" > android:theme="@style/Theme.Tachiyomi" >
<activity <activity
android:name=".ui.main.MainActivity" android:name=".ui.main.MainActivity"
android:theme="@style/AppTheme.BrandedLaunch"> android:theme="@style/Theme.BrandedLaunch">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View file

@ -7,6 +7,7 @@ import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes; import org.acra.annotation.ReportsCrashes;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import eu.kanade.tachiyomi.data.preference.PreferencesHelper;
import eu.kanade.tachiyomi.injection.ComponentReflectionInjector; import eu.kanade.tachiyomi.injection.ComponentReflectionInjector;
import eu.kanade.tachiyomi.injection.component.AppComponent; import eu.kanade.tachiyomi.injection.component.AppComponent;
import eu.kanade.tachiyomi.injection.component.DaggerAppComponent; import eu.kanade.tachiyomi.injection.component.DaggerAppComponent;
@ -24,6 +25,8 @@ public class App extends Application {
AppComponent applicationComponent; AppComponent applicationComponent;
ComponentReflectionInjector<AppComponent> componentInjector; ComponentReflectionInjector<AppComponent> componentInjector;
private int theme = 0;
public static App get(Context context) { public static App get(Context context) {
return (App) context.getApplicationContext(); return (App) context.getApplicationContext();
} }
@ -38,10 +41,15 @@ public class App extends Application {
componentInjector = componentInjector =
new ComponentReflectionInjector<>(AppComponent.class, applicationComponent); new ComponentReflectionInjector<>(AppComponent.class, applicationComponent);
setupTheme();
setupEventBus(); setupEventBus();
setupAcra(); setupAcra();
} }
private void setupTheme() {
theme = PreferencesHelper.getTheme(this);
}
protected DaggerAppComponent.Builder prepareAppComponent() { protected DaggerAppComponent.Builder prepareAppComponent() {
return DaggerAppComponent.builder() return DaggerAppComponent.builder()
.appModule(new AppModule(this)); .appModule(new AppModule(this));
@ -65,4 +73,12 @@ public class App extends Application {
public ComponentReflectionInjector<AppComponent> getComponentReflection() { public ComponentReflectionInjector<AppComponent> getComponentReflection() {
return componentInjector; return componentInjector;
} }
public int getAppTheme() {
return theme;
}
public void setAppTheme(int theme) {
this.theme = theme;
}
} }

View file

@ -49,6 +49,12 @@ class PreferencesHelper(private val context: Context) {
return PreferenceManager.getDefaultSharedPreferences(context).getInt( return PreferenceManager.getDefaultSharedPreferences(context).getInt(
context.getString(R.string.pref_library_update_interval_key), 0) context.getString(R.string.pref_library_update_interval_key), 0)
} }
@JvmStatic
fun getTheme(context: Context): Int {
return PreferenceManager.getDefaultSharedPreferences(context).getInt(
context.getString(R.string.pref_theme_key), 1)
}
} }
private fun getKey(keyResource: Int): String { private fun getKey(keyResource: Int): String {

View file

@ -10,7 +10,6 @@ import android.view.View
import android.widget.TextView import android.widget.TextView
import eu.kanade.tachiyomi.App import eu.kanade.tachiyomi.App
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.injection.component.AppComponent
import icepick.Icepick import icepick.Icepick
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
@ -31,6 +30,13 @@ open class BaseActivity : AppCompatActivity() {
supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayHomeAsUpEnabled(true)
} }
fun setAppTheme() {
when (app.appTheme) {
2 -> setTheme(R.style.Theme_Tachiyomi_Dark)
else -> setTheme(R.style.Theme_Tachiyomi)
}
}
fun setToolbarTitle(title: String) { fun setToolbarTitle(title: String) {
supportActionBar?.title = title supportActionBar?.title = title
} }
@ -83,7 +89,7 @@ open class BaseActivity : AppCompatActivity() {
snack.show() snack.show()
} }
protected val applicationComponent: AppComponent protected val app: App
get() = App.get(this).component get() = App.get(this)
} }

View file

@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.ui.base.fragment; package eu.kanade.tachiyomi.ui.base.fragment;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment;
import eu.kanade.tachiyomi.App; import eu.kanade.tachiyomi.App;
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter; import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter;
@ -83,6 +84,12 @@ public abstract class BaseRxFragment<P extends Presenter> extends BaseFragment i
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
presenterDelegate.onPause(getActivity().isFinishing()); presenterDelegate.onPause(getActivity().isFinishing() || shouldDestroyPresenter(this));
} }
private boolean shouldDestroyPresenter(Fragment fragment) {
if (fragment == null) return false;
else return fragment.isRemoving() || shouldDestroyPresenter(fragment.getParentFragment());
}
} }

View file

@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.ui.catalogue package eu.kanade.tachiyomi.ui.catalogue
import android.os.Bundle import android.os.Bundle
import android.support.v4.content.ContextCompat
import android.support.v7.widget.GridLayoutManager import android.support.v7.widget.GridLayoutManager
import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.SearchView import android.support.v7.widget.SearchView
@ -20,6 +19,7 @@ import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.manga.MangaActivity import eu.kanade.tachiyomi.ui.manga.MangaActivity
import eu.kanade.tachiyomi.util.getResourceDrawable
import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.util.toast
import eu.kanade.tachiyomi.widget.EndlessGridScrollListener import eu.kanade.tachiyomi.widget.EndlessGridScrollListener
import eu.kanade.tachiyomi.widget.EndlessListScrollListener import eu.kanade.tachiyomi.widget.EndlessListScrollListener
@ -155,8 +155,7 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), FlexibleViewHold
catalogue_list.adapter = adapter catalogue_list.adapter = adapter
catalogue_list.layoutManager = llm catalogue_list.layoutManager = llm
catalogue_list.addOnScrollListener(listScrollListener) catalogue_list.addOnScrollListener(listScrollListener)
catalogue_list.addItemDecoration(DividerItemDecoration( catalogue_list.addItemDecoration(DividerItemDecoration(context.theme.getResourceDrawable(R.attr.divider_drawable)))
ContextCompat.getDrawable(context, R.drawable.line_divider)))
if (presenter.isListMode) { if (presenter.isListMode) {
switcher.showNext() switcher.showNext()

View file

@ -27,9 +27,6 @@ class CatalogueGridHolder(private val view: View, adapter: CatalogueAdapter, lis
// Set manga title // Set manga title
view.title.text = manga.title view.title.text = manga.title
// Set visibility of in library icon.
// view.favorite_sticker.visibility = if (manga.favorite) View.VISIBLE else View.GONE
// Set alpha of thumbnail. // Set alpha of thumbnail.
view.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f view.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f

View file

@ -1,9 +1,8 @@
package eu.kanade.tachiyomi.ui.catalogue package eu.kanade.tachiyomi.ui.catalogue
import android.support.v4.content.ContextCompat
import android.view.View import android.view.View
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.util.getResourceColor
import kotlinx.android.synthetic.main.item_catalogue_list.view.* import kotlinx.android.synthetic.main.item_catalogue_list.view.*
/** /**
@ -18,8 +17,8 @@ import kotlinx.android.synthetic.main.item_catalogue_list.view.*
class CatalogueListHolder(private val view: View, adapter: CatalogueAdapter, listener: OnListItemClickListener) : class CatalogueListHolder(private val view: View, adapter: CatalogueAdapter, listener: OnListItemClickListener) :
CatalogueHolder(view, adapter, listener) { CatalogueHolder(view, adapter, listener) {
private val favoriteColor = ContextCompat.getColor(view.context, R.color.hint_text) private val favoriteColor = view.context.theme.getResourceColor(android.R.attr.textColorHint)
private val unfavoriteColor = ContextCompat.getColor(view.context, R.color.primary_text) private val unfavoriteColor = view.context.theme.getResourceColor(android.R.attr.textColorPrimary)
/** /**
* Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this * Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this

View file

@ -57,6 +57,7 @@ class CategoryActivity : BaseRxActivity<CategoryPresenter>(), ActionMode.Callbac
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
setAppTheme()
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
// Inflate activity_edit_categories.xml. // Inflate activity_edit_categories.xml.

View file

@ -8,8 +8,6 @@ import eu.kanade.tachiyomi.data.download.DownloadService
import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.main.MainActivity 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 kotlinx.android.synthetic.main.fragment_download_queue.*
import nucleus.factory.RequiresPresenter import nucleus.factory.RequiresPresenter
import rx.Subscription import rx.Subscription
@ -63,8 +61,8 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
} }
} }
override fun onCreate(bundle: Bundle?) { override fun onCreate(savedState: Bundle?) {
super.onCreate(bundle) super.onCreate(savedState)
setHasOptionsMenu(true) setHasOptionsMenu(true)
} }
@ -190,10 +188,8 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
* Set information view when queue is empty * Set information view when queue is empty
*/ */
private fun setInformationView() { private fun setInformationView() {
if (presenter.downloadQueue.isEmpty()) { (activity as MainActivity).updateEmptyView(presenter.downloadQueue.isEmpty(),
( activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_file_download_grey_128dp) R.string.information_no_downloads, R.drawable.ic_file_download_black_128dp)
( activity as MainActivity).text_label.text = getString(R.string.information_no_downloads)
}
} }
} }

View file

@ -20,7 +20,6 @@ import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.category.CategoryActivity import eu.kanade.tachiyomi.ui.category.CategoryActivity
import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.util.inflate import eu.kanade.tachiyomi.util.inflate
import eu.kanade.tachiyomi.util.setInformationDrawable
import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.util.toast
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_library.* import kotlinx.android.synthetic.main.fragment_library.*
@ -51,7 +50,8 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
/** /**
* AppBarLayout from [MainActivity]. * AppBarLayout from [MainActivity].
*/ */
private lateinit var appBar: AppBarLayout private val appbar: AppBarLayout
get() = (activity as MainActivity).appbar
/** /**
* Position of the active category. * Position of the active category.
@ -112,8 +112,8 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
} }
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedState)
setHasOptionsMenu(true) setHasOptionsMenu(true)
isFilterDownloaded = presenter.preferences.filterDownloaded().get() as Boolean isFilterDownloaded = presenter.preferences.filterDownloaded().get() as Boolean
isFilterUnread = presenter.preferences.filterUnread().get() as Boolean isFilterUnread = presenter.preferences.filterUnread().get() as Boolean
@ -126,17 +126,9 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
override fun onViewCreated(view: View, savedState: Bundle?) { override fun onViewCreated(view: View, savedState: Bundle?) {
setToolbarTitle(getString(R.string.label_library)) setToolbarTitle(getString(R.string.label_library))
appBar = (activity as MainActivity).appbar tabs = appbar.inflate(R.layout.library_tab_layout) as TabLayout
tabs = appBar.inflate(R.layout.library_tab_layout) as TabLayout
// Workaround to prevent: Tab belongs to a different TabLayout. appbar.addView(tabs)
// Internal bug in Support library v23.2.0.
// See https://code.google.com/p/android/issues/detail?id=201827
for (j in 0..16) {
tabs.newTab()
}
appBar.addView(tabs)
adapter = LibraryAdapter(childFragmentManager) adapter = LibraryAdapter(childFragmentManager)
view_pager.adapter = adapter view_pager.adapter = adapter
@ -150,14 +142,14 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
} }
override fun onDestroyView() { override fun onDestroyView() {
appBar.removeView(tabs) appbar.removeView(tabs)
super.onDestroyView() super.onDestroyView()
} }
override fun onSaveInstanceState(bundle: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
bundle.putInt(CATEGORY_KEY, view_pager.currentItem) outState.putInt(CATEGORY_KEY, view_pager.currentItem)
bundle.putString(QUERY_KEY, query) outState.putString(QUERY_KEY, query)
super.onSaveInstanceState(bundle) super.onSaveInstanceState(outState)
} }
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
@ -260,13 +252,8 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
*/ */
fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<Manga>>) { fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<Manga>>) {
// Check if library is empty and update information accordingly. // Check if library is empty and update information accordingly.
if (mangaMap.isEmpty()) { (activity as MainActivity).updateEmptyView(mangaMap.isEmpty(),
(activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_book_grey_128dp) R.string.information_empty_library, R.drawable.ic_book_black_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. // Get the current active category.
val activeCat = if (adapter.categories != null) view_pager.currentItem else activeCategory val activeCat = if (adapter.categories != null) view_pager.currentItem else activeCategory

View file

@ -1,179 +0,0 @@
package eu.kanade.tachiyomi.ui.main;
import android.app.Activity;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import java.util.ArrayList;
import java.util.List;
import eu.kanade.tachiyomi.R;
/**
* Why this class is needed.
*
* FragmentManager does not supply a developer with a fragment stack.
* It gives us a fragment *transaction* stack.
*
* To be sane, we need *fragment* stack.
*
* This implementation also handles NucleusSupportFragment presenter`s lifecycle correctly.
*/
public class FragmentStack {
public interface OnBackPressedHandlingFragment {
boolean onBackPressed();
}
public interface OnFragmentRemovedListener {
void onFragmentRemoved(Fragment fragment);
}
private Activity activity;
private FragmentManager manager;
private int containerId;
@Nullable private OnFragmentRemovedListener onFragmentRemovedListener;
public FragmentStack(Activity activity, FragmentManager manager, int containerId, @Nullable OnFragmentRemovedListener onFragmentRemovedListener) {
this.activity = activity;
this.manager = manager;
this.containerId = containerId;
this.onFragmentRemovedListener = onFragmentRemovedListener;
}
/**
* Returns the number of fragments in the stack.
*
* @return the number of fragments in the stack.
*/
public int size() {
return getFragments().size();
}
/**
* Pushes a fragment to the top of the stack.
*/
public void push(Fragment fragment) {
Fragment top = peek();
if (top != null) {
manager.beginTransaction()
.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.remove(top)
.add(containerId, fragment, indexToTag(manager.getBackStackEntryCount() + 1))
.addToBackStack(null)
.commit();
}
else {
manager.beginTransaction()
.add(containerId, fragment, indexToTag(0))
.commit();
}
manager.executePendingTransactions();
}
/**
* Pops the top item if the stack.
* If the fragment implements {@link OnBackPressedHandlingFragment}, calls {@link OnBackPressedHandlingFragment#onBackPressed()} instead.
* If {@link OnBackPressedHandlingFragment#onBackPressed()} returns false the fragment gets popped.
*
* @return true if a fragment has been popped or if {@link OnBackPressedHandlingFragment#onBackPressed()} returned true;
*/
public boolean back() {
Fragment top = peek();
if (top instanceof OnBackPressedHandlingFragment) {
if (((OnBackPressedHandlingFragment)top).onBackPressed())
return true;
}
return pop();
}
/**
* Pops the topmost fragment from the stack.
* The lowest fragment can't be popped, it can only be replaced.
*
* @return false if the stack can't pop or true if a top fragment has been popped.
*/
public boolean pop() {
if (manager.getBackStackEntryCount() == 0)
return false;
Fragment top = peek();
manager.popBackStackImmediate();
if (onFragmentRemovedListener != null)
onFragmentRemovedListener.onFragmentRemoved(top);
return true;
}
/**
* Replaces stack contents with just one fragment.
*/
public void replace(Fragment fragment) {
List<Fragment> fragments = getFragments();
manager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
manager.beginTransaction()
.replace(containerId, fragment, indexToTag(0))
.commit();
manager.executePendingTransactions();
if (onFragmentRemovedListener != null) {
for (Fragment fragment1 : fragments)
onFragmentRemovedListener.onFragmentRemoved(fragment1);
}
}
/**
* Returns the topmost fragment in the stack.
*/
public Fragment peek() {
return manager.findFragmentById(containerId);
}
/**
* Returns a back fragment if the fragment is of given class.
* If such fragment does not exist and activity implements the given class then the activity will be returned.
*
* @param fragment a fragment to search from.
* @param callbackType a class of type for callback to search.
* @param <T> a type of callback.
* @return a back fragment or activity.
*/
@SuppressWarnings("unchecked")
public <T> T findCallback(Fragment fragment, Class<T> callbackType) {
Fragment back = getBackFragment(fragment);
if (back != null && callbackType.isAssignableFrom(back.getClass()))
return (T)back;
if (callbackType.isAssignableFrom(activity.getClass()))
return (T)activity;
return null;
}
private Fragment getBackFragment(Fragment fragment) {
List<Fragment> fragments = getFragments();
for (int f = fragments.size() - 1; f >= 0; f--) {
if (fragments.get(f) == fragment && f > 0)
return fragments.get(f - 1);
}
return null;
}
private List<Fragment> getFragments() {
List<Fragment> fragments = new ArrayList<>(manager.getBackStackEntryCount() + 1);
for (int i = 0; i < manager.getBackStackEntryCount() + 1; i++) {
Fragment fragment = manager.findFragmentByTag(indexToTag(i));
if (fragment != null)
fragments.add(fragment);
}
return fragments;
}
private String indexToTag(int index) {
return Integer.toString(index);
}
}

View file

@ -1,10 +1,13 @@
package eu.kanade.tachiyomi.ui.main package eu.kanade.tachiyomi.ui.main
import android.content.Intent import android.content.Intent
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
import android.support.v4.view.GravityCompat import android.support.v4.view.GravityCompat
import android.support.v4.widget.DrawerLayout
import android.view.MenuItem import android.view.MenuItem
import android.view.View
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
import eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment import eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment
@ -12,17 +15,15 @@ import eu.kanade.tachiyomi.ui.download.DownloadFragment
import eu.kanade.tachiyomi.ui.library.LibraryFragment import eu.kanade.tachiyomi.ui.library.LibraryFragment
import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment
import eu.kanade.tachiyomi.ui.setting.SettingsActivity import eu.kanade.tachiyomi.ui.setting.SettingsActivity
import eu.kanade.tachiyomi.util.setInformationDrawable import eu.kanade.tachiyomi.util.getResourceColor
import eu.kanade.tachiyomi.util.setDrawableCompat
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.toolbar.* import kotlinx.android.synthetic.main.toolbar.*
import nucleus.view.ViewWithPresenter
class MainActivity : BaseActivity() { class MainActivity : BaseActivity() {
lateinit var fragmentStack: FragmentStack
override fun onCreate(savedState: Bundle?) { override fun onCreate(savedState: Bundle?) {
setTheme(R.style.AppTheme); setAppTheme()
super.onCreate(savedState) super.onCreate(savedState)
// Do not let the launcher create a new activity // Do not let the launcher create a new activity
@ -38,64 +39,78 @@ class MainActivity : BaseActivity() {
setupToolbar(toolbar) setupToolbar(toolbar)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp) supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp)
fragmentStack = FragmentStack(this, supportFragmentManager, R.id.frame_container drawer.addDrawerListener(object : DrawerLayout.SimpleDrawerListener() {
) { fragment -> override fun onDrawerSlide(drawerView: View, slideOffset: Float) {
if (fragment is ViewWithPresenter<*>) if (Build.VERSION.SDK_INT >= 21) {
fragment.presenter.destroy() window.statusBarColor = theme.getResourceColor(R.attr.status_bar_trans)
}
} }
override fun onDrawerClosed(drawerView: View) {
if (Build.VERSION.SDK_INT >= 21) {
window.statusBarColor = theme.getResourceColor(R.attr.colorPrimaryDark)
}
}
})
// Set behavior of Navigation drawer // Set behavior of Navigation drawer
nav_view.setNavigationItemSelectedListener( nav_view.setNavigationItemSelectedListener { item ->
{ menuItem ->
// Make information view invisible // Make information view invisible
image_view.setInformationDrawable(null) image_view.setDrawableCompat(null)
text_label.text = "" text_label.text = ""
when (menuItem.itemId) { when (item.itemId) {
R.id.nav_drawer_library -> { R.id.nav_drawer_library -> {
setFragment(LibraryFragment.newInstance()) setFragment(LibraryFragment.newInstance())
menuItem.isChecked = true item.isChecked = true
drawer.closeDrawer(GravityCompat.START)
} }
R.id.nav_drawer_recent_updates -> { R.id.nav_drawer_recent_updates -> {
setFragment(RecentChaptersFragment.newInstance()) setFragment(RecentChaptersFragment.newInstance())
menuItem.isChecked = true item.isChecked = true
drawer.closeDrawer(GravityCompat.START)
} }
R.id.nav_drawer_catalogues -> { R.id.nav_drawer_catalogues -> {
setFragment(CatalogueFragment.newInstance()) setFragment(CatalogueFragment.newInstance())
menuItem.isChecked = true item.isChecked = true
drawer.closeDrawer(GravityCompat.START)
} }
R.id.nav_drawer_downloads -> { R.id.nav_drawer_downloads -> {
setFragment(DownloadFragment.newInstance()) setFragment(DownloadFragment.newInstance())
menuItem.isChecked = true item.isChecked = true
drawer.closeDrawer(GravityCompat.START)
} }
R.id.nav_drawer_settings -> { R.id.nav_drawer_settings -> {
menuItem.isChecked = true item.isChecked = false
startActivity(Intent(this, SettingsActivity::class.java)) startActivity(Intent(this, SettingsActivity::class.java))
}
}
drawer.closeDrawer(GravityCompat.START) drawer.closeDrawer(GravityCompat.START)
}
}
true true
}) }
if (savedState == null) {
setFragment(LibraryFragment.newInstance()) setFragment(LibraryFragment.newInstance())
} }
}
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
android.R.id.home -> { android.R.id.home -> drawer.openDrawer(GravityCompat.START)
drawer.openDrawer(GravityCompat.START) else -> return super.onOptionsItemSelected(item)
}
return true return true
} }
}
return super.onOptionsItemSelected(item)
}
fun setFragment(fragment: Fragment) { fun setFragment(fragment: Fragment) {
fragmentStack.replace(fragment) supportFragmentManager.beginTransaction()
.replace(R.id.frame_container, fragment)
.commit()
}
fun updateEmptyView(show: Boolean, textResource: Int, drawable: Int) {
if (show) {
image_view.setDrawableCompat(drawable)
text_label.text = getString(textResource)
} else {
image_view.setDrawableCompat(null)
text_label.text = ""
}
} }
} }

View file

@ -48,6 +48,7 @@ class MangaActivity : BaseRxActivity<MangaPresenter>() {
private set private set
override fun onCreate(savedState: Bundle?) { override fun onCreate(savedState: Bundle?) {
setAppTheme()
super.onCreate(savedState) super.onCreate(savedState)
setContentView(R.layout.activity_manga) setContentView(R.layout.activity_manga)

View file

@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.manga.MangaActivity import eu.kanade.tachiyomi.ui.manga.MangaActivity
import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.util.getResourceDrawable
import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.util.toast
import kotlinx.android.synthetic.main.fragment_manga_chapters.* import kotlinx.android.synthetic.main.fragment_manga_chapters.*
import nucleus.factory.RequiresPresenter import nucleus.factory.RequiresPresenter
@ -65,7 +66,7 @@ class ChaptersFragment : BaseRxFragment<ChaptersPresenter>(), ActionMode.Callbac
recycler.adapter = adapter recycler.adapter = adapter
recycler.layoutManager = LinearLayoutManager(activity) recycler.layoutManager = LinearLayoutManager(activity)
recycler.addItemDecoration(DividerItemDecoration( recycler.addItemDecoration(DividerItemDecoration(
ContextCompat.getDrawable(context, R.drawable.line_divider))) context.theme.getResourceDrawable(R.attr.divider_drawable)))
recycler.setHasFixedSize(true) recycler.setHasFixedSize(true)
swipe_refresh.setOnRefreshListener { fetchChapters() } swipe_refresh.setOnRefreshListener { fetchChapters() }

View file

@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder
import eu.kanade.tachiyomi.util.getResourceColor
import kotlinx.android.synthetic.main.item_chapter.view.* import kotlinx.android.synthetic.main.item_chapter.view.*
import rx.Observable import rx.Observable
import java.text.DateFormat import java.text.DateFormat
@ -19,8 +20,8 @@ import java.util.*
class ChaptersHolder(private val view: View, private val adapter: ChaptersAdapter, listener: FlexibleViewHolder.OnListItemClickListener) : class ChaptersHolder(private val view: View, private val adapter: ChaptersAdapter, listener: FlexibleViewHolder.OnListItemClickListener) :
FlexibleViewHolder(view, adapter, listener) { FlexibleViewHolder(view, adapter, listener) {
private val readColor = ContextCompat.getColor(view.context, R.color.hint_text) private val readColor = view.context.theme.getResourceColor(android.R.attr.textColorHint)
private val unreadColor = ContextCompat.getColor(view.context, R.color.primary_text) private val unreadColor = view.context.theme.getResourceColor(android.R.attr.textColorPrimary)
private val decimalFormat = DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' }) private val decimalFormat = DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' })
private val df = DateFormat.getDateInstance(DateFormat.SHORT) private val df = DateFormat.getDateInstance(DateFormat.SHORT)

View file

@ -71,6 +71,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
@Override @Override
public void onCreate(Bundle savedState) { public void onCreate(Bundle savedState) {
setTheme(R.style.Theme_Reader);
super.onCreate(savedState); super.onCreate(savedState);
setContentView(R.layout.activity_reader); setContentView(R.layout.activity_reader);
ButterKnife.bind(this); ButterKnife.bind(this);
@ -85,6 +86,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
initializeSettings(); initializeSettings();
maxBitmapSize = GLUtil.getMaxTextureSize(); maxBitmapSize = GLUtil.getMaxTextureSize();
} }
@ -393,12 +395,12 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
View rootView = getWindow().getDecorView().getRootView(); View rootView = getWindow().getDecorView().getRootView();
if (theme == BLACK_THEME) { if (theme == BLACK_THEME) {
rootView.setBackgroundColor(Color.BLACK); rootView.setBackgroundColor(Color.BLACK);
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.light_grey)); pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryDark));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background_black)); pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundDark));
} else { } else {
rootView.setBackgroundColor(Color.WHITE); rootView.setBackgroundColor(Color.WHITE);
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.primary_text)); pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryLight));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background)); pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundLight));
} }
} }

View file

@ -17,8 +17,8 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
class PageDecodeErrorLayout(context: Context) : LinearLayout(context) { class PageDecodeErrorLayout(context: Context) : LinearLayout(context) {
private val lightGreyColor = ContextCompat.getColor(context, R.color.light_grey) private val lightGreyColor = ContextCompat.getColor(context, android.R.attr.textColorHint)
private val blackColor = ContextCompat.getColor(context, R.color.primary_text) private val blackColor = ContextCompat.getColor(context, android.R.attr.textColorPrimary)
init { init {
orientation = LinearLayout.VERTICAL orientation = LinearLayout.VERTICAL

View file

@ -74,12 +74,12 @@ class PagerReaderFragment : BaseFragment() {
/** /**
* Text color for black theme. * Text color for black theme.
*/ */
private val lightGreyColor by lazy { ContextCompat.getColor(context, R.color.light_grey) } private val lightGreyColor by lazy { ContextCompat.getColor(context, R.color.textColorHintDark) }
/** /**
* Text color for white theme. * Text color for white theme.
*/ */
private val blackColor by lazy { ContextCompat.getColor(context, R.color.primary_text) } private val blackColor by lazy { ContextCompat.getColor(context, R.color.textColorHintLight) }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedState: Bundle?): View? {
return inflater.inflate(R.layout.item_pager_reader, container, false) return inflater.inflate(R.layout.item_pager_reader, container, false)

View file

@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.ui.recent package eu.kanade.tachiyomi.ui.recent
import android.os.Bundle import android.os.Bundle
import android.support.v4.content.ContextCompat
import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.LinearLayoutManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -17,8 +16,7 @@ import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.util.setInformationDrawable import eu.kanade.tachiyomi.util.getResourceDrawable
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_recent_chapters.* import kotlinx.android.synthetic.main.fragment_recent_chapters.*
import nucleus.factory.RequiresPresenter import nucleus.factory.RequiresPresenter
import rx.Observable import rx.Observable
@ -70,19 +68,13 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
// Init RecyclerView and adapter // Init RecyclerView and adapter
recycler.layoutManager = LinearLayoutManager(activity) recycler.layoutManager = LinearLayoutManager(activity)
recycler.addItemDecoration(DividerItemDecoration(ContextCompat.getDrawable( recycler.addItemDecoration(DividerItemDecoration(context.theme.getResourceDrawable(R.attr.divider_drawable)))
context, R.drawable.line_divider)))
recycler.setHasFixedSize(true) recycler.setHasFixedSize(true)
adapter = RecentChaptersAdapter(this) adapter = RecentChaptersAdapter(this)
recycler.adapter = adapter recycler.adapter = adapter
// Update toolbar text // Update toolbar text
setToolbarTitle(R.string.label_recent_updates) 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()
} }
/** /**
@ -129,10 +121,9 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
* @param chapters list of chapters * @param chapters list of chapters
*/ */
fun onNextMangaChapters(chapters: List<Any>) { fun onNextMangaChapters(chapters: List<Any>) {
if (!chapters.isEmpty()) { (activity as MainActivity).updateEmptyView(chapters.isEmpty(),
( activity as MainActivity).image_view.setInformationDrawable(null) R.string.information_no_recent, R.drawable.ic_history_black_128dp)
( activity as MainActivity).text_label.text = ""
}
adapter.setItems(chapters) adapter.setItems(chapters)
} }

View file

@ -1,6 +1,6 @@
package eu.kanade.tachiyomi.ui.recent package eu.kanade.tachiyomi.ui.recent
import android.support.v4.content.ContextCompat import android.content.Context
import android.view.View import android.view.View
import android.widget.PopupMenu import android.widget.PopupMenu
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.MangaChapter import eu.kanade.tachiyomi.data.database.models.MangaChapter
import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder
import eu.kanade.tachiyomi.util.getResourceColor
import kotlinx.android.synthetic.main.item_recent_chapter.view.* import kotlinx.android.synthetic.main.item_recent_chapter.view.*
import rx.Observable import rx.Observable
@ -26,12 +27,12 @@ class RecentChaptersHolder(view: View, private val adapter: RecentChaptersAdapte
/** /**
* Color of read chapter * Color of read chapter
*/ */
private val readColor = ContextCompat.getColor(view.context, R.color.hint_text) private var readColor = view.context.theme.getResourceColor(android.R.attr.textColorHint)
/** /**
* Color of unread chapter * Color of unread chapter
*/ */
private val unreadColor = ContextCompat.getColor(view.context, R.color.primary_text) private var unreadColor = view.context.theme.getResourceColor(android.R.attr.textColorPrimary)
/** /**
* Object containing chapter information * Object containing chapter information
@ -41,6 +42,7 @@ class RecentChaptersHolder(view: View, private val adapter: RecentChaptersAdapte
init { init {
//Set OnClickListener for download menu //Set OnClickListener for download menu
itemView.chapterMenu.setOnClickListener { v -> v.post({ showPopupMenu(v) }) } itemView.chapterMenu.setOnClickListener { v -> v.post({ showPopupMenu(v) }) }
} }
/** /**

View file

@ -21,9 +21,10 @@ class SettingsActivity : BaseActivity() {
@Inject lateinit var syncManager: MangaSyncManager @Inject lateinit var syncManager: MangaSyncManager
override fun onCreate(savedState: Bundle?) { override fun onCreate(savedState: Bundle?) {
setAppTheme()
super.onCreate(savedState) super.onCreate(savedState)
setContentView(R.layout.activity_preferences) setContentView(R.layout.activity_preferences)
applicationComponent.inject(this) app.component.inject(this)
setupToolbar(toolbar) setupToolbar(toolbar)

View file

@ -1,10 +1,14 @@
package eu.kanade.tachiyomi.ui.setting package eu.kanade.tachiyomi.ui.setting
import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.TaskStackBuilder
import android.support.v7.preference.Preference import android.support.v7.preference.Preference
import android.view.View import android.view.View
import eu.kanade.tachiyomi.App
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.library.LibraryUpdateAlarm import eu.kanade.tachiyomi.data.library.LibraryUpdateAlarm
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.widget.preference.IntListPreference import eu.kanade.tachiyomi.widget.preference.IntListPreference
import eu.kanade.tachiyomi.widget.preference.LibraryColumnsDialog import eu.kanade.tachiyomi.widget.preference.LibraryColumnsDialog
import eu.kanade.tachiyomi.widget.preference.SimpleDialogPreference import eu.kanade.tachiyomi.widget.preference.SimpleDialogPreference
@ -29,6 +33,10 @@ class SettingsGeneralFragment : SettingsNestedFragment() {
findPreference(getString(R.string.pref_library_update_interval_key)) as IntListPreference findPreference(getString(R.string.pref_library_update_interval_key)) as IntListPreference
} }
val themePreference by lazy {
findPreference(getString(R.string.pref_theme_key)) as IntListPreference
}
var columnsSubscription: Subscription? = null var columnsSubscription: Subscription? = null
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -36,6 +44,17 @@ class SettingsGeneralFragment : SettingsNestedFragment() {
LibraryUpdateAlarm.startAlarm(activity, (newValue as String).toInt()) LibraryUpdateAlarm.startAlarm(activity, (newValue as String).toInt())
true true
} }
themePreference.setOnPreferenceChangeListener { preference, newValue ->
App.get(activity).appTheme = (newValue as String).toInt()
// Rebuild activity's to apply themes.
TaskStackBuilder.create(activity)
.addNextIntent(Intent(activity, MainActivity::class.java))
.addNextIntent(activity.intent)
.startActivities()
true
}
} }
override fun onResume() { override fun onResume() {

View file

@ -40,7 +40,7 @@ inline fun Context.notification(func: NotificationCompat.Builder.() -> Unit): No
/** /**
* Property to get the notification manager from the context. * Property to get the notification manager from the context.
*/ */
val Context.notificationManager : NotificationManager val Context.notificationManager: NotificationManager
get() = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager get() = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
/** /**

View file

@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.util
import android.support.annotation.DrawableRes import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.DrawableCompat
import android.widget.ImageView import android.widget.ImageView
/** /**
@ -11,7 +12,9 @@ import android.widget.ImageView
*/ */
fun ImageView.setDrawableCompat(@DrawableRes drawable: Int?) { fun ImageView.setDrawableCompat(@DrawableRes drawable: Int?) {
if (drawable != null) { if (drawable != null) {
setImageDrawable(ContextCompat.getDrawable(context, drawable)) var drawable = ContextCompat.getDrawable(context, drawable)
DrawableCompat.setTint(drawable,this.context.theme.getResourceColor(android.R.attr.textColorHint))
setImageDrawable(drawable)
} else { } else {
setImageResource(android.R.color.transparent) setImageResource(android.R.color.transparent)
} }

View file

@ -0,0 +1,19 @@
package eu.kanade.tachiyomi.util
import android.content.res.Resources
import android.graphics.drawable.Drawable
import android.support.annotation.StringRes
fun Resources.Theme.getResourceColor(@StringRes resource: Int) : Int {
val typedArray = this.obtainStyledAttributes(intArrayOf(resource))
val attrValue = typedArray.getColor(0, 0)
typedArray.recycle()
return attrValue
}
fun Resources.Theme.getResourceDrawable(@StringRes resource: Int) : Drawable {
val typedArray = this.obtainStyledAttributes(intArrayOf(resource))
val attrValue = typedArray.getDrawable(0)
typedArray.recycle()
return attrValue
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorAccent"
>
<item>
<selector>
<item android:state_selected="true">
<color android:color="@color/selectorColorDark" />
</item>
<item android:state_activated="true">
<color android:color="@color/selectorColorDark" />
</item>
<item>
<color android:color="@color/backgroundDark" />
</item>
</selector>
</item>
</ripple>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorAccent"
>
<item>
<selector>
<item android:state_selected="true">
<color android:color="@color/selectorColorLight" />
</item>
<item android:state_activated="true">
<color android:color="@color/selectorColorLight" />
</item>
<item>
<color android:color="@color/backgroundLight" />
</item>
</selector>
</item>
</ripple>

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_shortAnimTime"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask"
android:drawable="@color/list_choice_pressed_bg_light" />
<item>
<selector>
<item android:state_activated="true" android:drawable="@color/list_choice_pressed_bg_light"/>
</selector>
</item>
</ripple>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/line_grey">
<item android:drawable="@color/white"/>
</ripple>

0
app/src/main/res/drawable-xhdpi/card_background.9.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp" android:width="128dp"
android:height="128dp" android:height="128dp"
android:alpha=".38"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:alpha=".54"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:alpha=".54"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp" android:width="128dp"
android:height="128dp" android:height="128dp"
android:alpha=".38"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:alpha=".54"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp" android:width="128dp"
android:height="128dp" android:height="128dp"
android:alpha=".38"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:alpha=".54"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF54759e"
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="#FF54759e" android:fillColor="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/> android:pathData="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/>
</vector> </vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="#FF54759e" android:fillColor="#FFFFFFFF"
android:pathData="M18,2H6c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zM6,4h5v8l-2.5,-1.5L6,12V4z"/> android:pathData="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/>
</vector> </vector>

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:alpha=".54"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -6,6 +6,6 @@
android:width="1dp" android:width="1dp"
android:height="1dp" /> android:height="1dp" />
<solid android:color="@color/divider" /> <solid android:color="@color/dividerDark" />
</shape> </shape>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="1dp"
android:height="1dp" />
<solid android:color="@color/dividerLight" />
</shape>

View file

@ -2,9 +2,9 @@
<selector android:exitFadeDuration="@android:integer/config_longAnimTime" <selector android:exitFadeDuration="@android:integer/config_longAnimTime"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@color/list_choice_pressed_bg_light"/> <item android:state_focused="true" android:drawable="@color/selectorColorDark"/>
<item android:state_pressed="true" android:drawable="@color/list_choice_pressed_bg_light"/> <item android:state_pressed="true" android:drawable="@color/selectorColorDark"/>
<item android:state_activated="true" android:drawable="@color/list_choice_pressed_bg_light"/> <item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
<item android:drawable="@android:color/transparent"/> <item android:drawable="@android:color/background_dark"/>
</selector> </selector>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<selector android:exitFadeDuration="@android:integer/config_longAnimTime"-->
<!--xmlns:android="http://schemas.android.com/apk/res/android">-->
<!--<item android:state_focused="true" android:drawable="?attr/colorAccent"/>-->
<!--<item android:state_pressed="true" android:drawable="?attr/colorAccent"/>-->
<!--<item android:state_activated="true" android:drawable="?attr/colorAccent"/>-->
<!--<item android:drawable="?android:attr/colorBackground"/>-->
<!--</selector>-->
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@color/selectorColorLight"/>
<item android:state_pressed="true" android:drawable="@color/selectorColorLight"/>
<item android:state_activated="true" android:drawable="@color/selectorColorLight"/>
<item android:drawable="@color/backgroundLight"/>
</selector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/reader_background_checkbox_selected" /> <item android:state_checked="true" android:drawable="@drawable/ic_reader_background_checkbox_black_24dp" />
<item android:drawable="@drawable/reader_background_checkbox_unselected" /> <item android:drawable="@drawable/ic_reader_background_checkbox_white_24dp" />
</selector> </selector>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/super_light_grey" android:state_pressed="true"/>
<item android:drawable="@color/super_light_grey" android:state_focused="true"/>
<item android:drawable="@color/white"/>
</selector>

View file

@ -2,9 +2,9 @@
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:gravity="center"> android:gravity="center">
<include layout="@layout/toolbar"/> <include layout="@layout/toolbar"/>
@ -15,20 +15,13 @@
android:layout_marginTop="?attr/actionBarSize" android:layout_marginTop="?attr/actionBarSize"
android:id="@+id/recycler" android:id="@+id/recycler"
android:choiceMode="multipleChoice" android:choiceMode="multipleChoice"
android:listSelector="@color/list_choice_pressed_bg_light" tools:listitem="@layout/item_edit_categories"
tools:listitem="@layout/item_edit_categories"/> />
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:layout_height="@dimen/fab_size"
android:layout_width="@dimen/fab_size"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_add_white_24dp"
app:backgroundTint="@color/colorPrimary"
app:layout_anchor="@id/recycler" app:layout_anchor="@id/recycler"
app:layout_anchorGravity="bottom|right|end" app:srcCompat="@drawable/ic_add_white_24dp"
app:layout_behavior="eu.kanade.tachiyomi.ui.base.fab.FABAnimationUpDown"/> style="@style/Theme.Widget.FAB"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -34,7 +34,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"> android:layout_gravity="center">
<ImageView <android.support.v7.widget.AppCompatImageView
android:id="@+id/image_view" android:id="@+id/image_view"
android:layout_width="128dp" android:layout_width="128dp"
android:layout_height="128dp" android:layout_height="128dp"
@ -42,25 +42,24 @@
<TextView <TextView
android:id="@+id/text_label" android:id="@+id/text_label"
style="@style/TextAppearance.Medium.Body2.Hint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/image_view" android:layout_below="@+id/image_view"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"/>
android:alpha=".87"
android:textSize="24sp"/>
</RelativeLayout> </RelativeLayout>
</FrameLayout> </FrameLayout>
</RelativeLayout> </RelativeLayout>
<android.support.design.widget.NavigationView <android.support.design.widget.NavigationView
android:id="@+id/nav_view" android:id="@+id/nav_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:theme="?attr/navigation_view_theme"
app:headerLayout="@layout/navigation_header" app:headerLayout="@layout/navigation_header"
app:menu="@menu/menu_navigation"/> app:menu="@menu/menu_navigation"/>
</android.support.v4.widget.DrawerLayout> </android.support.v4.widget.DrawerLayout>

View file

@ -10,9 +10,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<include layout="@layout/toolbar" /> <include layout="@layout/toolbar"/>
<include layout="@layout/tab_layout" /> <include layout="@layout/tab_layout"/>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar"/> <include layout="@layout/toolbar"/>

View file

@ -1,7 +1,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:gravity="center">
<FrameLayout <FrameLayout
android:id="@+id/reader" android:id="@+id/reader"
@ -10,14 +10,13 @@
</FrameLayout> </FrameLayout>
<TextView <TextView
android:id="@+id/page_number"
style="@style/TextAppearance.Regular.Caption"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dp" android:layout_gravity="bottom|start"
android:layout_gravity="bottom|left" android:background="?android:attr/colorBackground"
android:background="@color/page_number_background" android:padding="4dp"/>
android:textColor="@color/primary_text"
android:textSize="12sp"
android:id="@+id/page_number"/>
<include layout="@layout/reader_menu"/> <include layout="@layout/reader_menu"/>

View file

@ -9,7 +9,7 @@
android:id="@+id/myanimelist_title_layout" android:id="@+id/myanimelist_title_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall" android:layout_height="?android:listPreferredItemHeightSmall"
android:background="?attr/selectableItemBackground" android:background="?attr/selectable_list_drawable"
android:clickable="true" android:clickable="true"
android:paddingLeft="?android:listPreferredItemPaddingLeft" android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"> android:paddingRight="?android:listPreferredItemPaddingRight">
@ -18,7 +18,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="Title"/> android:text="Title"
style="@style/TextAppearance.Regular.Body1"/>
<TextView <TextView
android:id="@+id/myanimelist_title" android:id="@+id/myanimelist_title"
@ -26,7 +27,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="Edit..."/> android:text="Edit"
style="@style/TextAppearance.Medium.Button"/>
</RelativeLayout> </RelativeLayout>
@ -35,23 +37,25 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_below="@id/myanimelist_title_layout" android:layout_below="@id/myanimelist_title_layout"
android:background="@color/list_choice_pressed_bg_light" /> android:background="?android:attr/divider" />
<RelativeLayout <RelativeLayout
android:id="@+id/myanimelist_status_layout" android:id="@+id/myanimelist_status_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall" android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider1" android:layout_below="@id/divider1"
android:background="?attr/selectableItemBackground" android:background="?attr/selectable_list_drawable"
android:clickable="true" android:clickable="true"
android:paddingLeft="?android:listPreferredItemPaddingLeft" android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"> android:paddingRight="?android:listPreferredItemPaddingRight"
>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="Status"/> android:text="Status"
style="@style/TextAppearance.Regular.Body1"/>
<TextView <TextView
android:id="@+id/myanimelist_status" android:id="@+id/myanimelist_status"
@ -59,7 +63,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
tools:text="Reading"/> tools:text="Reading"
style="@style/TextAppearance.Regular.Body1.Secondary"/>
</RelativeLayout> </RelativeLayout>
@ -68,14 +73,14 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_below="@id/myanimelist_status_layout" android:layout_below="@id/myanimelist_status_layout"
android:background="@color/list_choice_pressed_bg_light" /> android:background="?android:attr/divider" />
<RelativeLayout <RelativeLayout
android:id="@+id/myanimelist_chapters_layout" android:id="@+id/myanimelist_chapters_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall" android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider2" android:layout_below="@id/divider2"
android:background="?attr/selectableItemBackground" android:background="?attr/selectable_list_drawable"
android:clickable="true" android:clickable="true"
android:paddingLeft="?android:listPreferredItemPaddingLeft" android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"> android:paddingRight="?android:listPreferredItemPaddingRight">
@ -84,7 +89,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="Chapters"/> android:text="Chapters"
style="@style/TextAppearance.Regular.Body1"/>
<TextView <TextView
android:id="@+id/myanimelist_chapters" android:id="@+id/myanimelist_chapters"
@ -92,7 +98,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
tools:text="12/24"/> tools:text="12/24"
style="@style/TextAppearance.Regular.Body1.Secondary"/>
</RelativeLayout> </RelativeLayout>
@ -101,14 +108,14 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_below="@id/myanimelist_chapters_layout" android:layout_below="@id/myanimelist_chapters_layout"
android:background="@color/list_choice_pressed_bg_light" /> android:background="?android:attr/divider" />
<RelativeLayout <RelativeLayout
android:id="@+id/myanimelist_score_layout" android:id="@+id/myanimelist_score_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall" android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider3" android:layout_below="@id/divider3"
android:background="?attr/selectableItemBackground" android:background="?attr/selectable_list_drawable"
android:clickable="true" android:clickable="true"
android:paddingLeft="?android:listPreferredItemPaddingLeft" android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"> android:paddingRight="?android:listPreferredItemPaddingRight">
@ -117,7 +124,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="@string/score"/> android:text="@string/score"
style="@style/TextAppearance.Regular.Body1"/>
<TextView <TextView
android:id="@+id/myanimelist_score" android:id="@+id/myanimelist_score"
@ -125,7 +133,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
tools:text="10"/> tools:text="10"
style="@style/TextAppearance.Regular.Body1.Secondary"/>
</RelativeLayout> </RelativeLayout>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/image_view"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"/>
android:id="@+id/image_view" />

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<eu.kanade.tachiyomi.widget.MinMaxNumberPicker <eu.kanade.tachiyomi.widget.MinMaxNumberPicker
android:id="@+id/chapters_picker"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:id="@+id/chapters_picker" app:max="9999"
app:min="0" app:min="0"/>
app:max="9999"/>
</LinearLayout> </LinearLayout>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<eu.kanade.tachiyomi.widget.MinMaxNumberPicker <eu.kanade.tachiyomi.widget.MinMaxNumberPicker
android:id="@+id/score_picker"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:id="@+id/score_picker" app:max="10"
app:min="0" app:min="0"/>
app:max="10"/>
</LinearLayout> </LinearLayout>

View file

@ -1,31 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/margin_left" android:paddingLeft="@dimen/margin_left"
android:paddingRight="@dimen/margin_right" android:paddingRight="@dimen/margin_right">
android:orientation="horizontal">
<EditText <EditText
android:id="@+id/myanimelist_search_field"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:id="@+id/myanimelist_search_field" android:hint="@string/title_hint"/>
android:hint="@string/title_hint" />
<!--
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_clear_grey600_24dp"/>
-->
</LinearLayout> </LinearLayout>
@ -34,21 +27,21 @@
style="?android:attr/progressBarStyle" style="?android:attr/progressBarStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:paddingTop="32dp"
android:paddingBottom="32dp"
android:layout_gravity="center_vertical|center_horizontal" android:layout_gravity="center_vertical|center_horizontal"
android:paddingBottom="32dp"
android:paddingTop="32dp"
android:visibility="gone"/> android:visibility="gone"/>
<ListView <ListView
android:id="@+id/myanimelist_search_results"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/myanimelist_search_results" android:choiceMode="singleChoice"
android:scrollbarStyle="outsideOverlay" android:clipToPadding="false"
android:divider="@null" android:divider="@null"
android:dividerHeight="0dp" android:dividerHeight="0dp"
android:clipToPadding="false" android:listSelector="?attr/selectable_list_drawable"
android:choiceMode="singleChoice" android:scrollbarStyle="outsideOverlay"
android:listSelector="@color/list_choice_pressed_bg_light"
android:visibility="gone"/> android:visibility="gone"/>
</LinearLayout> </LinearLayout>

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/myanimelist_result_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/myanimelist_result_title"
android:padding="10dp"/> android:padding="10dp"/>
</LinearLayout> </LinearLayout>

View file

@ -15,22 +15,24 @@
android:layout_gravity="center_vertical|center_horizontal" android:layout_gravity="center_vertical|center_horizontal"
android:visibility="gone"/> android:visibility="gone"/>
<ViewSwitcher <ViewSwitcher
android:id="@+id/switcher"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1">
android:id="@+id/switcher">
<eu.kanade.tachiyomi.widget.AutofitRecyclerView <eu.kanade.tachiyomi.widget.AutofitRecyclerView
android:id="@+id/catalogue_grid" android:id="@+id/catalogue_grid"
style="@style/AppTheme.GridView" style="@style/Theme.Widget.GridView"
android:columnWidth="140dp"
tools:listitem="@layout/item_catalogue_grid" />
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/catalogue_list"/> android:columnWidth="140dp"
tools:listitem="@layout/item_catalogue_grid"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/catalogue_list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</ViewSwitcher> </ViewSwitcher>

View file

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/recycler"> android:id="@+id/recycler"
tools:listitem="@layout/item_download">
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>

View file

@ -4,9 +4,9 @@
android:orientation="vertical"> android:orientation="vertical">
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:id="@+id/view_pager">
</android.support.v4.view.ViewPager> </android.support.v4.view.ViewPager>

View file

@ -6,8 +6,10 @@
<eu.kanade.tachiyomi.widget.AutofitRecyclerView <eu.kanade.tachiyomi.widget.AutofitRecyclerView
android:id="@+id/recycler" android:id="@+id/recycler"
style="@style/AppTheme.GridView" style="@style/Theme.Widget.GridView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnWidth="140dp" android:columnWidth="140dp"
tools:listitem="@layout/item_catalogue_grid" /> tools:listitem="@layout/item_catalogue_grid"/>
</FrameLayout> </FrameLayout>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
@ -20,7 +20,6 @@
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"
android:background="@color/white"
tools:listitem="@layout/item_chapter"> tools:listitem="@layout/item_chapter">
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>
@ -33,12 +32,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="@color/colorPrimary" android:background="?attr/colorPrimary"
android:elevation="4dp" android:elevation="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:gravity="top|start" android:gravity="top|start"
android:theme="@style/AppTheme.Popup"> android:paddingLeft="12dp"
android:paddingRight="12dp">
<ImageView <ImageView
android:id="@+id/sort_btn" android:id="@+id/sort_btn"
@ -61,10 +59,11 @@
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="10dp" android:layout_margin="10dp"
android:background="@color/white"/> android:background="@color/md_white_1000"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/show_unread" android:id="@+id/show_unread"
style="@style/Theme.Widget.CheckBox.Light"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -72,8 +71,9 @@
android:text="@string/action_show_unread" android:text="@string/action_show_unread"
android:title="@string/action_show_unread"/> android:title="@string/action_show_unread"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/show_downloaded" android:id="@+id/show_downloaded"
style="@style/Theme.Widget.CheckBox.Light"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -85,19 +85,18 @@
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="10dp" android:layout_margin="10dp"
android:background="@color/white"/> android:background="@color/md_white_1000"/>
</LinearLayout> </LinearLayout>
<ImageView <android.support.v7.widget.AppCompatImageView
android:id="@+id/next_unread_btn" android:id="@+id/next_unread_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:background="?android:selectableItemBackground" android:layout_alignParentRight="true"
app:srcCompat="@drawable/ic_play_arrow_white_36dp" android:title="@string/action_next_unread"
android:title="@string/action_next_unread"/> app:srcCompat="@drawable/ic_play_arrow_white_36dp"/>
</RelativeLayout> </RelativeLayout>

View file

@ -67,17 +67,24 @@
<TextView <TextView
android:id="@+id/manga_author_label" android:id="@+id/manga_author_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_author_label" android:text="@string/manga_info_author_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_author" android:id="@+id/manga_author"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -90,17 +97,24 @@
<TextView <TextView
android:id="@+id/manga_artist_label" android:id="@+id/manga_artist_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_artist_label" android:text="@string/manga_info_artist_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_artist" android:id="@+id/manga_artist"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -113,17 +127,24 @@
<TextView <TextView
android:id="@+id/manga_chapters_label" android:id="@+id/manga_chapters_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_chapters_label" android:text="@string/manga_info_chapters_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_chapters" android:id="@+id/manga_chapters"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -136,17 +157,24 @@
<TextView <TextView
android:id="@+id/manga_status_label" android:id="@+id/manga_status_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_status_label" android:text="@string/manga_info_status_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_status" android:id="@+id/manga_status"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -159,17 +187,24 @@
<TextView <TextView
android:id="@+id/manga_source_label" android:id="@+id/manga_source_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_source_label" android:text="@string/manga_info_source_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_source" android:id="@+id/manga_source"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -182,18 +217,24 @@
<TextView <TextView
android:id="@+id/manga_genres_label" android:id="@+id/manga_genres_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/manga_info_genres_label" android:text="@string/manga_info_genres_label"
android:textIsSelectable="false"
/> />
<TextView <TextView
android:id="@+id/manga_genres" android:id="@+id/manga_genres"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="false" android:singleLine="false"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
@ -218,17 +259,23 @@
<TextView <TextView
android:id="@+id/manga_summary_label" android:id="@+id/manga_summary_label"
style="@style/manga_detail_label" style="@style/TextAppearance.Medium.Body2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/description"/> android:ellipsize="end"
android:paddingRight="10dp"
android:singleLine="true"
android:text="@string/description"
android:textIsSelectable="false"/>
<TextView <TextView
android:id="@+id/manga_summary" android:id="@+id/manga_summary"
style="@style/manga_detail_text" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="false" android:singleLine="false"
android:textIsSelectable="false"
/> />
</LinearLayout> </LinearLayout>
@ -241,12 +288,11 @@
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fab_favorite" android:id="@+id/fab_favorite"
android:layout_width="@dimen/fab_size" style="@style/Theme.Widget.FAB"
android:layout_height="@dimen/fab_size" android:layout_gravity=""
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/ic_bookmark_border_white_24dp"
app:backgroundTint="@color/colorPrimary"
app:layout_anchor="@id/top_view" app:layout_anchor="@id/top_view"
app:layout_anchorGravity="bottom|right|end"/> app:layout_anchorGravity="bottom|right|end"
app:layout_behavior=""
app:srcCompat="@drawable/ic_bookmark_border_white_24dp"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/swipe_refresh" android:orientation="vertical"
android:paddingTop="@dimen/margin_top"
android:paddingBottom="@dimen/margin_bottom" android:paddingBottom="@dimen/margin_bottom"
android:paddingLeft="@dimen/margin_left"
android:paddingRight="@dimen/margin_right" android:paddingRight="@dimen/margin_right"
android:paddingLeft="@dimen/margin_left"> android:paddingTop="@dimen/margin_top">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -10,7 +10,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"
android:background="@color/white"
tools:listitem="@layout/item_recent_chapter"> tools:listitem="@layout/item_recent_chapter">
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>

View file

@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/selector_chapter_light"> android:background="?attr/selectable_list_drawable">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -21,8 +21,8 @@
android:id="@+id/thumbnail" android:id="@+id/thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="?android:attr/colorBackground"
tools:background="@color/md_red_100" tools:background="?android:attr/colorBackground"
tools:src="@mipmap/ic_launcher"/> tools:src="@mipmap/ic_launcher"/>
<View <View
@ -32,37 +32,26 @@
android:background="@drawable/gradient_shape" android:background="@drawable/gradient_shape"
app:layout_heightPercent="50%"/> app:layout_heightPercent="50%"/>
</android.support.percent.PercentFrameLayout> </android.support.percent.PercentFrameLayout>
<TextView <TextView
android:id="@+id/unreadText" android:id="@+id/unreadText"
style="@style/TextAppearance.Regular.Caption.Light"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:background="@color/manga_unread_bg" android:background="?attr/colorAccent"
android:paddingBottom="1dp" android:paddingBottom="1dp"
android:paddingLeft="3dp" android:paddingLeft="3dp"
android:paddingRight="3dp" android:paddingRight="3dp"
android:paddingTop="1dp" android:paddingTop="1dp"
android:textColor="@color/white"
android:textSize="12sp"
android:visibility="gone"/> android:visibility="gone"/>
<!--<com.mikepenz.iconics.view.IconicsImageView-->
<!--android:id="@+id/favorite_sticker"-->
<!--android:layout_width="24dp"-->
<!--android:layout_height="24dp"-->
<!--android:layout_alignEnd="@+id/image_container"-->
<!--android:layout_alignRight="@+id/image_container"-->
<!--android:layout_alignTop="@+id/image_container"-->
<!--android:layout_marginEnd="5dp"-->
<!--android:layout_marginRight="5dp"-->
<!--android:layout_marginTop="5dp"-->
<!--android:visibility="invisible"/>-->
<eu.kanade.tachiyomi.widget.PTSansTextView <eu.kanade.tachiyomi.widget.PTSansTextView
android:id="@+id/title" android:id="@+id/title"
style="@style/TextAppearance.Regular.Body1.Light"
app:typeface="ptsansNarrowBold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/image_container" android:layout_alignBottom="@+id/image_container"
@ -71,13 +60,10 @@
android:lineSpacingExtra="-4dp" android:lineSpacingExtra="-4dp"
android:maxLines="2" android:maxLines="2"
android:padding="8dp" android:padding="8dp"
android:shadowColor="@color/primary_text" android:shadowColor="@color/textColorPrimaryLight"
android:shadowDx="0" android:shadowDx="0"
android:shadowDy="0" android:shadowDy="0"
android:shadowRadius="4" android:shadowRadius="4"
android:textColor="@color/white"
android:textSize="14sp"
app:typeface="ptsansNarrowBold"
tools:text="Sample name"/> tools:text="Sample name"/>
</RelativeLayout> </RelativeLayout>

View file

@ -3,14 +3,15 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall" android:layout_height="?android:listPreferredItemHeightSmall"
android:background="@drawable/selector_chapter_light"> android:background="?attr/selectable_list_drawable">
<TextView <TextView
android:id="@+id/title"
style="@style/TextAppearance.Regular.Body1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:paddingLeft="?android:listPreferredItemPaddingLeft" android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingLeft" android:paddingRight="?android:listPreferredItemPaddingLeft"/>
android:id="@+id/title"/>
</FrameLayout> </FrameLayout>

View file

@ -4,7 +4,7 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight" android:layout_height="?android:attr/listPreferredItemHeight"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/selector_chapter_light"> android:background="?attr/selectable_list_drawable">
<RelativeLayout <RelativeLayout
@ -31,7 +31,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:ellipsize="marquee" android:ellipsize="marquee"
android:singleLine="true" android:singleLine="true"
android:textSize="12sp" style="@style/TextAppearance.Regular.Caption.Hint"
tools:text="Pages: 45"/> tools:text="Pages: 45"/>
<TextView <TextView
@ -40,7 +40,7 @@
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:ellipsize="marquee" android:ellipsize="marquee"
android:singleLine="true" android:singleLine="true"
android:textSize="12sp" style="@style/TextAppearance.Regular.Body1"
tools:text="22/02/2016"/> tools:text="22/02/2016"/>
<TextView <TextView
@ -51,8 +51,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="@color/accent_text" style="@style/TextAppearance.Regular.Caption.Hint"/>
android:textSize="12sp"/>
</RelativeLayout> </RelativeLayout>
<TextView <TextView
@ -70,7 +69,7 @@
android:ellipsize="middle" android:ellipsize="middle"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:textSize="17sp" style="@style/TextAppearance.Regular.SubHeading"
tools:text="Title"/> tools:text="Title"/>
@ -88,14 +87,14 @@
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingRight="?android:attr/listPreferredItemPaddingRight"> android:paddingRight="?android:attr/listPreferredItemPaddingRight">
<ImageView <android.support.v7.widget.AppCompatImageView
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_alignParentEnd="false" android:layout_alignParentEnd="false"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:background="?android:selectableItemBackground" app:srcCompat="@drawable/ic_more_horiz_black_24dp"
app:srcCompat="@drawable/ic_more_horiz_black_24dp"/> android:tint="?android:attr/textColorPrimary"/>
</RelativeLayout> </RelativeLayout>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"> android:layout_marginRight="15dp">
@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/download_progress_text" android:id="@+id/download_progress_text"
android:layout_gravity="left" /> android:layout_gravity="start" />
</LinearLayout> </LinearLayout>

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightLarge" android:layout_height="?android:attr/listPreferredItemHeightLarge"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:background="@drawable/selector_chapter_light"> android:background="?attr/selectable_list_drawable"
>
<ImageView <ImageView
android:id="@+id/image" android:id="@+id/image"
android:layout_width="50dp" android:layout_width="50dp"
@ -21,7 +21,7 @@
android:layout_marginRight="@dimen/margin_right" android:layout_marginRight="@dimen/margin_right"
android:layout_marginEnd="@dimen/margin_right"/> android:layout_marginEnd="@dimen/margin_right"/>
<ImageView <android.support.v7.widget.AppCompatImageView
android:id="@+id/reorder" android:id="@+id/reorder"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
@ -33,7 +33,8 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
app:srcCompat="@drawable/ic_reorder_grey_24dp"/> app:srcCompat="@drawable/ic_reorder_grey_24dp"
android:tint="?android:attr/textColorPrimary"/>
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
@ -46,8 +47,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textAppearance="@style/TextAppearance.Regular.SubHeading"
android:textColor="@color/primary_text"
tools:text="Title"/> tools:text="Title"/>
</RelativeLayout> </RelativeLayout>

View file

@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight" android:layout_height="?android:attr/listPreferredItemHeight"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto">
android:background="@drawable/selector_chapter_light">
<RelativeLayout <RelativeLayout
@ -31,7 +30,6 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="@color/accent_text"
android:textSize="12sp"/> android:textSize="12sp"/>
</RelativeLayout> </RelativeLayout>
@ -51,7 +49,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.Regular.Body1"
tools:text="My manga"/> tools:text="My manga"/>
<TextView <TextView
@ -60,7 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.Regular.Caption"
tools:text="Title"/> tools:text="Title"/>
</LinearLayout> </LinearLayout>
@ -82,7 +80,7 @@
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"> android:paddingLeft="?android:attr/listPreferredItemPaddingLeft">
<ImageView <android.support.v7.widget.AppCompatImageView
android:id="@+id/chapterMenu" android:id="@+id/chapterMenu"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
@ -90,7 +88,8 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:background="?android:selectableItemBackground" android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_more_horiz_black_24dp"/> app:srcCompat="@drawable/ic_more_horiz_black_24dp"
android:tint="?android:attr/textColorPrimary"/>
</RelativeLayout> </RelativeLayout>

View file

@ -4,22 +4,20 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="32dp" android:layout_height="32dp"
android:background="?attr/colorPrimary"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingRight" android:paddingRight="?android:attr/listPreferredItemPaddingRight"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="?android:attr/listPreferredItemPaddingStart">
android:background="@color/colorPrimary">
<TextView <TextView
android:id="@+id/section_text"
style="@style/TextAppearance.Regular.SubHeading.Light.Bold"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="16sp"
android:id="@+id/section_text"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textStyle="bold" /> android:singleLine="true"/>
</FrameLayout> </FrameLayout>

View file

@ -5,9 +5,9 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<FrameLayout <FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:id="@+id/frame_container">
<ProgressBar <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
@ -17,12 +17,12 @@
android:layout_gravity="center_vertical|center_horizontal"/> android:layout_gravity="center_vertical|center_horizontal"/>
<Button <Button
android:id="@+id/retry_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/retry_button"
android:text="@string/action_retry"
android:layout_gravity="center_vertical|center_horizontal" android:layout_gravity="center_vertical|center_horizontal"
android:visibility="gone" /> android:text="@string/action_retry"
android:visibility="gone"/>
</FrameLayout> </FrameLayout>

View file

@ -5,10 +5,9 @@
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/AppTheme.Overlay.Dark"
android:background="@color/colorPrimary"
android:visibility="gone" android:visibility="gone"
android:theme="@style/Theme.ActionBar.Tab"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="center" app:tabGravity="center"
app:tabMode="scrollable" app:tabMode="scrollable"
app:tabMinWidth="75dp" app:tabMinWidth="75dp"/>
app:tabIndicatorColor="@color/white"/>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout android:id="@+id/nnf_item_container"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nnf_item_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeight" android:layout_height="?android:listPreferredItemHeight"
android:background="?selectableItemBackground" android:background="?selectableItemBackground"
@ -21,7 +21,7 @@
android:src="@drawable/nnf_ic_file_folder" android:src="@drawable/nnf_ic_file_folder"
android:tint="?attr/colorAccent" android:tint="?attr/colorAccent"
android:visibility="visible" android:visibility="visible"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription"/>
<TextView <TextView
android:id="@android:id/text1" android:id="@android:id/text1"
@ -33,5 +33,5 @@
android:maxLines="1" android:maxLines="1"
android:padding="8dp" android:padding="8dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/nnf_name" /> android:text="@string/nnf_name"/>
</LinearLayout> </LinearLayout>

View file

@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="192dp" android:layout_height="@dimen/navigation_drawer_header_height"
android:gravity="bottom" android:gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Dark"> android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:scaleType="centerCrop" android:background="?attr/colorPrimary"
android:background="@drawable/header" /> android:scaleType="centerCrop"/>
<ImageView <ImageView
android:layout_marginLeft="16dp"
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
android:layout_width="64dp" android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/test" /> android:src="@drawable/icon"/>
<!--
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="52dp" android:layout_height="52dp"
@ -34,17 +35,20 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="Desarrollador Android" android:text="John Doe"
android:textAppearance="@style/TextAppearance.AppCompat.Body2" /> android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:visibility="gone"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="thedahnark@gmail.com" android:text="email@email.com"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="gone"/>
</LinearLayout> </LinearLayout>
-->
</FrameLayout> </FrameLayout>

View file

@ -1,25 +1,26 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp"> android:padding="24dp">
<TextView <TextView
android:id="@+id/dialog_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/dialog_title" android:layout_gravity="center_horizontal"
android:textStyle="bold"
android:textSize="16sp" android:textSize="16sp"
android:layout_gravity="center_horizontal" /> android:textStyle="bold"/>
<View android:id="@+id/titleDivider" <View
android:id="@+id/titleDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/line_grey" android:layout_marginBottom="24dp"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:layout_marginBottom="24dp"/> android:background="@color/dividerLight"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -27,9 +28,9 @@
android:text="@string/username"/> android:text="@string/username"/>
<EditText <EditText
android:id="@+id/username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"/>
android:id="@+id/username" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -38,28 +39,28 @@
android:text="@string/password"/> android:text="@string/password"/>
<EditText <EditText
android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textPassword"
android:ems="10" android:ems="10"
android:id="@+id/password" /> android:inputType="textPassword"/>
<CheckBox <CheckBox
android:id="@+id/show_password"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/show_password" android:layout_marginTop="10dp"
android:id="@+id/show_password" android:text="@string/show_password"/>
android:layout_marginTop="10dp"/>
<com.dd.processbutton.iml.ActionProcessButton <com.dd.processbutton.iml.ActionProcessButton
android:id="@+id/login"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/white" android:layout_marginTop="20dp"
android:text="@string/login" android:text="@string/login"
android:id="@+id/login" android:textColor="@android:color/white"
app:pb_textComplete="@string/login_success" app:pb_textComplete="@string/login_success"
app:pb_textProgress="@string/loading"
app:pb_textError="@string/invalid_login" app:pb_textError="@string/invalid_login"
android:layout_marginTop="20dp"/> app:pb_textProgress="@string/loading"/>
</LinearLayout> </LinearLayout>

View file

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingTop="@dimen/dialog_margin_top_content" android:orientation="horizontal"
android:paddingBottom="@dimen/dialog_content_padding"
android:paddingLeft="@dimen/dialog_content_padding" android:paddingLeft="@dimen/dialog_content_padding"
android:paddingRight="@dimen/dialog_content_padding" android:paddingRight="@dimen/dialog_content_padding"
android:paddingBottom="@dimen/dialog_content_padding"> android:paddingTop="@dimen/dialog_margin_top_content">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -25,8 +25,8 @@
android:id="@+id/portrait_columns" android:id="@+id/portrait_columns"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:min="0" app:max="10"
app:max="10"/> app:min="0"/>
</LinearLayout> </LinearLayout>
@ -34,8 +34,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -46,8 +46,8 @@
android:id="@+id/landscape_columns" android:id="@+id/landscape_columns"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:min="0" app:max="10"
app:max="10"/> app:min="0"/>
</LinearLayout> </LinearLayout>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android" <ImageView android:id="@+id/image_view"
android:id="@+id/image_view" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content">

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout android:id="@+id/reader_menu"
xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/reader_menu"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
@ -12,18 +12,17 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/reader_menu_background" android:background="?colorPrimary"
android:theme="@style/AppTheme.Overlay.Dark" android:elevation="4dp"
app:popupTheme="@style/AppTheme.Popup" android:theme="?attr/actionBarTheme"/>
android:elevation="4dp" />
<LinearLayout <LinearLayout
android:id="@+id/reader_menu_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/reader_menu_bottom" android:layout_alignParentBottom="true"
android:background="@color/reader_menu_background" android:background="?colorPrimary"
android:orientation="vertical" android:orientation="vertical">
android:layout_alignParentBottom="true">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -33,87 +32,85 @@
android:id="@+id/current_page" android:id="@+id/current_page"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textColor="@color/light_grey" android:layout_marginBottom="12dp"
android:textSize="15sp" android:layout_marginLeft="8dp"
android:gravity="center_horizontal"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" /> android:gravity="center_horizontal"
android:textSize="15sp"/>
<SeekBar <SeekBar
android:id="@+id/page_seeker" android:id="@+id/page_seeker"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:theme="@style/AppTheme.Overlay.Dark" android:layout_weight="1"
/> />
<TextView <TextView
android:id="@+id/total_pages" android:id="@+id/total_pages"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textColor="@color/light_grey" android:layout_marginRight="8dp"
android:textSize="15sp" android:gravity="center_horizontal"
android:gravity="center_horizontal" /> android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<View android:background="#777777" <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" /> android:layout_height="1dp"
android:background="#777777"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"> android:layout_height="?attr/actionBarSize">
<ImageButton <android.support.v7.widget.AppCompatImageButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/lock_orientation" android:id="@+id/lock_orientation"
app:srcCompat="@drawable/ic_screen_rotation_white_24dp"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" />
<ImageButton
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_screen_rotation_white_24dp"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/reader_zoom_selector" android:id="@+id/reader_zoom_selector"
app:srcCompat="@drawable/ic_crop_original_white_24dp"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground"/>
<ImageButton
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_crop_original_white_24dp"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/reader_scale_type_selector" android:id="@+id/reader_scale_type_selector"
app:srcCompat="@drawable/ic_zoom_out_map_white_24dp"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" />
<ImageButton
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_zoom_out_map_white_24dp"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/reader_selector" android:id="@+id/reader_selector"
app:srcCompat="@drawable/ic_view_carousel_white_24dp"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" />
<ImageButton
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/reader_extra_settings"
app:srcCompat="@drawable/ic_more_vert_white_24dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground" /> android:layout_weight="1"
android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_view_carousel_white_24dp"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/reader_extra_settings"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="?android:selectableItemBackground"
app:srcCompat="@drawable/ic_more_vert_white_24dp"/>
</LinearLayout> </LinearLayout>

View file

@ -1,69 +1,89 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/reader_menu_background" xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingRight="10dp" android:background="?attr/colorPrimary"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingTop="5dp" android:paddingRight="10dp"
android:paddingBottom="5dp"> android:paddingTop="5dp">
<LinearLayout <LinearLayout
android:id="@+id/image_decoder_container"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:id="@+id/image_decoder_container">
<TextView <TextView
android:id="@+id/image_decoder_initial" android:id="@+id/image_decoder_initial"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp"
android:gravity="center" android:gravity="center"
android:textColor="@color/colorAccent"/> android:textColor="@color/colorAccent"
style="@style/TextAppearance.Regular.SubHeading"/>
<TextView <TextView
android:id="@+id/image_decoder" android:id="@+id/image_decoder"
style="@style/reader_menu_settings_item" android:layout_width="wrap_content"
android:text="@string/pref_image_decoder"/> android:layout_height="36dp"
android:gravity="center"
android:text="@string/pref_image_decoder"
style="@style/TextAppearance.Regular.Body1.Light"/>
</LinearLayout> </LinearLayout>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/reader_theme" android:id="@+id/reader_theme"
style="@style/reader_menu_settings_item"
android:button="@drawable/reader_background_checkbox" android:button="@drawable/reader_background_checkbox"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:text="@string/pref_reader_theme"/> android:text="@string/pref_reader_theme"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/enable_transitions" android:id="@+id/enable_transitions"
style="@style/reader_menu_settings_item" android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center"
android:text="@string/pref_enable_transitions"/> android:text="@string/pref_enable_transitions"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/show_page_number" android:id="@+id/show_page_number"
style="@style/reader_menu_settings_item" android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center"
android:text="@string/pref_show_page_number"/> android:text="@string/pref_show_page_number"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/hide_status_bar" android:id="@+id/hide_status_bar"
style="@style/reader_menu_settings_item" android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center"
android:text="@string/pref_hide_status_bar"/> android:text="@string/pref_hide_status_bar"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/keep_screen_on" android:id="@+id/keep_screen_on"
style="@style/reader_menu_settings_item" android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center"
android:text="@string/pref_keep_screen_on"/> android:text="@string/pref_keep_screen_on"/>
<CheckBox <android.support.v7.widget.AppCompatCheckBox
android:id="@+id/custom_brightness"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/reader_menu_settings_item" android:gravity="center"
android:text="@string/pref_custom_brightness" android:text="@string/pref_custom_brightness"/>
android:id="@+id/custom_brightness" />
<SeekBar <SeekBar
android:id="@+id/brightness_seekbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/brightness_seekbar" /> style="@style/TextAppearance.Regular.Body1.Light"/>
</LinearLayout> </LinearLayout>

View file

@ -5,7 +5,6 @@
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/AppTheme.Overlay.Dark" android:theme="@style/Theme.ActionBar.Tab.Filled"
app:tabGravity="fill" app:tabIndicatorColor="@android:color/white"
android:background="@color/colorPrimary" />
app:tabIndicatorColor="@color/white"/>

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v7.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary" android:background="?attr/colorPrimary"
android:theme="@style/AppTheme.ActionBar"/> android:theme="?attr/actionBarTheme"/>

View file

@ -5,26 +5,26 @@
<item <item
android:checked="true" android:checked="true"
android:id="@+id/nav_drawer_library" android:id="@+id/nav_drawer_library"
android:icon="@drawable/ic_book_grey_24dp" android:icon="@drawable/ic_book_black_24dp"
android:title="@string/label_library" /> android:title="@string/label_library" />
<item <item
android:id="@+id/nav_drawer_recent_updates" android:id="@+id/nav_drawer_recent_updates"
android:icon="@drawable/ic_history_grey_24dp" android:icon="@drawable/ic_history_black_24dp"
android:title="@string/label_recent_updates" /> android:title="@string/label_recent_updates" />
<item <item
android:id="@+id/nav_drawer_catalogues" android:id="@+id/nav_drawer_catalogues"
android:icon="@drawable/ic_explore_grey_24dp" android:icon="@drawable/ic_explore_black_24dp"
android:title="@string/label_catalogues" /> android:title="@string/label_catalogues" />
<item <item
android:id="@+id/nav_drawer_downloads" android:id="@+id/nav_drawer_downloads"
android:icon="@drawable/ic_file_download_grey_24dp" android:icon="@drawable/ic_file_download_black_24dp"
android:title="@string/label_download_queue" /> android:title="@string/label_download_queue" />
</group> </group>
<group android:id="@+id/group_settings" <group android:id="@+id/group_settings"
android:checkableBehavior="single"> android:checkableBehavior="none">
<item <item
android:id="@+id/nav_drawer_settings" android:id="@+id/nav_drawer_settings"
android:icon="@drawable/ic_settings_grey_24dp" android:icon="@drawable/ic_settings_black_24dp"
android:title="@string/label_settings" /> android:title="@string/label_settings" />
</group> </group>
</menu> </menu>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="navigation_drawer_header_height">135dp</dimen>
</resources>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="navigation_drawer_header_height">180dp</dimen>
</resources>

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