Commit 98954f64 authored by Gilbert Ndresaj's avatar Gilbert Ndresaj

Nothing to show

"Nothing to show" -Cit
parent f2ec33be
......@@ -3,6 +3,7 @@ package org.horaapps.leafpic.activities;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
......@@ -115,11 +116,8 @@ public class BlackWhiteListActivity extends SharedMediaActivity {
}
private void checkNothing() {
findViewById(R.id.nothing_to_show).setVisibility(folders.size() > 0 ? View.GONE : View.VISIBLE);
if (isExcludedMode())
((TextView) findViewById(R.id.nothing_to_show)).setText(R.string.there_is_nothing_to_show);
else
((TextView) findViewById(R.id.nothing_to_show)).setText(R.string.white_list_explaination);
findViewById(R.id.ll_nothing_to_show).setVisibility(folders.size() < 1 && isExcludedMode() ? View.VISIBLE : View.GONE);
findViewById(R.id.white_list_decription_card).setVisibility(isExcludedMode() ? View.GONE : View.VISIBLE);
}
@Override
......@@ -168,7 +166,10 @@ public class BlackWhiteListActivity extends SharedMediaActivity {
setNavBarColor();
toolbar.setTitle(getTitle());
setRecentApp(getTitle().toString());
((TextView) findViewById(R.id.nothing_to_show)).setTextColor(getTextColor());
((CardView) findViewById(R.id.white_list_decription_card)).setCardBackgroundColor(getCardBackgroundColor());
((TextView) findViewById(R.id.white_list_decription_txt)).setTextColor(getTextColor());
((IconicsImageView) findViewById(R.id.nothing_to_show_icon)).setColor(getSubTextColor());
((TextView) findViewById(R.id.nothing_to_show)).setTextColor(getSubTextColor());
findViewById(org.horaapps.leafpic.R.id.rl_ea).setBackgroundColor(getBackgroundColor());
}
......
......@@ -591,9 +591,12 @@ public class MainActivity extends SharedMediaActivity {
}
private void checkNothing() {
TextView a = (TextView) findViewById(R.id.nothing_to_show);
a.setTextColor(getTextColor());
a.setVisibility((albumsMode && getAlbums().albums.size() == 0) || (!albumsMode && getAlbum().getMedia().size() == 0) ? View.VISIBLE : View.GONE);
((IconicsImageView) findViewById(R.id.nothing_to_show_icon)).setColor(getSubTextColor());
((TextView) findViewById(R.id.nothing_to_show)).setTextColor(getSubTextColor());
((LinearLayout) findViewById(R.id.ll_nothing_to_show)).setVisibility(
albumsMode && getAlbums().albums.size() == 0 ||
!albumsMode && getAlbum().getMedia().size() == 0
? View.VISIBLE : View.GONE);
}
//region MENU
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_select_folder"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
......@@ -17,21 +19,43 @@
android:id="@+id/rl_ea"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/excluded_albums"
<!--THERE IS NOTHING TO SHOW-->
<include layout="@layout/there_is_nothing_to_show"/>
<!--RECYCLE VIEW AND WHITE LIST CARD-->
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/ic_scrollbar" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/nothing_to_show"
android:text="@string/there_is_nothing_to_show"
android:textColor="@color/md_white_1000"
android:textSize="@dimen/sub_big_text"
android:gravity="center"
android:layout_centerInParent="true" />
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/white_list_decription_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/card_spacing"
android:paddingBottom="@dimen/card_spacing"
app:cardCornerRadius="@dimen/card_corner_radius"
app:cardElevation="@dimen/card_elevation"
android:foreground="@drawable/ripple"
android:clickable="true"
android:visibility="gone"
>
<TextView
android:id="@+id/white_list_decription_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/md_dark_primary_text"
android:text="@string/white_list_explaination"
android:textSize="@dimen/medium_text"
android:layout_gravity="center"
android:padding="@dimen/medium_spacing" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:id="@+id/excluded_albums"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/ic_scrollbar" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
......@@ -8,18 +8,16 @@
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator_main_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:theme="@style/Theme.AppCompat.NoActionBar">
<!---->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
......@@ -46,34 +44,13 @@
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/ic_scrollbar"
/>
<include layout="@layout/there_is_nothing_to_show"/>
<!--
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/ic_scrollbar"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/ic_scrollbar"
-->
<!--<com.turingtechnologies.materialscrollbar.TouchScrollBar
android:id="@+id/touchScrollBar"
android:layout_width="wrap_content"
app:msb_recyclerView="@id/grid_photos"
app:msb_lightOnTouch="true"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
/>-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/nothing_to_show"
android:text="@string/there_is_nothing_to_show"
android:textColor="@color/md_white_1000"
android:visibility="invisible"
android:textSize="18sp"
android:gravity="center"
android:elevation="12dp"
android:layout_centerInParent="true"
tools:targetApi="lollipop"/>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_camera"
......@@ -87,7 +64,8 @@
android:layout_alignParentEnd="true"
android:layout_gravity="bottom|end"
android:theme="@style/ThemeOverlay.AppCompat.Light"
app:layout_behavior="org.horaapps.leafpic.views.FabScrollBehaviour" />
app:layout_behavior="org.horaapps.leafpic.views.FabScrollBehaviour"
/>
</android.support.design.widget.CoordinatorLayout>
<include
android:id="@+id/drawer_items"
......
<?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:id="@+id/ll_nothing_to_show"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_centerInParent="true"
android:visibility="gone">
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/nothing_to_show_icon"
android:layout_width="@dimen/big_background_icon"
android:layout_height="@dimen/big_background_icon"
android:layout_margin="@dimen/small_spacing"
android:layout_gravity="center_horizontal"
app:iiv_icon="gmd-warning" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/nothing_to_show"
android:text="@string/there_is_nothing_to_show"
android:textColor="@color/md_white_1000"
android:textSize="@dimen/sub_big_text"
android:layout_margin="@dimen/small_spacing"
android:gravity="center_horizontal"/>
</LinearLayout>
\ No newline at end of file
......@@ -8,6 +8,7 @@
<dimen name="big_icon">36dp</dimen>
<dimen name="icon_sub_width_height">16dp</dimen>
<dimen name="icon_elevation">10dp</dimen>
<dimen name="big_background_icon">72dp</dimen>
<!--PADDING & MARGIN-->
<dimen name="big_spacing">24dp</dimen>
......
......@@ -366,6 +366,7 @@ and this could make the media inaccessible from other apps. Use the exclude opti
<string name="excluded_items">Excluded items</string>
<string name="manage_your_folders">Manage your folders</string>
<string name="manage_your_folders_sub">Here can handle the excluded folders and include folders that don\'t show up</string>
<string name="white_list_explaination">You have no included folders. You can add folders that aren\'t listed or folders with some problems. White-listed folders will be scanned periodically when the device is in idle mode, so it won\'t cause any performance issue</string>
<string name="white_list_explaination">You can add folders that aren\'t listed or folders with some problems.
White-listed folders will be scanned periodically when the device is in idle mode, so it won\'t cause any performance issue</string>
<string name="no_media_in_this_folder">No media in this folder</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment