Loading app/build.gradle +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ dependencies { implementation 'com.yydcdut:rxmarkdown:0.1.1-beta' def supportLibVersion = '27.1.1' implementation "com.android.support:support-v4:${supportLibVersion}" implementation "com.android.support:appcompat-v7:${supportLibVersion}" implementation "com.android.support:design:${supportLibVersion}" Loading app/src/main/java/it/niedermann/owncloud/notes/android/appwidget/NoteListWidgetFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact if (note.isFavorite()) { note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.VISIBLE); } else { note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.GONE); note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.INVISIBLE); } note_content.setTextViewText(R.id.widget_entry_content_tv, note.getTitle()); Loading app/src/main/java/it/niedermann/owncloud/notes/model/ItemAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { nvHolder.noteCategory.setVisibility(showCategory && !note.getCategory().isEmpty() ? View.VISIBLE : View.GONE); nvHolder.noteCategory.setText(NoteUtil.extendCategory(note.getCategory())); nvHolder.noteExcerpt.setText(note.getExcerpt()); nvHolder.noteStatus.setVisibility(DBStatus.VOID.equals(note.getStatus()) ? View.GONE : View.VISIBLE); nvHolder.noteStatus.setVisibility(DBStatus.VOID.equals(note.getStatus()) ? View.INVISIBLE : View.VISIBLE); nvHolder.noteFavorite.setImageResource(note.isFavorite() ? R.drawable.ic_star_grey600_24dp : R.drawable.ic_star_outline_grey600_24dp); nvHolder.noteFavorite.setOnClickListener(new View.OnClickListener() { @Override Loading app/src/main/res/layout/fragment_notes_list_note_item.xml +92 −99 Original line number Diff line number Diff line Loading @@ -2,129 +2,122 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/bg_attention" > android:background="@color/bg_attention"> <ImageView android:id="@+id/noteDeleteLeft" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_action_delete" android:layout_gravity="start" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:contentDescription="@string/menu_delete" /> android:src="@drawable/ic_action_delete" /> <ImageView android:id="@+id/noteDeleteRight" android:layout_marginRight="16dp" android:layout_marginEnd="16dp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_action_delete" android:layout_height="match_parent" android:layout_gravity="end" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:contentDescription="@string/menu_delete" /> android:src="@drawable/ic_action_delete" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector" <android.support.v7.widget.LinearLayoutCompat android:id="@+id/noteSwipeable" > android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> <ImageView android:id="@+id/noteFavorite" android:layout_centerVertical="true" android:padding="16dp" android:layout_width="wrap_content" android:layout_height="match_parent"/> <android.support.v7.widget.LinearLayoutCompat android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="16dp" android:paddingRight="16dp" android:paddingBottom="16dp" android:orientation="vertical" android:background="@drawable/list_item_background_selector"> <android.support.v7.widget.LinearLayoutCompat android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> <TextView android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_marginTop="16dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginEnd="70dp" android:layout_marginRight="70dp" android:ellipsize="marquee" android:maxLines="1" android:singleLine="true" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector" android:textSize="16sp" /> android:textSize="16sp" /> <TextView android:id="@+id/noteCategory" <ImageView android:id="@+id/noteStatus" android:layout_width="wrap_content" android:background="@drawable/border" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="1dp" android:paddingBottom="1dp" android:layout_height="match_parent" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:baseline="14dp" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:src="@drawable/ic_sync_alert_grey600_18dp" /> </android.support.v7.widget.LinearLayoutCompat> <android.support.v7.widget.LinearLayoutCompat android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_below="@id/noteTitle" android:maxLines="1" android:textColor="@drawable/list_item_color_selector" android:textSize="14sp" /> android:background="@drawable/list_item_background_selector"> <TextView android:id="@+id/noteExcerpt" android:layout_width="fill_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/noteCategory" android:layout_toEndOf="@id/noteCategory" android:layout_alignWithParentIfMissing="true" android:layout_below="@id/noteTitle" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:paddingTop="1dp" android:paddingBottom="1dp" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:ellipsize="end" android:maxLines="1" android:paddingBottom="1dp" android:paddingTop="1dp" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector_low" android:textSize="14sp" /> android:textSize="14sp" /> <ImageView android:id="@+id/noteStatus" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_sync_alert_grey600_18dp" android:layout_toEndOf="@id/noteTitle" android:layout_toRightOf="@id/noteTitle" android:layout_marginStart="-65dp" android:layout_marginLeft="-65dp" android:layout_alignBaseline="@id/noteTitle" android:baseline="14dp" /> <ImageView android:id="@+id/noteFavorite" <TextView android:id="@+id/noteCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:layout_marginEnd="6dp" android:layout_marginRight="6dp" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_alignBaseline="@id/noteTitle" android:baseline="29dp" /> android:layout_alignParentEnd="true" android:background="@drawable/border" android:maxLines="1" android:paddingBottom="1dp" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="1dp" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:singleLine="true" android:textColor="@drawable/list_item_color_selector" android:textSize="14sp"/> </android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat> <ImageView android:layout_width="match_parent" android:layout_height="1px" android:layout_below="@id/noteExcerpt" android:layout_marginTop="16dp" android:src="@color/separator" /> </RelativeLayout> android:src="@color/separator" /> </FrameLayout> app/src/main/res/layout/widget_entry.xml +16 −16 Original line number Diff line number Diff line Loading @@ -6,21 +6,6 @@ android:orientation="horizontal" android:padding="@dimen/widget_note_list_padding"> <TextView android:id="@+id/widget_entry_content_tv" android:layout_width="0dp" android:layout_height="match_parent" android:paddingStart="@dimen/widget_note_list_outer_padding" android:paddingEnd="@dimen/widget_note_list_inner_padding" android:paddingLeft="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_inner_padding" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:layout_weight="1" android:textColor="@color/fg_default" android:lines="1" android:ellipsize="end" /> <ImageView android:id="@+id/widget_entry_fav_icon" android:layout_width="@dimen/widget_note_list_fav_icon_width" Loading @@ -28,10 +13,25 @@ android:layout_gravity="center_vertical" android:foregroundGravity="center_vertical" android:paddingStart="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingLeft="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_outer_padding" android:src="@drawable/ic_star_grey600_24dp" android:contentDescription="@string/widget_entry_fav_contentDescription" /> <TextView android:id="@+id/widget_entry_content_tv" android:layout_width="0dp" android:layout_height="match_parent" android:paddingStart="@dimen/widget_note_list_inner_padding" android:paddingLeft="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_outer_padding" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:layout_weight="1" android:textColor="@color/fg_default" android:lines="1" android:ellipsize="end" /> </LinearLayout> Loading
app/build.gradle +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ dependencies { implementation 'com.yydcdut:rxmarkdown:0.1.1-beta' def supportLibVersion = '27.1.1' implementation "com.android.support:support-v4:${supportLibVersion}" implementation "com.android.support:appcompat-v7:${supportLibVersion}" implementation "com.android.support:design:${supportLibVersion}" Loading
app/src/main/java/it/niedermann/owncloud/notes/android/appwidget/NoteListWidgetFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact if (note.isFavorite()) { note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.VISIBLE); } else { note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.GONE); note_content.setViewVisibility(R.id.widget_entry_fav_icon, View.INVISIBLE); } note_content.setTextViewText(R.id.widget_entry_content_tv, note.getTitle()); Loading
app/src/main/java/it/niedermann/owncloud/notes/model/ItemAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { nvHolder.noteCategory.setVisibility(showCategory && !note.getCategory().isEmpty() ? View.VISIBLE : View.GONE); nvHolder.noteCategory.setText(NoteUtil.extendCategory(note.getCategory())); nvHolder.noteExcerpt.setText(note.getExcerpt()); nvHolder.noteStatus.setVisibility(DBStatus.VOID.equals(note.getStatus()) ? View.GONE : View.VISIBLE); nvHolder.noteStatus.setVisibility(DBStatus.VOID.equals(note.getStatus()) ? View.INVISIBLE : View.VISIBLE); nvHolder.noteFavorite.setImageResource(note.isFavorite() ? R.drawable.ic_star_grey600_24dp : R.drawable.ic_star_outline_grey600_24dp); nvHolder.noteFavorite.setOnClickListener(new View.OnClickListener() { @Override Loading
app/src/main/res/layout/fragment_notes_list_note_item.xml +92 −99 Original line number Diff line number Diff line Loading @@ -2,129 +2,122 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/bg_attention" > android:background="@color/bg_attention"> <ImageView android:id="@+id/noteDeleteLeft" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_action_delete" android:layout_gravity="start" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:contentDescription="@string/menu_delete" /> android:src="@drawable/ic_action_delete" /> <ImageView android:id="@+id/noteDeleteRight" android:layout_marginRight="16dp" android:layout_marginEnd="16dp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_action_delete" android:layout_height="match_parent" android:layout_gravity="end" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:contentDescription="@string/menu_delete" /> android:src="@drawable/ic_action_delete" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector" <android.support.v7.widget.LinearLayoutCompat android:id="@+id/noteSwipeable" > android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> <ImageView android:id="@+id/noteFavorite" android:layout_centerVertical="true" android:padding="16dp" android:layout_width="wrap_content" android:layout_height="match_parent"/> <android.support.v7.widget.LinearLayoutCompat android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="16dp" android:paddingRight="16dp" android:paddingBottom="16dp" android:orientation="vertical" android:background="@drawable/list_item_background_selector"> <android.support.v7.widget.LinearLayoutCompat android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background_selector"> <TextView android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_marginTop="16dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginEnd="70dp" android:layout_marginRight="70dp" android:ellipsize="marquee" android:maxLines="1" android:singleLine="true" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector" android:textSize="16sp" /> android:textSize="16sp" /> <TextView android:id="@+id/noteCategory" <ImageView android:id="@+id/noteStatus" android:layout_width="wrap_content" android:background="@drawable/border" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="1dp" android:paddingBottom="1dp" android:layout_height="match_parent" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:baseline="14dp" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:src="@drawable/ic_sync_alert_grey600_18dp" /> </android.support.v7.widget.LinearLayoutCompat> <android.support.v7.widget.LinearLayoutCompat android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_below="@id/noteTitle" android:maxLines="1" android:textColor="@drawable/list_item_color_selector" android:textSize="14sp" /> android:background="@drawable/list_item_background_selector"> <TextView android:id="@+id/noteExcerpt" android:layout_width="fill_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/noteCategory" android:layout_toEndOf="@id/noteCategory" android:layout_alignWithParentIfMissing="true" android:layout_below="@id/noteTitle" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:paddingTop="1dp" android:paddingBottom="1dp" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:ellipsize="end" android:maxLines="1" android:paddingBottom="1dp" android:paddingTop="1dp" android:layout_weight="1" android:textColor="@drawable/list_item_color_selector_low" android:textSize="14sp" /> android:textSize="14sp" /> <ImageView android:id="@+id/noteStatus" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_sync_alert_grey600_18dp" android:layout_toEndOf="@id/noteTitle" android:layout_toRightOf="@id/noteTitle" android:layout_marginStart="-65dp" android:layout_marginLeft="-65dp" android:layout_alignBaseline="@id/noteTitle" android:baseline="14dp" /> <ImageView android:id="@+id/noteFavorite" <TextView android:id="@+id/noteCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:layout_marginEnd="6dp" android:layout_marginRight="6dp" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_alignBaseline="@id/noteTitle" android:baseline="29dp" /> android:layout_alignParentEnd="true" android:background="@drawable/border" android:maxLines="1" android:paddingBottom="1dp" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="1dp" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:singleLine="true" android:textColor="@drawable/list_item_color_selector" android:textSize="14sp"/> </android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat> <ImageView android:layout_width="match_parent" android:layout_height="1px" android:layout_below="@id/noteExcerpt" android:layout_marginTop="16dp" android:src="@color/separator" /> </RelativeLayout> android:src="@color/separator" /> </FrameLayout>
app/src/main/res/layout/widget_entry.xml +16 −16 Original line number Diff line number Diff line Loading @@ -6,21 +6,6 @@ android:orientation="horizontal" android:padding="@dimen/widget_note_list_padding"> <TextView android:id="@+id/widget_entry_content_tv" android:layout_width="0dp" android:layout_height="match_parent" android:paddingStart="@dimen/widget_note_list_outer_padding" android:paddingEnd="@dimen/widget_note_list_inner_padding" android:paddingLeft="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_inner_padding" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:layout_weight="1" android:textColor="@color/fg_default" android:lines="1" android:ellipsize="end" /> <ImageView android:id="@+id/widget_entry_fav_icon" android:layout_width="@dimen/widget_note_list_fav_icon_width" Loading @@ -28,10 +13,25 @@ android:layout_gravity="center_vertical" android:foregroundGravity="center_vertical" android:paddingStart="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingLeft="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_outer_padding" android:src="@drawable/ic_star_grey600_24dp" android:contentDescription="@string/widget_entry_fav_contentDescription" /> <TextView android:id="@+id/widget_entry_content_tv" android:layout_width="0dp" android:layout_height="match_parent" android:paddingStart="@dimen/widget_note_list_inner_padding" android:paddingLeft="@dimen/widget_note_list_inner_padding" android:paddingEnd="@dimen/widget_note_list_outer_padding" android:paddingRight="@dimen/widget_note_list_outer_padding" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:layout_weight="1" android:textColor="@color/fg_default" android:lines="1" android:ellipsize="end" /> </LinearLayout>