Rewrote Theme
|
@ -15,10 +15,10 @@
|
|||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:hardwareAccelerated="true"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/Theme.Tachiyomi" >
|
||||
<activity
|
||||
android:name=".ui.main.MainActivity"
|
||||
android:theme="@style/AppTheme.BrandedLaunch">
|
||||
android:theme="@style/Theme.BrandedLaunch">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.acra.ACRA;
|
|||
import org.acra.annotation.ReportsCrashes;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper;
|
||||
import eu.kanade.tachiyomi.injection.ComponentReflectionInjector;
|
||||
import eu.kanade.tachiyomi.injection.component.AppComponent;
|
||||
import eu.kanade.tachiyomi.injection.component.DaggerAppComponent;
|
||||
|
@ -24,6 +25,8 @@ public class App extends Application {
|
|||
AppComponent applicationComponent;
|
||||
ComponentReflectionInjector<AppComponent> componentInjector;
|
||||
|
||||
private int theme = 0;
|
||||
|
||||
public static App get(Context context) {
|
||||
return (App) context.getApplicationContext();
|
||||
}
|
||||
|
@ -38,10 +41,15 @@ public class App extends Application {
|
|||
componentInjector =
|
||||
new ComponentReflectionInjector<>(AppComponent.class, applicationComponent);
|
||||
|
||||
setupTheme();
|
||||
setupEventBus();
|
||||
setupAcra();
|
||||
}
|
||||
|
||||
private void setupTheme() {
|
||||
theme = PreferencesHelper.getTheme(this);
|
||||
}
|
||||
|
||||
protected DaggerAppComponent.Builder prepareAppComponent() {
|
||||
return DaggerAppComponent.builder()
|
||||
.appModule(new AppModule(this));
|
||||
|
@ -65,4 +73,12 @@ public class App extends Application {
|
|||
public ComponentReflectionInjector<AppComponent> getComponentReflection() {
|
||||
return componentInjector;
|
||||
}
|
||||
|
||||
public int getAppTheme() {
|
||||
return theme;
|
||||
}
|
||||
|
||||
public void setAppTheme(int theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,12 @@ class PreferencesHelper(private val context: Context) {
|
|||
return PreferenceManager.getDefaultSharedPreferences(context).getInt(
|
||||
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 {
|
||||
|
|
|
@ -10,7 +10,6 @@ import android.view.View
|
|||
import android.widget.TextView
|
||||
import eu.kanade.tachiyomi.App
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.injection.component.AppComponent
|
||||
import icepick.Icepick
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
|
@ -31,6 +30,13 @@ open class BaseActivity : AppCompatActivity() {
|
|||
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) {
|
||||
supportActionBar?.title = title
|
||||
}
|
||||
|
@ -83,7 +89,7 @@ open class BaseActivity : AppCompatActivity() {
|
|||
snack.show()
|
||||
}
|
||||
|
||||
protected val applicationComponent: AppComponent
|
||||
get() = App.get(this).component
|
||||
protected val app: App
|
||||
get() = App.get(this)
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package eu.kanade.tachiyomi.ui.base.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import eu.kanade.tachiyomi.App;
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter;
|
||||
|
@ -83,6 +84,12 @@ public abstract class BaseRxFragment<P extends Presenter> extends BaseFragment i
|
|||
@Override
|
||||
public void 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());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package eu.kanade.tachiyomi.ui.catalogue
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v7.widget.GridLayoutManager
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
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.main.MainActivity
|
||||
import eu.kanade.tachiyomi.ui.manga.MangaActivity
|
||||
import eu.kanade.tachiyomi.util.getResourceDrawable
|
||||
import eu.kanade.tachiyomi.util.toast
|
||||
import eu.kanade.tachiyomi.widget.EndlessGridScrollListener
|
||||
import eu.kanade.tachiyomi.widget.EndlessListScrollListener
|
||||
|
@ -155,8 +155,7 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), FlexibleViewHold
|
|||
catalogue_list.adapter = adapter
|
||||
catalogue_list.layoutManager = llm
|
||||
catalogue_list.addOnScrollListener(listScrollListener)
|
||||
catalogue_list.addItemDecoration(DividerItemDecoration(
|
||||
ContextCompat.getDrawable(context, R.drawable.line_divider)))
|
||||
catalogue_list.addItemDecoration(DividerItemDecoration(context.theme.getResourceDrawable(R.attr.divider_drawable)))
|
||||
|
||||
if (presenter.isListMode) {
|
||||
switcher.showNext()
|
||||
|
|
|
@ -27,9 +27,6 @@ class CatalogueGridHolder(private val view: View, adapter: CatalogueAdapter, lis
|
|||
// Set 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.
|
||||
view.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package eu.kanade.tachiyomi.ui.catalogue
|
||||
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.view.View
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.util.getResourceColor
|
||||
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) :
|
||||
CatalogueHolder(view, adapter, listener) {
|
||||
|
||||
private val favoriteColor = ContextCompat.getColor(view.context, R.color.hint_text)
|
||||
private val unfavoriteColor = ContextCompat.getColor(view.context, R.color.primary_text)
|
||||
private val favoriteColor = view.context.theme.getResourceColor(android.R.attr.textColorHint)
|
||||
private val unfavoriteColor = view.context.theme.getResourceColor(android.R.attr.textColorPrimary)
|
||||
|
||||
/**
|
||||
* Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this
|
||||
|
|
|
@ -57,6 +57,7 @@ class CategoryActivity : BaseRxActivity<CategoryPresenter>(), ActionMode.Callbac
|
|||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setAppTheme()
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Inflate activity_edit_categories.xml.
|
||||
|
|
|
@ -8,8 +8,6 @@ import eu.kanade.tachiyomi.data.download.DownloadService
|
|||
import eu.kanade.tachiyomi.data.download.model.Download
|
||||
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
|
||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
import eu.kanade.tachiyomi.util.setInformationDrawable
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.fragment_download_queue.*
|
||||
import nucleus.factory.RequiresPresenter
|
||||
import rx.Subscription
|
||||
|
@ -63,8 +61,8 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreate(bundle: Bundle?) {
|
||||
super.onCreate(bundle)
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
super.onCreate(savedState)
|
||||
setHasOptionsMenu(true)
|
||||
}
|
||||
|
||||
|
@ -190,10 +188,8 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
|
|||
* Set information view when queue is empty
|
||||
*/
|
||||
private fun setInformationView() {
|
||||
if (presenter.downloadQueue.isEmpty()) {
|
||||
( activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_file_download_grey_128dp)
|
||||
( activity as MainActivity).text_label.text = getString(R.string.information_no_downloads)
|
||||
}
|
||||
(activity as MainActivity).updateEmptyView(presenter.downloadQueue.isEmpty(),
|
||||
R.string.information_no_downloads, R.drawable.ic_file_download_black_128dp)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
|
|||
import eu.kanade.tachiyomi.ui.category.CategoryActivity
|
||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
import eu.kanade.tachiyomi.util.inflate
|
||||
import eu.kanade.tachiyomi.util.setInformationDrawable
|
||||
import eu.kanade.tachiyomi.util.toast
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.fragment_library.*
|
||||
|
@ -51,7 +50,8 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
|||
/**
|
||||
* AppBarLayout from [MainActivity].
|
||||
*/
|
||||
private lateinit var appBar: AppBarLayout
|
||||
private val appbar: AppBarLayout
|
||||
get() = (activity as MainActivity).appbar
|
||||
|
||||
/**
|
||||
* Position of the active category.
|
||||
|
@ -112,8 +112,8 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
super.onCreate(savedState)
|
||||
setHasOptionsMenu(true)
|
||||
isFilterDownloaded = presenter.preferences.filterDownloaded().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?) {
|
||||
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.
|
||||
// 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)
|
||||
appbar.addView(tabs)
|
||||
|
||||
adapter = LibraryAdapter(childFragmentManager)
|
||||
view_pager.adapter = adapter
|
||||
|
@ -150,14 +142,14 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
|||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
appBar.removeView(tabs)
|
||||
appbar.removeView(tabs)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(bundle: Bundle) {
|
||||
bundle.putInt(CATEGORY_KEY, view_pager.currentItem)
|
||||
bundle.putString(QUERY_KEY, query)
|
||||
super.onSaveInstanceState(bundle)
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
outState.putInt(CATEGORY_KEY, view_pager.currentItem)
|
||||
outState.putString(QUERY_KEY, query)
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
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>>) {
|
||||
// Check if library is empty and update information accordingly.
|
||||
if (mangaMap.isEmpty()) {
|
||||
(activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_book_grey_128dp)
|
||||
(activity as MainActivity).text_label.text = getString(R.string.information_empty_library)
|
||||
} else {
|
||||
( activity as MainActivity).image_view.setInformationDrawable(null)
|
||||
( activity as MainActivity).text_label.text = ""
|
||||
}
|
||||
(activity as MainActivity).updateEmptyView(mangaMap.isEmpty(),
|
||||
R.string.information_empty_library, R.drawable.ic_book_black_128dp)
|
||||
|
||||
// Get the current active category.
|
||||
val activeCat = if (adapter.categories != null) view_pager.currentItem else activeCategory
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -1,10 +1,13 @@
|
|||
package eu.kanade.tachiyomi.ui.main
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.Fragment
|
||||
import android.support.v4.view.GravityCompat
|
||||
import android.support.v4.widget.DrawerLayout
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
||||
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.recent.RecentChaptersFragment
|
||||
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.toolbar.*
|
||||
import nucleus.view.ViewWithPresenter
|
||||
|
||||
class MainActivity : BaseActivity() {
|
||||
lateinit var fragmentStack: FragmentStack
|
||||
|
||||
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
setTheme(R.style.AppTheme);
|
||||
setAppTheme()
|
||||
super.onCreate(savedState)
|
||||
|
||||
// Do not let the launcher create a new activity
|
||||
|
@ -38,64 +39,78 @@ class MainActivity : BaseActivity() {
|
|||
setupToolbar(toolbar)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp)
|
||||
|
||||
fragmentStack = FragmentStack(this, supportFragmentManager, R.id.frame_container
|
||||
) { fragment ->
|
||||
if (fragment is ViewWithPresenter<*>)
|
||||
fragment.presenter.destroy()
|
||||
}
|
||||
drawer.addDrawerListener(object : DrawerLayout.SimpleDrawerListener() {
|
||||
override fun onDrawerSlide(drawerView: View, slideOffset: Float) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
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
|
||||
nav_view.setNavigationItemSelectedListener(
|
||||
{ menuItem ->
|
||||
// Make information view invisible
|
||||
image_view.setInformationDrawable(null)
|
||||
text_label.text = ""
|
||||
nav_view.setNavigationItemSelectedListener { item ->
|
||||
// Make information view invisible
|
||||
image_view.setDrawableCompat(null)
|
||||
text_label.text = ""
|
||||
|
||||
when (menuItem.itemId) {
|
||||
R.id.nav_drawer_library -> {
|
||||
setFragment(LibraryFragment.newInstance())
|
||||
menuItem.isChecked = true
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
}
|
||||
R.id.nav_drawer_recent_updates -> {
|
||||
setFragment(RecentChaptersFragment.newInstance())
|
||||
menuItem.isChecked = true
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
}
|
||||
R.id.nav_drawer_catalogues -> {
|
||||
setFragment(CatalogueFragment.newInstance())
|
||||
menuItem.isChecked = true
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
}
|
||||
R.id.nav_drawer_downloads -> {
|
||||
setFragment(DownloadFragment.newInstance())
|
||||
menuItem.isChecked = true
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
}
|
||||
R.id.nav_drawer_settings -> {
|
||||
menuItem.isChecked = true
|
||||
startActivity(Intent(this, SettingsActivity::class.java))
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
}
|
||||
}
|
||||
true
|
||||
})
|
||||
when (item.itemId) {
|
||||
R.id.nav_drawer_library -> {
|
||||
setFragment(LibraryFragment.newInstance())
|
||||
item.isChecked = true
|
||||
}
|
||||
R.id.nav_drawer_recent_updates -> {
|
||||
setFragment(RecentChaptersFragment.newInstance())
|
||||
item.isChecked = true
|
||||
}
|
||||
R.id.nav_drawer_catalogues -> {
|
||||
setFragment(CatalogueFragment.newInstance())
|
||||
item.isChecked = true
|
||||
}
|
||||
R.id.nav_drawer_downloads -> {
|
||||
setFragment(DownloadFragment.newInstance())
|
||||
item.isChecked = true
|
||||
}
|
||||
R.id.nav_drawer_settings -> {
|
||||
item.isChecked = false
|
||||
startActivity(Intent(this, SettingsActivity::class.java))
|
||||
}
|
||||
}
|
||||
drawer.closeDrawer(GravityCompat.START)
|
||||
true
|
||||
}
|
||||
|
||||
setFragment(LibraryFragment.newInstance())
|
||||
if (savedState == null) {
|
||||
setFragment(LibraryFragment.newInstance())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
drawer.openDrawer(GravityCompat.START)
|
||||
return true
|
||||
}
|
||||
android.R.id.home -> drawer.openDrawer(GravityCompat.START)
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
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 = ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,6 +48,7 @@ class MangaActivity : BaseRxActivity<MangaPresenter>() {
|
|||
private set
|
||||
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
setAppTheme()
|
||||
super.onCreate(savedState)
|
||||
setContentView(R.layout.activity_manga)
|
||||
|
||||
|
|
|
@ -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.manga.MangaActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.util.getResourceDrawable
|
||||
import eu.kanade.tachiyomi.util.toast
|
||||
import kotlinx.android.synthetic.main.fragment_manga_chapters.*
|
||||
import nucleus.factory.RequiresPresenter
|
||||
|
@ -65,7 +66,7 @@ class ChaptersFragment : BaseRxFragment<ChaptersPresenter>(), ActionMode.Callbac
|
|||
recycler.adapter = adapter
|
||||
recycler.layoutManager = LinearLayoutManager(activity)
|
||||
recycler.addItemDecoration(DividerItemDecoration(
|
||||
ContextCompat.getDrawable(context, R.drawable.line_divider)))
|
||||
context.theme.getResourceDrawable(R.attr.divider_drawable)))
|
||||
recycler.setHasFixedSize(true)
|
||||
|
||||
swipe_refresh.setOnRefreshListener { fetchChapters() }
|
||||
|
|
|
@ -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.download.model.Download
|
||||
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder
|
||||
import eu.kanade.tachiyomi.util.getResourceColor
|
||||
import kotlinx.android.synthetic.main.item_chapter.view.*
|
||||
import rx.Observable
|
||||
import java.text.DateFormat
|
||||
|
@ -19,8 +20,8 @@ import java.util.*
|
|||
class ChaptersHolder(private val view: View, private val adapter: ChaptersAdapter, listener: FlexibleViewHolder.OnListItemClickListener) :
|
||||
FlexibleViewHolder(view, adapter, listener) {
|
||||
|
||||
private val readColor = ContextCompat.getColor(view.context, R.color.hint_text)
|
||||
private val unreadColor = ContextCompat.getColor(view.context, R.color.primary_text)
|
||||
private val readColor = view.context.theme.getResourceColor(android.R.attr.textColorHint)
|
||||
private val unreadColor = view.context.theme.getResourceColor(android.R.attr.textColorPrimary)
|
||||
private val decimalFormat = DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' })
|
||||
private val df = DateFormat.getDateInstance(DateFormat.SHORT)
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||
|
||||
@Override
|
||||
public void onCreate(Bundle savedState) {
|
||||
setTheme(R.style.Theme_Reader);
|
||||
super.onCreate(savedState);
|
||||
setContentView(R.layout.activity_reader);
|
||||
ButterKnife.bind(this);
|
||||
|
@ -85,6 +86,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||
|
||||
initializeSettings();
|
||||
|
||||
|
||||
maxBitmapSize = GLUtil.getMaxTextureSize();
|
||||
}
|
||||
|
||||
|
@ -393,12 +395,12 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||
View rootView = getWindow().getDecorView().getRootView();
|
||||
if (theme == BLACK_THEME) {
|
||||
rootView.setBackgroundColor(Color.BLACK);
|
||||
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.light_grey));
|
||||
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background_black));
|
||||
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryDark));
|
||||
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundDark));
|
||||
} else {
|
||||
rootView.setBackgroundColor(Color.WHITE);
|
||||
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.primary_text));
|
||||
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background));
|
||||
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryLight));
|
||||
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundLight));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
|||
|
||||
class PageDecodeErrorLayout(context: Context) : LinearLayout(context) {
|
||||
|
||||
private val lightGreyColor = ContextCompat.getColor(context, R.color.light_grey)
|
||||
private val blackColor = ContextCompat.getColor(context, R.color.primary_text)
|
||||
private val lightGreyColor = ContextCompat.getColor(context, android.R.attr.textColorHint)
|
||||
private val blackColor = ContextCompat.getColor(context, android.R.attr.textColorPrimary)
|
||||
|
||||
init {
|
||||
orientation = LinearLayout.VERTICAL
|
||||
|
|
|
@ -74,12 +74,12 @@ class PagerReaderFragment : BaseFragment() {
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
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? {
|
||||
return inflater.inflate(R.layout.item_pager_reader, container, false)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.kanade.tachiyomi.ui.recent
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.view.LayoutInflater
|
||||
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.main.MainActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.util.setInformationDrawable
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import eu.kanade.tachiyomi.util.getResourceDrawable
|
||||
import kotlinx.android.synthetic.main.fragment_recent_chapters.*
|
||||
import nucleus.factory.RequiresPresenter
|
||||
import rx.Observable
|
||||
|
@ -70,19 +68,13 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
|
|||
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
|
||||
// Init RecyclerView and adapter
|
||||
recycler.layoutManager = LinearLayoutManager(activity)
|
||||
recycler.addItemDecoration(DividerItemDecoration(ContextCompat.getDrawable(
|
||||
context, R.drawable.line_divider)))
|
||||
recycler.addItemDecoration(DividerItemDecoration(context.theme.getResourceDrawable(R.attr.divider_drawable)))
|
||||
recycler.setHasFixedSize(true)
|
||||
adapter = RecentChaptersAdapter(this)
|
||||
recycler.adapter = adapter
|
||||
|
||||
// Update toolbar text
|
||||
setToolbarTitle(R.string.label_recent_updates)
|
||||
|
||||
// Check if recent chapters is empty and update information accordingly.
|
||||
(activity as MainActivity).image_view.setInformationDrawable(R.drawable.ic_history_grey_128dp)
|
||||
(activity as MainActivity).text_label.text = getString(R.string.information_no_recent)
|
||||
(activity as MainActivity).information_layout.bringToFront()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,10 +121,9 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
|
|||
* @param chapters list of chapters
|
||||
*/
|
||||
fun onNextMangaChapters(chapters: List<Any>) {
|
||||
if (!chapters.isEmpty()) {
|
||||
( activity as MainActivity).image_view.setInformationDrawable(null)
|
||||
( activity as MainActivity).text_label.text = ""
|
||||
}
|
||||
(activity as MainActivity).updateEmptyView(chapters.isEmpty(),
|
||||
R.string.information_no_recent, R.drawable.ic_history_black_128dp)
|
||||
|
||||
adapter.setItems(chapters)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package eu.kanade.tachiyomi.ui.recent
|
||||
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.widget.PopupMenu
|
||||
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.download.model.Download
|
||||
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder
|
||||
import eu.kanade.tachiyomi.util.getResourceColor
|
||||
import kotlinx.android.synthetic.main.item_recent_chapter.view.*
|
||||
import rx.Observable
|
||||
|
||||
|
@ -26,12 +27,12 @@ class RecentChaptersHolder(view: View, private val adapter: RecentChaptersAdapte
|
|||
/**
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
|
@ -41,6 +42,7 @@ class RecentChaptersHolder(view: View, private val adapter: RecentChaptersAdapte
|
|||
init {
|
||||
//Set OnClickListener for download menu
|
||||
itemView.chapterMenu.setOnClickListener { v -> v.post({ showPopupMenu(v) }) }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,9 +21,10 @@ class SettingsActivity : BaseActivity() {
|
|||
@Inject lateinit var syncManager: MangaSyncManager
|
||||
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
setAppTheme()
|
||||
super.onCreate(savedState)
|
||||
setContentView(R.layout.activity_preferences)
|
||||
applicationComponent.inject(this)
|
||||
app.component.inject(this)
|
||||
|
||||
setupToolbar(toolbar)
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package eu.kanade.tachiyomi.ui.setting
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.TaskStackBuilder
|
||||
import android.support.v7.preference.Preference
|
||||
import android.view.View
|
||||
import eu.kanade.tachiyomi.App
|
||||
import eu.kanade.tachiyomi.R
|
||||
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.LibraryColumnsDialog
|
||||
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
|
||||
}
|
||||
|
||||
val themePreference by lazy {
|
||||
findPreference(getString(R.string.pref_theme_key)) as IntListPreference
|
||||
}
|
||||
|
||||
var columnsSubscription: Subscription? = null
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
|
@ -36,6 +44,17 @@ class SettingsGeneralFragment : SettingsNestedFragment() {
|
|||
LibraryUpdateAlarm.startAlarm(activity, (newValue as String).toInt())
|
||||
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() {
|
||||
|
|
|
@ -40,7 +40,7 @@ inline fun Context.notification(func: NotificationCompat.Builder.() -> Unit): No
|
|||
/**
|
||||
* Property to get the notification manager from the context.
|
||||
*/
|
||||
val Context.notificationManager : NotificationManager
|
||||
val Context.notificationManager: NotificationManager
|
||||
get() = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.util
|
|||
|
||||
import android.support.annotation.DrawableRes
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v4.graphics.drawable.DrawableCompat
|
||||
import android.widget.ImageView
|
||||
|
||||
/**
|
||||
|
@ -11,7 +12,9 @@ import android.widget.ImageView
|
|||
*/
|
||||
fun ImageView.setDrawableCompat(@DrawableRes drawable: Int?) {
|
||||
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 {
|
||||
setImageResource(android.R.color.transparent)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
Before Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 148 B |
23
app/src/main/res/drawable-v21/list_item_selector_dark.xml
Normal 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>
|
23
app/src/main/res/drawable-v21/list_item_selector_light.xml
Normal 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>
|
|
@ -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>
|
|
@ -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
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 434 B |
Before Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 5.6 KiB |
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:alpha=".38"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".54"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".54"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:alpha=".38"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".54"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:alpha=".38"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".54"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
|
@ -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>
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF54759e"
|
||||
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
|
||||
android:fillColor="#FF000000"
|
||||
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>
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF54759e"
|
||||
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:fillColor="#FFFFFFFF"
|
||||
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>
|
|
@ -1,7 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".54"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
@ -6,6 +6,6 @@
|
|||
android:width="1dp"
|
||||
android:height="1dp" />
|
||||
|
||||
<solid android:color="@color/divider" />
|
||||
<solid android:color="@color/dividerDark" />
|
||||
|
||||
</shape>
|
11
app/src/main/res/drawable/line_divider_light.xml
Normal 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>
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_pressed="true" android:drawable="@color/list_choice_pressed_bg_light"/>
|
||||
<item android:state_activated="true" android:drawable="@color/list_choice_pressed_bg_light"/>
|
||||
<item android:drawable="@android:color/transparent"/>
|
||||
<item android:state_focused="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:drawable="@android:color/background_dark"/>
|
||||
|
||||
</selector>
|
19
app/src/main/res/drawable/list_item_selector_light.xml
Normal 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>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@drawable/reader_background_checkbox_selected" />
|
||||
<item android:drawable="@drawable/reader_background_checkbox_unselected" />
|
||||
<item android:state_checked="true" android:drawable="@drawable/ic_reader_background_checkbox_black_24dp" />
|
||||
<item android:drawable="@drawable/ic_reader_background_checkbox_white_24dp" />
|
||||
</selector>
|
|
@ -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>
|
|
@ -2,9 +2,9 @@
|
|||
<android.support.design.widget.CoordinatorLayout
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:gravity="center">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
@ -15,20 +15,13 @@
|
|||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:id="@+id/recycler"
|
||||
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: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_anchorGravity="bottom|right|end"
|
||||
app:layout_behavior="eu.kanade.tachiyomi.ui.base.fab.FABAnimationUpDown"/>
|
||||
app:srcCompat="@drawable/ic_add_white_24dp"
|
||||
style="@style/Theme.Widget.FAB"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -34,7 +34,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
|
@ -42,25 +42,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/text_label"
|
||||
style="@style/TextAppearance.Medium.Body2.Hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/image_view"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:alpha=".87"
|
||||
android:textSize="24sp"/>
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="?attr/navigation_view_theme"
|
||||
app:headerLayout="@layout/navigation_header"
|
||||
app:menu="@menu/menu_navigation"/>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:context="eu.kanade.tachiyomi.ui.manga.MangaActivity">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:context="eu.kanade.tachiyomi.ui.manga.MangaActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
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>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/reader"
|
||||
|
@ -10,14 +10,13 @@
|
|||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_number"
|
||||
style="@style/TextAppearance.Regular.Caption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="4dp"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:background="@color/page_number_background"
|
||||
android:textColor="@color/primary_text"
|
||||
android:textSize="12sp"
|
||||
android:id="@+id/page_number"/>
|
||||
android:layout_gravity="bottom|start"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:padding="4dp"/>
|
||||
|
||||
<include layout="@layout/reader_menu"/>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
android:id="@+id/myanimelist_title_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:clickable="true"
|
||||
android:paddingLeft="?android:listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:listPreferredItemPaddingRight">
|
||||
|
@ -18,7 +18,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Title"/>
|
||||
android:text="Title"
|
||||
style="@style/TextAppearance.Regular.Body1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/myanimelist_title"
|
||||
|
@ -26,7 +27,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Edit..."/>
|
||||
android:text="Edit"
|
||||
style="@style/TextAppearance.Medium.Button"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -35,23 +37,25 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/myanimelist_title_layout"
|
||||
android:background="@color/list_choice_pressed_bg_light" />
|
||||
android:background="?android:attr/divider" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/myanimelist_status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
android:layout_below="@id/divider1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:clickable="true"
|
||||
android:paddingLeft="?android:listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:listPreferredItemPaddingRight">
|
||||
android:paddingRight="?android:listPreferredItemPaddingRight"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Status"/>
|
||||
android:text="Status"
|
||||
style="@style/TextAppearance.Regular.Body1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/myanimelist_status"
|
||||
|
@ -59,7 +63,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
tools:text="Reading"/>
|
||||
tools:text="Reading"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -68,14 +73,14 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/myanimelist_status_layout"
|
||||
android:background="@color/list_choice_pressed_bg_light" />
|
||||
android:background="?android:attr/divider" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/myanimelist_chapters_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
android:layout_below="@id/divider2"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:clickable="true"
|
||||
android:paddingLeft="?android:listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:listPreferredItemPaddingRight">
|
||||
|
@ -84,7 +89,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Chapters"/>
|
||||
android:text="Chapters"
|
||||
style="@style/TextAppearance.Regular.Body1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/myanimelist_chapters"
|
||||
|
@ -92,7 +98,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
tools:text="12/24"/>
|
||||
tools:text="12/24"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -101,14 +108,14 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/myanimelist_chapters_layout"
|
||||
android:background="@color/list_choice_pressed_bg_light" />
|
||||
android:background="?android:attr/divider" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/myanimelist_score_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
android:layout_below="@id/divider3"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:clickable="true"
|
||||
android:paddingLeft="?android:listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:listPreferredItemPaddingRight">
|
||||
|
@ -117,7 +124,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/score"/>
|
||||
android:text="@string/score"
|
||||
style="@style/TextAppearance.Regular.Body1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/myanimelist_score"
|
||||
|
@ -125,7 +133,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
tools:text="10"/>
|
||||
tools:text="10"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
android:id="@+id/image_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/image_view" />
|
||||
android:layout_height="match_parent"/>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<eu.kanade.tachiyomi.widget.MinMaxNumberPicker
|
||||
android:id="@+id/chapters_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/chapters_picker"
|
||||
app:min="0"
|
||||
app:max="9999"/>
|
||||
app:max="9999"
|
||||
app:min="0"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<eu.kanade.tachiyomi.widget.MinMaxNumberPicker
|
||||
android:id="@+id/score_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/score_picker"
|
||||
app:min="0"
|
||||
app:max="10"/>
|
||||
app:max="10"
|
||||
app:min="0"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,31 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/margin_left"
|
||||
android:paddingRight="@dimen/margin_right"
|
||||
android:orientation="horizontal">
|
||||
android:paddingRight="@dimen/margin_right">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/myanimelist_search_field"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/myanimelist_search_field"
|
||||
android:hint="@string/title_hint" />
|
||||
|
||||
<!--
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_clear_grey600_24dp"/>
|
||||
-->
|
||||
android:hint="@string/title_hint"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -34,21 +27,21 @@
|
|||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="32dp"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:paddingBottom="32dp"
|
||||
android:paddingTop="32dp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/myanimelist_search_results"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/myanimelist_search_results"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
android:choiceMode="singleChoice"
|
||||
android:clipToPadding="false"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:choiceMode="singleChoice"
|
||||
android:listSelector="@color/list_choice_pressed_bg_light"
|
||||
android:listSelector="?attr/selectable_list_drawable"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/myanimelist_result_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/myanimelist_result_title"
|
||||
android:padding="10dp"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
tools:context="eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
tools:context="eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
|
@ -15,22 +15,24 @@
|
|||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
<ViewSwitcher
|
||||
android:id="@+id/switcher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/switcher">
|
||||
|
||||
android:layout_weight="1">
|
||||
<eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
||||
android:id="@+id/catalogue_grid"
|
||||
style="@style/AppTheme.GridView"
|
||||
android:columnWidth="140dp"
|
||||
tools:listitem="@layout/item_catalogue_grid" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
style="@style/Theme.Widget.GridView"
|
||||
android:layout_width="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>
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/recycler">
|
||||
android:id="@+id/recycler"
|
||||
tools:listitem="@layout/item_download">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/view_pager">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
||||
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"
|
||||
tools:listitem="@layout/item_catalogue_grid" />
|
||||
tools:listitem="@layout/item_catalogue_grid"/>
|
||||
|
||||
</FrameLayout>
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
|
@ -20,7 +20,6 @@
|
|||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:background="@color/white"
|
||||
tools:listitem="@layout/item_chapter">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
@ -33,12 +32,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/colorPrimary"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="top|start"
|
||||
android:theme="@style/AppTheme.Popup">
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sort_btn"
|
||||
|
@ -61,10 +59,11 @@
|
|||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
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"
|
||||
style="@style/Theme.Widget.CheckBox.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
|
@ -72,8 +71,9 @@
|
|||
android:text="@string/action_show_unread"
|
||||
android:title="@string/action_show_unread"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
android:id="@+id/show_downloaded"
|
||||
style="@style/Theme.Widget.CheckBox.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
|
@ -85,19 +85,18 @@
|
|||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@color/white"/>
|
||||
android:background="@color/md_white_1000"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/next_unread_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_36dp"
|
||||
android:title="@string/action_next_unread"/>
|
||||
android:layout_alignParentRight="true"
|
||||
android:title="@string/action_next_unread"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_36dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -67,17 +67,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_author_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_author_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_author"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -90,17 +97,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_artist_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_artist_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_artist"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -113,17 +127,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_chapters_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_chapters_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_chapters"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -136,17 +157,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_status_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_status_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_status"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -159,17 +187,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_source_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_source_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_source"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -182,18 +217,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_genres_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/manga_info_genres_label"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_genres"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="false"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -218,17 +259,23 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/manga_summary_label"
|
||||
style="@style/manga_detail_label"
|
||||
style="@style/TextAppearance.Medium.Body2"
|
||||
android:layout_width="match_parent"
|
||||
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
|
||||
android:id="@+id/manga_summary"
|
||||
style="@style/manga_detail_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="false"
|
||||
android:textIsSelectable="false"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -241,12 +288,11 @@
|
|||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab_favorite"
|
||||
android:layout_width="@dimen/fab_size"
|
||||
android:layout_height="@dimen/fab_size"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/ic_bookmark_border_white_24dp"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
style="@style/Theme.Widget.FAB"
|
||||
android:layout_gravity=""
|
||||
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>
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:paddingTop="@dimen/margin_top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/margin_bottom"
|
||||
android:paddingLeft="@dimen/margin_left"
|
||||
android:paddingRight="@dimen/margin_right"
|
||||
android:paddingLeft="@dimen/margin_left">
|
||||
android:paddingTop="@dimen/margin_top">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:background="@color/white"
|
||||
tools:listitem="@layout/item_recent_chapter">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -21,8 +21,8 @@
|
|||
android:id="@+id/thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:background="@color/md_red_100"
|
||||
android:background="?android:attr/colorBackground"
|
||||
tools:background="?android:attr/colorBackground"
|
||||
tools:src="@mipmap/ic_launcher"/>
|
||||
|
||||
<View
|
||||
|
@ -32,37 +32,26 @@
|
|||
android:background="@drawable/gradient_shape"
|
||||
app:layout_heightPercent="50%"/>
|
||||
|
||||
|
||||
</android.support.percent.PercentFrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unreadText"
|
||||
style="@style/TextAppearance.Regular.Caption.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/manga_unread_bg"
|
||||
android:background="?attr/colorAccent"
|
||||
android:paddingBottom="1dp"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingTop="1dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
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
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Regular.Body1.Light"
|
||||
app:typeface="ptsansNarrowBold"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/image_container"
|
||||
|
@ -71,13 +60,10 @@
|
|||
android:lineSpacingExtra="-4dp"
|
||||
android:maxLines="2"
|
||||
android:padding="8dp"
|
||||
android:shadowColor="@color/primary_text"
|
||||
android:shadowColor="@color/textColorPrimaryLight"
|
||||
android:shadowDx="0"
|
||||
android:shadowDy="0"
|
||||
android:shadowRadius="4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:typeface="ptsansNarrowBold"
|
||||
tools:text="Sample name"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingLeft="?android:listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:listPreferredItemPaddingLeft"
|
||||
android:id="@+id/title"/>
|
||||
android:paddingRight="?android:listPreferredItemPaddingLeft"/>
|
||||
|
||||
</FrameLayout>
|
|
@ -4,7 +4,7 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -31,7 +31,7 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
style="@style/TextAppearance.Regular.Caption.Hint"
|
||||
tools:text="Pages: 45"/>
|
||||
|
||||
<TextView
|
||||
|
@ -40,7 +40,7 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
tools:text="22/02/2016"/>
|
||||
|
||||
<TextView
|
||||
|
@ -51,8 +51,7 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/accent_text"
|
||||
android:textSize="12sp"/>
|
||||
style="@style/TextAppearance.Regular.Caption.Hint"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
|
@ -70,7 +69,7 @@
|
|||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:textSize="17sp"
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
tools:text="Title"/>
|
||||
|
||||
|
||||
|
@ -88,14 +87,14 @@
|
|||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingRight="?android:attr/listPreferredItemPaddingRight">
|
||||
|
||||
<ImageView
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="false"
|
||||
android:layout_alignParentRight="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>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/download_progress_text"
|
||||
android:layout_gravity="left" />
|
||||
android:layout_gravity="start" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeightLarge"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="50dp"
|
||||
|
@ -21,7 +21,7 @@
|
|||
android:layout_marginRight="@dimen/margin_right"
|
||||
android:layout_marginEnd="@dimen/margin_right"/>
|
||||
|
||||
<ImageView
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/reorder"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
|
@ -33,7 +33,8 @@
|
|||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentRight="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
|
||||
android:id="@+id/title"
|
||||
|
@ -46,8 +47,7 @@
|
|||
android:layout_centerInParent="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/primary_text"
|
||||
android:textAppearance="@style/TextAppearance.Regular.SubHeading"
|
||||
tools:text="Title"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -3,8 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -31,7 +30,6 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/accent_text"
|
||||
android:textSize="12sp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -51,7 +49,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textAppearance="@style/TextAppearance.Regular.Body1"
|
||||
tools:text="My manga"/>
|
||||
|
||||
<TextView
|
||||
|
@ -60,7 +58,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textAppearance="@style/TextAppearance.Regular.Caption"
|
||||
tools:text="Title"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -82,7 +80,7 @@
|
|||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft">
|
||||
|
||||
<ImageView
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/chapterMenu"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
|
@ -90,7 +88,8 @@
|
|||
android:layout_alignParentRight="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>
|
||||
|
||||
|
|
|
@ -4,22 +4,20 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:background="@color/colorPrimary">
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_text"
|
||||
style="@style/TextAppearance.Regular.SubHeading.Light.Bold"
|
||||
android:layout_width="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:textStyle="bold" />
|
||||
android:singleLine="true"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/frame_container">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
|
@ -17,12 +17,12 @@
|
|||
android:layout_gravity="center_vertical|center_horizontal"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/retry_button"
|
||||
android:layout_width="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:visibility="gone" />
|
||||
android:text="@string/action_retry"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.Overlay.Dark"
|
||||
android:background="@color/colorPrimary"
|
||||
android:visibility="gone"
|
||||
android:theme="@style/Theme.ActionBar.Tab"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabGravity="center"
|
||||
app:tabMode="scrollable"
|
||||
app:tabMinWidth="75dp"
|
||||
app:tabIndicatorColor="@color/white"/>
|
||||
app:tabMinWidth="75dp"/>
|
|
@ -1,8 +1,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"
|
||||
android:id="@+id/nnf_item_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeight"
|
||||
android:background="?selectableItemBackground"
|
||||
|
@ -21,7 +21,7 @@
|
|||
android:src="@drawable/nnf_ic_file_folder"
|
||||
android:tint="?attr/colorAccent"
|
||||
android:visibility="visible"
|
||||
tools:ignore="ContentDescription" />
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
|
@ -33,5 +33,5 @@
|
|||
android:maxLines="1"
|
||||
android:padding="8dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/nnf_name" />
|
||||
android:text="@string/nnf_name"/>
|
||||
</LinearLayout>
|
|
@ -1,24 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="192dp"
|
||||
android:layout_height="@dimen/navigation_drawer_header_height"
|
||||
android:gravity="bottom"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/header" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:scaleType="centerCrop"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/test" />
|
||||
android:src="@drawable/icon"/>
|
||||
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
|
@ -34,17 +35,20 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Desarrollador Android"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
|
||||
android:text="John Doe"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:text="thedahnark@gmail.com"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
android:text="email@email.com"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
-->
|
||||
|
||||
</FrameLayout>
|
|
@ -1,25 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="24dp">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialog_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/dialog_title"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
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_height="1dp"
|
||||
android:background="@color/line_grey"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
android:background="@color/dividerLight"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -27,9 +28,9 @@
|
|||
android:text="@string/username"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/username" />
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -38,28 +39,28 @@
|
|||
android:text="@string/password"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:ems="10"
|
||||
android:id="@+id/password" />
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/show_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/show_password"
|
||||
android:id="@+id/show_password"
|
||||
android:layout_marginTop="10dp"/>
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/show_password"/>
|
||||
|
||||
<com.dd.processbutton.iml.ActionProcessButton
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/login"
|
||||
android:id="@+id/login"
|
||||
android:textColor="@android:color/white"
|
||||
app:pb_textComplete="@string/login_success"
|
||||
app:pb_textProgress="@string/loading"
|
||||
app:pb_textError="@string/invalid_login"
|
||||
android:layout_marginTop="20dp"/>
|
||||
app:pb_textProgress="@string/loading"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,20 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="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:paddingRight="@dimen/dialog_content_padding"
|
||||
android:paddingBottom="@dimen/dialog_content_padding">
|
||||
android:paddingTop="@dimen/dialog_margin_top_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -25,8 +25,8 @@
|
|||
android:id="@+id/portrait_columns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:min="0"
|
||||
app:max="10"/>
|
||||
app:max="10"
|
||||
app:min="0"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -46,8 +46,8 @@
|
|||
android:id="@+id/landscape_columns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:min="0"
|
||||
app:max="10"/>
|
||||
app:max="10"
|
||||
app:min="0"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/image_view"
|
||||
<ImageView android:id="@+id/image_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/reader_menu"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
<RelativeLayout android:id="@+id/reader_menu"
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/reader_menu_background"
|
||||
android:theme="@style/AppTheme.Overlay.Dark"
|
||||
app:popupTheme="@style/AppTheme.Popup"
|
||||
android:elevation="4dp" />
|
||||
android:background="?colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:theme="?attr/actionBarTheme"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reader_menu_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/reader_menu_bottom"
|
||||
android:background="@color/reader_menu_background"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?colorPrimary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -33,87 +32,85 @@
|
|||
android:id="@+id/current_page"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@color/light_grey"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/page_seeker"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:theme="@style/AppTheme.Overlay.Dark"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total_pages"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@color/light_grey"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center_horizontal" />
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View android:background="#777777"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
android:layout_height="1dp"
|
||||
android:background="#777777"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
<android.support.v7.widget.AppCompatImageButton
|
||||
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_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
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"
|
||||
app:srcCompat="@drawable/ic_crop_original_white_24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground"/>
|
||||
|
||||
<ImageButton
|
||||
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_crop_original_white_24dp"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatImageButton
|
||||
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_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
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"
|
||||
app:srcCompat="@drawable/ic_view_carousel_white_24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="0dp"
|
||||
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: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>
|
||||
|
||||
|
|
|
@ -1,69 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/reader_menu_background"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/image_decoder_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/image_decoder_container">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/image_decoder_initial"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorAccent"/>
|
||||
android:textColor="@color/colorAccent"
|
||||
style="@style/TextAppearance.Regular.SubHeading"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/image_decoder"
|
||||
style="@style/reader_menu_settings_item"
|
||||
android:text="@string/pref_image_decoder"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/pref_image_decoder"
|
||||
style="@style/TextAppearance.Regular.Body1.Light"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
android:id="@+id/reader_theme"
|
||||
style="@style/reader_menu_settings_item"
|
||||
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"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
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"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
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"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
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"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
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"/>
|
||||
|
||||
<CheckBox
|
||||
<android.support.v7.widget.AppCompatCheckBox
|
||||
android:id="@+id/custom_brightness"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/reader_menu_settings_item"
|
||||
android:text="@string/pref_custom_brightness"
|
||||
android:id="@+id/custom_brightness" />
|
||||
android:gravity="center"
|
||||
android:text="@string/pref_custom_brightness"/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/brightness_seekbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/brightness_seekbar" />
|
||||
style="@style/TextAppearance.Regular.Body1.Light"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -5,7 +5,6 @@
|
|||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.Overlay.Dark"
|
||||
app:tabGravity="fill"
|
||||
android:background="@color/colorPrimary"
|
||||
app:tabIndicatorColor="@color/white"/>
|
||||
android:theme="@style/Theme.ActionBar.Tab.Filled"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
/>
|
|
@ -1,7 +1,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"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/AppTheme.ActionBar"/>
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="?attr/actionBarTheme"/>
|
|
@ -5,26 +5,26 @@
|
|||
<item
|
||||
android:checked="true"
|
||||
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" />
|
||||
<item
|
||||
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" />
|
||||
<item
|
||||
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" />
|
||||
<item
|
||||
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" />
|
||||
</group>
|
||||
<group android:id="@+id/group_settings"
|
||||
android:checkableBehavior="single">
|
||||
android:checkableBehavior="none">
|
||||
<item
|
||||
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" />
|
||||
</group>
|
||||
</menu>
|
||||
|
|
5
app/src/main/res/values-land/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="navigation_drawer_header_height">135dp</dimen>
|
||||
|
||||
</resources>
|
5
app/src/main/res/values-sw600dp/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="navigation_drawer_header_height">180dp</dimen>
|
||||
|
||||
</resources>
|