Merge pull request #218 from NoodleMage/theme_update

Rewrote Nav Drawer to Kotlin + Dark Theme
This commit is contained in:
inorichi 2016-03-17 20:34:29 +01:00
commit aacd42b9f6
120 changed files with 1306 additions and 978 deletions

View File

@ -154,10 +154,6 @@ dependencies {
apt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_VERSION"
provided 'org.glassfish:javax.annotation:10.0-b28'
compile('com.mikepenz:materialdrawer:4.6.4@aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') {
transitive = true
}

View File

@ -15,9 +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:name=".ui.main.MainActivity"
android:theme="@style/Theme.BrandedLaunch">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -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;
}
}

View File

@ -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 {

View File

@ -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)
}

View File

@ -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());
}
}

View File

@ -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,10 +19,12 @@ 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
import kotlinx.android.synthetic.main.fragment_catalogue.*
import kotlinx.android.synthetic.main.toolbar.*
import nucleus.factory.RequiresPresenter
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
@ -154,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()

View File

@ -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

View File

@ -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

View File

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

View File

@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.download.DownloadService
import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.main.MainActivity
import kotlinx.android.synthetic.main.fragment_download_queue.*
import nucleus.factory.RequiresPresenter
import rx.Subscription
@ -60,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)
}
@ -73,6 +74,9 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
override fun onViewCreated(view: View, savedState: Bundle?) {
setToolbarTitle(R.string.label_download_queue)
// Check if download queue is empty and update information accordingly.
setInformationView()
// Initialize adapter.
adapter = DownloadAdapter(activity)
recycler.adapter = adapter
@ -138,6 +142,9 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
startButton?.isVisible = !running && !presenter.downloadQueue.isEmpty()
pauseButton?.isVisible = running
clearButton?.isVisible = running
// Check if download queue is empty and update information accordingly.
setInformationView()
}
/**
@ -177,4 +184,12 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
return recycler.findViewHolderForItemId(download.chapter.id) as? DownloadHolder
}
/**
* Set information view when queue is empty
*/
private fun setInformationView() {
(activity as MainActivity).updateEmptyView(presenter.downloadQueue.isEmpty(),
R.string.information_no_downloads, R.drawable.ic_file_download_black_128dp)
}
}

View File

