Loading app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap RecyclerView listNavigationMenu; @BindView(R.id.recycler_view) RecyclerView listView; @BindView(R.id.empty_content_view) RelativeLayout emptyContentView; private ActionBarDrawerToggle drawerToggle; private ItemAdapter adapter = null; Loading Loading @@ -660,6 +662,11 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap LoadNotesListTask.NotesLoadedListener callback = (List<Item> notes, boolean showCategory) -> { adapter.setShowCategory(showCategory); adapter.setItemList(notes); if(notes.size() > 0) { emptyContentView.setVisibility(View.GONE); } else { emptyContentView.setVisibility(View.VISIBLE); } if (scrollToTop) { listView.scrollToPosition(0); } Loading app/src/main/res/layout/activity_notes_list_view.xml +43 −8 Original line number Diff line number Diff line Loading @@ -26,16 +26,51 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/bg_normal" tools:context="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity" tools:ignore="MergeRootFrame"> tools:context="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:id="@+id/empty_content_view" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@id/empty_content_view_title" android:layout_centerHorizontal="true" android:layout_marginBottom="20dp" android:contentDescription="@null" android:src="@mipmap/ic_launcher" /> <TextView android:id="@+id/empty_content_view_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="@string/no_notes_yet" android:textSize="26sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/empty_content_view_title" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:text="@string/no_notes_yet_description" /> </RelativeLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/bg_highlighted" android:scrollbars="vertical" /> android:scrollbars="vertical" tools:listitem="@layout/fragment_notes_list_note_item"/> </FrameLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </LinearLayout> Loading app/src/main/res/layout/fragment_notes_list_note_item.xml +9 −5 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/noteSwipeFrame" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -37,13 +38,13 @@ android:layout_width="wrap_content" android:layout_height="match_parent"> <ImageView android:id="@+id/noteFavorite" android:contentDescription="@string/menu_favorite" android:padding="16dp" android:layout_width="wrap_content" android:layout_height="match_parent" /> android:layout_height="match_parent" tools:src="@drawable/ic_star_yellow_24dp"/> <androidx.appcompat.widget.AppCompatImageView Loading Loading @@ -81,7 +82,8 @@ android:singleLine="true" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector" android:textSize="@dimen/primary_font_size" /> android:textSize="@dimen/primary_font_size" tools:text="The title of the note"/> </androidx.appcompat.widget.LinearLayoutCompat> Loading @@ -103,7 +105,8 @@ android:paddingTop="1dp" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector_low" android:textSize="@dimen/secondary_font_size" /> android:textSize="@dimen/secondary_font_size" tools:text="This is the content of the first line."/> <TextView android:id="@+id/noteCategory" Loading @@ -121,7 +124,8 @@ android:layout_marginLeft="8dp" android:singleLine="true" android:textColor="@drawable/list_item_color_selector" android:textSize="@dimen/secondary_font_size" /> android:textSize="@dimen/secondary_font_size" tools:text="My fancy category"/> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> Loading app/src/main/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,8 @@ <string name="category_movie">Movie</string> <string name="category_work">Work</string> <string name="account_already_imported">Account has already been imported</string> <string name="no_notes_yet">No notes yet</string> <string name="no_notes_yet_description">Press + button to create a new note</string> <!-- Array: note modes --> <string-array name="noteMode_entries"> Loading Loading
app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap RecyclerView listNavigationMenu; @BindView(R.id.recycler_view) RecyclerView listView; @BindView(R.id.empty_content_view) RelativeLayout emptyContentView; private ActionBarDrawerToggle drawerToggle; private ItemAdapter adapter = null; Loading Loading @@ -660,6 +662,11 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap LoadNotesListTask.NotesLoadedListener callback = (List<Item> notes, boolean showCategory) -> { adapter.setShowCategory(showCategory); adapter.setItemList(notes); if(notes.size() > 0) { emptyContentView.setVisibility(View.GONE); } else { emptyContentView.setVisibility(View.VISIBLE); } if (scrollToTop) { listView.scrollToPosition(0); } Loading
app/src/main/res/layout/activity_notes_list_view.xml +43 −8 Original line number Diff line number Diff line Loading @@ -26,16 +26,51 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/bg_normal" tools:context="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity" tools:ignore="MergeRootFrame"> tools:context="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:id="@+id/empty_content_view" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@id/empty_content_view_title" android:layout_centerHorizontal="true" android:layout_marginBottom="20dp" android:contentDescription="@null" android:src="@mipmap/ic_launcher" /> <TextView android:id="@+id/empty_content_view_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="@string/no_notes_yet" android:textSize="26sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/empty_content_view_title" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:text="@string/no_notes_yet_description" /> </RelativeLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/bg_highlighted" android:scrollbars="vertical" /> android:scrollbars="vertical" tools:listitem="@layout/fragment_notes_list_note_item"/> </FrameLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </LinearLayout> Loading
app/src/main/res/layout/fragment_notes_list_note_item.xml +9 −5 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/noteSwipeFrame" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -37,13 +38,13 @@ android:layout_width="wrap_content" android:layout_height="match_parent"> <ImageView android:id="@+id/noteFavorite" android:contentDescription="@string/menu_favorite" android:padding="16dp" android:layout_width="wrap_content" android:layout_height="match_parent" /> android:layout_height="match_parent" tools:src="@drawable/ic_star_yellow_24dp"/> <androidx.appcompat.widget.AppCompatImageView Loading Loading @@ -81,7 +82,8 @@ android:singleLine="true" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector" android:textSize="@dimen/primary_font_size" /> android:textSize="@dimen/primary_font_size" tools:text="The title of the note"/> </androidx.appcompat.widget.LinearLayoutCompat> Loading @@ -103,7 +105,8 @@ android:paddingTop="1dp" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector_low" android:textSize="@dimen/secondary_font_size" /> android:textSize="@dimen/secondary_font_size" tools:text="This is the content of the first line."/> <TextView android:id="@+id/noteCategory" Loading @@ -121,7 +124,8 @@ android:layout_marginLeft="8dp" android:singleLine="true" android:textColor="@drawable/list_item_color_selector" android:textSize="@dimen/secondary_font_size" /> android:textSize="@dimen/secondary_font_size" tools:text="My fancy category"/> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> Loading
app/src/main/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,8 @@ <string name="category_movie">Movie</string> <string name="category_work">Work</string> <string name="account_already_imported">Account has already been imported</string> <string name="no_notes_yet">No notes yet</string> <string name="no_notes_yet_description">Press + button to create a new note</string> <!-- Array: note modes --> <string-array name="noteMode_entries"> Loading