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 d35e5e6cd..e8ec22517 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 9d672fb29..774092e2b 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 76db7079c..d45304cc6 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 60d8bf72c..1d18e040e 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