Browse Source

Added an ImageView to indicate this item is draggable

pull/71/head
babaliaris 4 years ago
parent
commit
5daec6aa32
  1. BIN
      app/src/main/assets/images/draggable_icon.png
  2. 1
      app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksAdapter.java
  3. BIN
      app/src/main/res/drawable-hdpi/draggable_icon.png
  4. BIN
      app/src/main/res/drawable-mdpi/draggable_icon.png
  5. BIN
      app/src/main/res/drawable-xhdpi/draggable_icon.png
  6. BIN
      app/src/main/res/drawable-xxhdpi/draggable_icon.png
  7. BIN
      app/src/main/res/drawable-xxxhdpi/draggable_icon.png
  8. 7
      app/src/main/res/layout/fragment_bookmarks_row.xml

BIN
app/src/main/assets/images/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

1
app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksAdapter.java

@ -57,6 +57,7 @@ public class BookmarksAdapter extends DragItemAdapter<ArrayList<Bookmark>, Bookm
if (m_fragment.bookmarks.get(position).getId().equals("-1"))
{
holder.itemView.findViewById(R.id.bookmark_dragable).setBackgroundResource(R.drawable.bookmark_row_dashed_bg);
holder.itemView.findViewById(R.id.bookmark_drag_icon).setVisibility(View.GONE);
holder.itemView.findViewById(R.id.toggle_notification).setVisibility(View.GONE);
holder.itemView.findViewById(R.id.remove_bookmark).setVisibility(View.GONE);
}

BIN
app/src/main/res/drawable-hdpi/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

BIN
app/src/main/res/drawable-mdpi/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

BIN
app/src/main/res/drawable-xhdpi/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

BIN
app/src/main/res/drawable-xxhdpi/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
app/src/main/res/drawable-xxxhdpi/draggable_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

7
app/src/main/res/layout/fragment_bookmarks_row.xml

@ -22,6 +22,13 @@
android:layout_marginEnd="8dp"
>
<ImageView
android:id="@+id/bookmark_drag_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:srcCompat="@drawable/draggable_icon"
/>
<TextView
android:id="@+id/bookmark_title"
android:layout_width="0dp"

Loading…
Cancel
Save