Loading app/src/main/java/it/niedermann/owncloud/notes/model/ItemAdapter.java +2 −2 Original line number Diff line number Diff line Loading @@ -81,10 +81,10 @@ public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> i return new SectionViewHolder(ItemNotesListSectionItemBinding.inflate(LayoutInflater.from(parent.getContext()))); } case TYPE_NOTE_WITH_EXCERPT: { return new NoteViewHolderWithExcerpt(ItemNotesListNoteItemWithExcerptBinding.inflate(LayoutInflater.from(parent.getContext())), noteClickListener); return new NoteViewHolderWithExcerpt(ItemNotesListNoteItemWithExcerptBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false), noteClickListener); } case TYPE_NOTE_WITHOUT_EXCERPT: { return new NoteViewHolderWithoutExcerpt(inflate(LayoutInflater.from(parent.getContext())), noteClickListener); return new NoteViewHolderWithoutExcerpt(inflate(LayoutInflater.from(parent.getContext()), parent, false), noteClickListener); } default: { throw new IllegalArgumentException("Not supported viewType: " + viewType); Loading app/src/main/res/layout/item_notes_list_note_item_with_excerpt.xml +14 −18 Original line number Diff line number Diff line Loading @@ -27,16 +27,16 @@ android:contentDescription="@string/menu_delete" app:srcCompat="@drawable/ic_delete_white_32dp" /> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:id="@+id/noteSwipeable" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> android:background="@drawable/list_item_background_selector" android:baselineAligned="false"> <FrameLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_centerVertical="true"> android:layout_height="match_parent"> <ImageView android:id="@+id/noteFavorite" Loading @@ -60,8 +60,8 @@ </FrameLayout> <androidx.appcompat.widget.LinearLayoutCompat android:layout_width="wrap_content" <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" Loading @@ -72,13 +72,13 @@ android:paddingRight="@dimen/spacer_2x" android:paddingBottom="@dimen/spacer_2x"> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:ellipsize="end" Loading @@ -86,19 +86,17 @@ android:textColor="?android:textColorPrimary" android:textSize="@dimen/primary_font_size" tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> </LinearLayout> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/noteExcerpt" android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_weight="1" android:ellipsize="end" android:maxLines="1" Loading @@ -111,8 +109,6 @@ android:id="@+id/noteCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_marginStart="@dimen/spacer_1x" android:layout_marginLeft="@dimen/spacer_1x" android:background="@drawable/border" Loading @@ -126,8 +122,8 @@ android:textSize="@dimen/secondary_font_size" tools:maxLength="15" tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </LinearLayout> </LinearLayout> </LinearLayout> </FrameLayout> app/src/main/res/layout/item_notes_list_note_item_without_excerpt.xml +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ android:id="@+id/noteTitle" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="10sp" android:layout_marginBottom="10sp" android:layout_weight="1" android:ellipsize="end" android:maxLines="1" Loading @@ -79,6 +81,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/spacer_1x" android:layout_marginLeft="@dimen/spacer_1x" android:layout_marginTop="1dp" android:layout_marginEnd="@dimen/spacer_2x" android:layout_marginRight="@dimen/spacer_2x" android:background="@drawable/border" Loading Loading
app/src/main/java/it/niedermann/owncloud/notes/model/ItemAdapter.java +2 −2 Original line number Diff line number Diff line Loading @@ -81,10 +81,10 @@ public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> i return new SectionViewHolder(ItemNotesListSectionItemBinding.inflate(LayoutInflater.from(parent.getContext()))); } case TYPE_NOTE_WITH_EXCERPT: { return new NoteViewHolderWithExcerpt(ItemNotesListNoteItemWithExcerptBinding.inflate(LayoutInflater.from(parent.getContext())), noteClickListener); return new NoteViewHolderWithExcerpt(ItemNotesListNoteItemWithExcerptBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false), noteClickListener); } case TYPE_NOTE_WITHOUT_EXCERPT: { return new NoteViewHolderWithoutExcerpt(inflate(LayoutInflater.from(parent.getContext())), noteClickListener); return new NoteViewHolderWithoutExcerpt(inflate(LayoutInflater.from(parent.getContext()), parent, false), noteClickListener); } default: { throw new IllegalArgumentException("Not supported viewType: " + viewType); Loading
app/src/main/res/layout/item_notes_list_note_item_with_excerpt.xml +14 −18 Original line number Diff line number Diff line Loading @@ -27,16 +27,16 @@ android:contentDescription="@string/menu_delete" app:srcCompat="@drawable/ic_delete_white_32dp" /> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:id="@+id/noteSwipeable" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> android:background="@drawable/list_item_background_selector" android:baselineAligned="false"> <FrameLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_centerVertical="true"> android:layout_height="match_parent"> <ImageView android:id="@+id/noteFavorite" Loading @@ -60,8 +60,8 @@ </FrameLayout> <androidx.appcompat.widget.LinearLayoutCompat android:layout_width="wrap_content" <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" Loading @@ -72,13 +72,13 @@ android:paddingRight="@dimen/spacer_2x" android:paddingBottom="@dimen/spacer_2x"> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:ellipsize="end" Loading @@ -86,19 +86,17 @@ android:textColor="?android:textColorPrimary" android:textSize="@dimen/primary_font_size" tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> </LinearLayout> <androidx.appcompat.widget.LinearLayoutCompat <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/noteExcerpt" android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_weight="1" android:ellipsize="end" android:maxLines="1" Loading @@ -111,8 +109,6 @@ android:id="@+id/noteCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_marginStart="@dimen/spacer_1x" android:layout_marginLeft="@dimen/spacer_1x" android:background="@drawable/border" Loading @@ -126,8 +122,8 @@ android:textSize="@dimen/secondary_font_size" tools:maxLength="15" tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </LinearLayout> </LinearLayout> </LinearLayout> </FrameLayout>
app/src/main/res/layout/item_notes_list_note_item_without_excerpt.xml +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ android:id="@+id/noteTitle" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="10sp" android:layout_marginBottom="10sp" android:layout_weight="1" android:ellipsize="end" android:maxLines="1" Loading @@ -79,6 +81,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/spacer_1x" android:layout_marginLeft="@dimen/spacer_1x" android:layout_marginTop="1dp" android:layout_marginEnd="@dimen/spacer_2x" android:layout_marginRight="@dimen/spacer_2x" android:background="@drawable/border" Loading