Jelajahi Sumber

Show toast when source login is needed

inorichi 9 tahun lalu
induk
melakukan
22ee78d256

+ 2 - 1
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<SourcePresenter> {
             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();
         }
     }
 

+ 1 - 1
app/src/main/res/layout/fragment_source.xml

@@ -6,7 +6,7 @@
 
 
     <ListView
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/catalogue_list" />
 

+ 2 - 1
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"/>
 
 </LinearLayout>

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -75,5 +75,6 @@
     <string name="downloading">Downloading…</string>
     <string name="download_progress">Downloaded %1$d%%</string>
     <string name="chapter_progress">Page: %1$d</string>
+    <string name="source_requires_login">This source requires login</string>
 
 </resources>