@ -21,6 +21,7 @@ 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.toast
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_library.*
import nucleus.factory.RequiresPresenter
import org.greenrobot.eventbus.EventBus
@ -49,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.
@ -110,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
@ -124,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
@ -148,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) {
@ -257,6 +251,10 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
* @param mangaMap a map containing the manga for each category.
*/
fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<Manga>>) {
// Check if library is empty and update information accordingly.
(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

View File

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

View File

@ -1,220 +0,0 @@
package eu.kanade.tachiyomi.ui.main;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.Toolbar;
import android.widget.FrameLayout;
import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.DrawerBuilder;
import com.mikepenz.materialdrawer.holder.ImageHolder;
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import butterknife.Bind;
import butterknife.ButterKnife;
import eu.kanade.tachiyomi.R;
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity;
import eu.kanade.tachiyomi.ui.catalogue.CatalogueFragment;
import eu.kanade.tachiyomi.ui.download.DownloadFragment;
import eu.kanade.tachiyomi.ui.library.LibraryFragment;
import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment;
import eu.kanade.tachiyomi.ui.setting.SettingsActivity;
import icepick.State;
import nucleus.view.ViewWithPresenter;
public class MainActivity extends BaseActivity {
@Bind(R.id.appbar) AppBarLayout appBar;
@Bind(R.id.toolbar) Toolbar toolbar;
@Bind(R.id.drawer_container) FrameLayout container;
@State
int selectedItem;
private Drawer drawer;
private FragmentStack fragmentStack;
private int prevIdentifier = -1;
@Override
protected void onCreate(Bundle savedState) {
super.onCreate(savedState);
// Do not let the launcher create a new activity
if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
finish();
return;
}
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
setupToolbar(toolbar);
fragmentStack = new FragmentStack(this, getSupportFragmentManager(), R.id.content_layout,
fragment -> {
if (fragment instanceof ViewWithPresenter)
((ViewWithPresenter) fragment).getPresenter().destroy();
});
drawer = new DrawerBuilder()
.withActivity(this)
.withRootView(container)
.withToolbar(toolbar)
.withActionBarDrawerToggleAnimated(true)
.withOnDrawerNavigationListener(view -> {
if (fragmentStack.size() > 1) {
onBackPressed();
return true;
}
return false;
})
.addDrawerItems(
new PrimaryDrawerItem()
.withName(R.string.label_library)
.withIdentifier(R.id.nav_drawer_library)
.withIcon(ContextCompat.getDrawable(this, R.drawable.ic_book_grey_24dp)),
new PrimaryDrawerItem()
.withName(R.string.label_recent_updates)
.withIdentifier(R.id.nav_drawer_recent_updates)
.withIcon(ContextCompat.getDrawable(this, R.drawable.ic_history_grey_24dp)),
new PrimaryDrawerItem()
.withName(R.string.label_catalogues)
.withIdentifier(R.id.nav_drawer_catalogues)
.withIcon(ContextCompat.getDrawable(this, R.drawable.ic_explore_grey_24dp)),
new PrimaryDrawerItem()
.withName(R.string.label_download_queue)
.withIdentifier(R.id.nav_drawer_downloads)
.withIcon(ContextCompat.getDrawable(this, R.drawable.ic_file_download_grey_24dp)),
new DividerDrawerItem(),
new PrimaryDrawerItem()
.withName(R.string.label_settings)
.withIdentifier(R.id.nav_drawer_settings)
.withSelectable(false)
.withIcon(ContextCompat.getDrawable(this, R.drawable.ic_settings_grey_24dp))
)
.withSavedInstance(savedState)
.withOnDrawerItemClickListener(
(view, position, drawerItem) -> {
if (drawerItem != null) {
int identifier = drawerItem.getIdentifier();
if (prevIdentifier != -1)
setIconBackToGrey(prevIdentifier, identifier);
prevIdentifier = identifier;
switch (identifier) {
case R.id.nav_drawer_library:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_book_blue_24dp)));
setFragment(LibraryFragment.newInstance());
break;
case R.id.nav_drawer_recent_updates:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_history_blue_24dp)));
setFragment(RecentChaptersFragment.newInstance());
break;
case R.id.nav_drawer_catalogues:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_explore_blue_24dp)));
setFragment(CatalogueFragment.newInstance());
break;
case R.id.nav_drawer_downloads:
drawer.updateIcon(identifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_file_download_blue_24dp)));
setFragment(DownloadFragment.newInstance());
break;
case R.id.nav_drawer_settings:
startActivity(new Intent(this, SettingsActivity.class));
break;
}
}
return false;
}
)
.build();
if (savedState != null) {
// Recover icon state after rotation
if (fragmentStack.size() > 1) {
showBackArrow();
}
// Set saved selection
drawer.setSelection(selectedItem, false);
} else {
// Set default selection
drawer.setSelection(R.id.nav_drawer_library);
}
}
private void setIconBackToGrey(int prevIdentifier, int identifier) {
// Don't set to grey when settings
if (identifier == R.id.nav_drawer_settings)
return;
switch (prevIdentifier) {
case R.id.nav_drawer_library:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_book_grey_24dp)));
break;
case R.id.nav_drawer_recent_updates:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_history_grey_24dp)));
break;
case R.id.nav_drawer_catalogues:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_explore_grey_24dp)));
break;
case R.id.nav_drawer_downloads:
drawer.updateIcon(prevIdentifier, new ImageHolder(ContextCompat.getDrawable(this, R.drawable.ic_file_download_grey_24dp)));
break;
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
selectedItem = drawer.getCurrentSelection();
super.onSaveInstanceState(outState);
}
public void setFragment(Fragment fragment) {
fragmentStack.replace(fragment);
}
public void pushFragment(Fragment fragment) {
fragmentStack.push(fragment);
if (fragmentStack.size() > 1) {
showBackArrow();
}
}
@Override
public void onBackPressed() {
if (!fragmentStack.pop()) {
super.onBackPressed();
} else if (fragmentStack.size() == 1) {
showHamburgerIcon();
drawer.getActionBarDrawerToggle().syncState();
}
}
private void showHamburgerIcon() {
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
drawer.getActionBarDrawerToggle().setDrawerIndicatorEnabled(true);
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
}
}
private void showBackArrow() {
if (getSupportActionBar() != null) {
drawer.getActionBarDrawerToggle().setDrawerIndicatorEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
}
public Toolbar getToolbar() {
return toolbar;
}
public AppBarLayout getAppBar() {
return appBar;
}
}

