Browse Source

Minor bookmarks activity UI enhancements

pull/24/head
Apostolos Fanakis 7 years ago
parent
commit
2abace5632
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java
  2. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java
  3. BIN
      app/src/main/res/drawable-hdpi/ic_delete.png
  4. BIN
      app/src/main/res/drawable-hdpi/ic_remove_circle.png
  5. BIN
      app/src/main/res/drawable-mdpi/ic_delete.png
  6. BIN
      app/src/main/res/drawable-mdpi/ic_remove_circle.png
  7. BIN
      app/src/main/res/drawable-xhdpi/ic_delete.png
  8. BIN
      app/src/main/res/drawable-xhdpi/ic_remove_circle.png
  9. BIN
      app/src/main/res/drawable-xxhdpi/ic_delete.png
  10. BIN
      app/src/main/res/drawable-xxhdpi/ic_remove_circle.png
  11. BIN
      app/src/main/res/drawable-xxxhdpi/ic_delete.png
  12. BIN
      app/src/main/res/drawable-xxxhdpi/ic_remove_circle.png
  13. 5
      app/src/main/res/layout/fragment_bookmarks.xml
  14. 20
      app/src/main/res/layout/fragment_bookmarks_board_row.xml
  15. 28
      app/src/main/res/layout/fragment_bookmarks_topic_row.xml
  16. 3
      app/src/main/res/values/strings.xml

2
app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java

@ -73,7 +73,7 @@ public class BoardBookmarksFragment extends Fragment {
for (final Bookmark bookmarkedBoard : boardBookmarks) { for (final Bookmark bookmarkedBoard : boardBookmarks) {
if (bookmarkedBoard != null && bookmarkedBoard.getTitle() != null) { if (bookmarkedBoard != null && bookmarkedBoard.getTitle() != null) {
final LinearLayout row = (LinearLayout) layoutInflater.inflate( final LinearLayout row = (LinearLayout) layoutInflater.inflate(
R.layout.activity_bookmark_board_row, bookmarksLinearView, false); R.layout.fragment_bookmarks_board_row, bookmarksLinearView, false);
row.setOnClickListener(new View.OnClickListener() { row.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {

2
app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java

@ -87,7 +87,7 @@ public class TopicBookmarksFragment extends Fragment {
for (final Bookmark bookmarkedTopic : topicBookmarks) { for (final Bookmark bookmarkedTopic : topicBookmarks) {
if (bookmarkedTopic != null && bookmarkedTopic.getTitle() != null) { if (bookmarkedTopic != null && bookmarkedTopic.getTitle() != null) {
final LinearLayout row = (LinearLayout) layoutInflater.inflate( final LinearLayout row = (LinearLayout) layoutInflater.inflate(
R.layout.activity_bookmark_topic_row, bookmarksLinearView, false); R.layout.fragment_bookmarks_topic_row, bookmarksLinearView, false);
row.setOnClickListener(new View.OnClickListener() { row.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

5
app/src/main/res/layout/fragment_bookmarks.xml

@ -17,6 +17,9 @@
android:id="@+id/bookmarks_container" android:id="@+id/bookmarks_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"/> android:orientation="vertical"
android:showDividers="middle"
android:divider="?android:listDivider"
android:dividerPadding="16dp"/>
</android.support.v4.widget.NestedScrollView> </android.support.v4.widget.NestedScrollView>
</RelativeLayout> </RelativeLayout>

20
app/src/main/res/layout/activity_bookmark_board_row.xml → app/src/main/res/layout/fragment_bookmarks_board_row.xml

@ -8,26 +8,30 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal">
android:paddingBottom="6dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="6dp">
<TextView <TextView
android:id="@+id/bookmark_title" android:id="@+id/bookmark_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingBottom="2dp" android:paddingBottom="8dp"
android:paddingTop="6dp"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:textColor="@color/primary_text" android:textColor="@color/primary_text"
android:textSize="18sp"/> android:textSize="18sp"/>
<ImageButton <ImageButton
android:id="@+id/remove_bookmark" android:id="@+id/remove_bookmark"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/remove_bookmark" android:contentDescription="@string/remove_bookmark"
android:src="@drawable/ic_remove_circle"/> android:src="@drawable/ic_delete"/>
</LinearLayout> </LinearLayout>

28
app/src/main/res/layout/activity_bookmark_topic_row.xml → app/src/main/res/layout/fragment_bookmarks_topic_row.xml

@ -9,26 +9,29 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal">
android:paddingBottom="6dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="6dp">
<TextView <TextView
android:id="@+id/bookmark_title" android:id="@+id/bookmark_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingBottom="2dp" android:paddingBottom="8dp"
android:paddingTop="6dp"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:textColor="@color/primary_text" android:textColor="@color/primary_text"
android:textSize="18sp"/> android:textSize="18sp"/>
<ImageButton <ImageButton
android:id="@+id/toggle_notification" android:id="@+id/toggle_notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginEnd="12dp" android:paddingBottom="3dp"
android:paddingTop="3dp"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:layout_marginEnd="9dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/toggle_notification" android:contentDescription="@string/toggle_notification"
app:srcCompat="@drawable/ic_notification_on"/> app:srcCompat="@drawable/ic_notification_on"/>
@ -36,8 +39,13 @@
<ImageButton <ImageButton
android:id="@+id/remove_bookmark" android:id="@+id/remove_bookmark"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/remove_bookmark" android:contentDescription="@string/remove_bookmark"
android:src="@drawable/ic_remove_circle"/> android:src="@drawable/ic_delete"/>
</LinearLayout> </LinearLayout>

3
app/src/main/res/values/strings.xml

@ -100,7 +100,4 @@
<string name="cancel">Cancel</string> <string name="cancel">Cancel</string>
<string name="open">Open</string> <string name="open">Open</string>
<string name="download">Download</string> <string name="download">Download</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources> </resources>

Loading…
Cancel
Save