From 22ee78d256ec0c8def89f909dc21b14e49ba95eb Mon Sep 17 00:00:00 2001 From: inorichi Date: Sun, 1 Nov 2015 22:04:48 +0100 Subject: [PATCH] Show toast when source login is needed --- .../java/eu/kanade/mangafeed/ui/fragment/SourceFragment.java | 3 ++- app/src/main/res/layout/fragment_source.xml | 2 +- app/src/main/res/layout/item_source.xml | 3 ++- app/src/main/res/values/strings.xml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/SourceFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/SourceFragment.java index d35e5e6cd5..e8ec22517c 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/SourceFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/SourceFragment.java @@ -5,6 +5,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; +import android.widget.Toast; import java.util.List; @@ -60,7 +61,7 @@ public class SourceFragment extends BaseRxFragment { CatalogueFragment fragment = CatalogueFragment.newInstance(source.getSourceId()); activity.setFragment(fragment); } else { - // TODO ask for password + Toast.makeText(getActivity(), R.string.source_requires_login, Toast.LENGTH_SHORT).show(); } } diff --git a/app/src/main/res/layout/fragment_source.xml b/app/src/main/res/layout/fragment_source.xml index 9d672fb29e..774092e2b2 100644 --- a/app/src/main/res/layout/fragment_source.xml +++ b/app/src/main/res/layout/fragment_source.xml @@ -6,7 +6,7 @@ diff --git a/app/src/main/res/layout/item_source.xml b/app/src/main/res/layout/item_source.xml index 76db7079c6..d45304cc66 100644 --- a/app/src/main/res/layout/item_source.xml +++ b/app/src/main/res/layout/item_source.xml @@ -10,6 +10,7 @@ android:layout_height="40dp" tools:text="New Text" android:id="@+id/source_name" - android:gravity="center_vertical" /> + android:gravity="center_vertical" + android:paddingLeft="15dp"/> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 60d8bf72c5..1d18e040ed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -75,5 +75,6 @@ Downloading… Downloaded %1$d%% Page: %1$d + This source requires login