View File

@ -0,0 +1,116 @@
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
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.getResourceColor
import eu.kanade.tachiyomi.util.setDrawableCompat
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.toolbar.*
class MainActivity : BaseActivity() {
override fun onCreate(savedState: Bundle?) {
setAppTheme()
super.onCreate(savedState)
// Do not let the launcher create a new activity
if (intent.flags and Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT != 0) {
finish()
return
}
// Inflate activity_edit_categories.xml.
setContentView(R.layout.activity_main)
// Handle Toolbar
setupToolbar(toolbar)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp)
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 { item ->
// Make information view invisible
image_view.setDrawableCompat(null)
text_label.text = ""
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
}
if (savedState == null) {
setFragment(LibraryFragment.newInstance())
}
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> drawer.openDrawer(GravityCompat.START)
else -> return super.onOptionsItemSelected(item)
}
return true
}
fun setFragment(fragment: Fragment) {
supportFragmentManager.beginTransaction()
.replace(R.id.frame_container, fragment)
.commit()
}
fun updateEmptyView(show: Boolean, textResource: Int, drawable: Int) {
if (show) {
image_view.setDrawableCompat(drawable)
text_label.text = getString(textResource)
} else {
image_view.setDrawableCompat(null)
text_label.text = ""
}
}
}

View File

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

View File

@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.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() }

View File

@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.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)

View File

@ -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));
}
}

View File

@ -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

View File

@ -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)

View File

@ -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
@ -15,7 +14,9 @@ import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder
import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.util.getResourceDrawable
import kotlinx.android.synthetic.main.fragment_recent_chapters.*
import nucleus.factory.RequiresPresenter
import rx.Observable
@ -67,8 +68,7 @@ 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
@ -121,6 +121,9 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
* @param chapters list of chapters
*/
fun onNextMangaChapters(chapters: List<Any>) {
(activity as MainActivity).updateEmptyView(chapters.isEmpty(),
R.string.information_no_recent, R.drawable.ic_history_black_128dp)
adapter.setItems(chapters)
}

View File

@ -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) }) }
}
/**

View File

@ -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)

View File

@ -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() {

View File

@ -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
/**

View File

@ -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)
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

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

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/background_material_light"/>
<item>
<bitmap
android:src="@drawable/application_logo_144dp"
android:gravity="center"/>
</item>
</layer-list>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="128dp"
android:height="128dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF54759e"
android:fillColor="#FF000000"
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"/>
</vector>

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="128dp"
android:height="128dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF54759e"
android:fillColor="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

View File

@ -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

View File

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

View File

@ -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

View File

@ -0,0 +1,9 @@
<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="#FFFFFFFF"
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
</vector>

View File

@ -0,0 +1,9 @@
<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="#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>

View File

@ -0,0 +1,9 @@
<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="#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>

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

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

View File

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

View File

@ -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>

View File

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

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<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>

View File

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

View File

@ -2,9 +2,9 @@
<android.support.design.widget.CoordinatorLayout
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>

View File

@ -1,32 +1,65 @@
<android.support.design.widget.CoordinatorLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
<RelativeLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.design.widget.AppBarLayout>
<include layout="@layout/toolbar"/>
</android.support.design.widget.AppBarLayout>
<!-- the layout which will contain (host) the drawerLayout -->
<FrameLayout
android:id="@+id/drawer_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!-- the layout which will be the content of the activity (which will be hosted inside the drawer (NOT the list of the drawer)) -->
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_below="@id/appbar">
<RelativeLayout
android:id="@+id/information_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/image_view"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_centerHorizontal="true"/>
<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"/>
</RelativeLayout>
</FrameLayout>
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
</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>

View File

@ -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>

View File

@ -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"/>

View File

@ -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"/>

View File

@ -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>

View File

@ -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"/>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"/>

View File

@ -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>

View File

@ -0,0 +1,54 @@
<?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="@dimen/navigation_drawer_header_height"
android:gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:scaleType="centerCrop"/>
<ImageView
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/icon"/>
<!--
<LinearLayout
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_gravity="left|bottom"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
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="email@email.com"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="gone"/>
</LinearLayout>
-->
</FrameLayout>

View File

@ -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>

View File

@ -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>

View File

@ -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">

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