Show toast when source login is needed

This commit is contained in:
inorichi 2015-11-01 22:04:48 +01:00
parent 9407d9b4f5
commit 22ee78d256
4 changed files with 6 additions and 3 deletions

View file

@ -5,6 +5,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ListView; import android.widget.ListView;
import android.widget.Toast;
import java.util.List; import java.util.List;
@ -60,7 +61,7 @@ public class SourceFragment extends BaseRxFragment<SourcePresenter> {
CatalogueFragment fragment = CatalogueFragment.newInstance(source.getSourceId()); CatalogueFragment fragment = CatalogueFragment.newInstance(source.getSourceId());
activity.setFragment(fragment); activity.setFragment(fragment);
} else { } else {
// TODO ask for password Toast.makeText(getActivity(), R.string.source_requires_login, Toast.LENGTH_SHORT).show();
} }
} }

View file

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

View file

@ -10,6 +10,7 @@
android:layout_height="40dp" android:layout_height="40dp"
tools:text="New Text" tools:text="New Text"
android:id="@+id/source_name" android:id="@+id/source_name"
android:gravity="center_vertical" /> android:gravity="center_vertical"
android:paddingLeft="15dp"/>
</LinearLayout> </LinearLayout>

View file

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