diff --git a/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java b/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java index 4d65b037f..5af86ef77 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java @@ -5,6 +5,7 @@ import com.squareup.okhttp.Response; import org.jsoup.nodes.Document; +import java.net.URI; import java.util.List; import eu.kanade.mangafeed.data.database.models.Chapter; @@ -80,6 +81,14 @@ public abstract class BaseSource { // Get the URL of the first page that contains a source image and the page list protected String overrideChapterUrl(String defaultPageUrl) { + if(defaultPageUrl.startsWith("http")){ + try { + URI uri = new URI(defaultPageUrl); + defaultPageUrl = uri.getPath() + "?" + uri.getQuery(); + }catch (Exception ignored){ + return defaultPageUrl; + } + } return defaultPageUrl; } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java index d8380ce2b..3ba48206d 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java @@ -49,6 +49,7 @@ public class CatalogueAdapter extends ArrayAdapter { @Bind(R.id.title) TextView title; @Bind(R.id.author) TextView author; @Bind(R.id.thumbnail) ImageView thumbnail; + @Bind(R.id.favorite_sticker) ImageView favorite_sticker; CatalogueFragment fragment; @@ -73,6 +74,12 @@ public class CatalogueAdapter extends ArrayAdapter { } else { thumbnail.setImageResource(android.R.color.transparent); } + + if(manga.favorite){ + favorite_sticker.setVisibility(View.VISIBLE); + }else{ + favorite_sticker.setVisibility(View.INVISIBLE); + } } } } diff --git a/app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png new file mode 100644 index 000000000..657c4874e Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 000000000..29adeed05 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png new file mode 100644 index 000000000..60b063257 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 000000000..57c9fa546 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png new file mode 100644 index 000000000..8254e7482 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 000000000..547ef30aa Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png new file mode 100644 index 000000000..e4645e9e6 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 000000000..23bb1ba9f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png new file mode 100644 index 000000000..76b491e6e Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 000000000..2745c3ab9 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png differ diff --git a/app/src/main/res/layout/fragment_manga_chapters.xml b/app/src/main/res/layout/fragment_manga_chapters.xml index ae5666a54..35569d797 100644 --- a/app/src/main/res/layout/fragment_manga_chapters.xml +++ b/app/src/main/res/layout/fragment_manga_chapters.xml @@ -19,6 +19,7 @@ android:layout_height="fill_parent" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" + android:descendantFocusability="blocksDescendants" tools:listitem="@layout/item_chapter"> @@ -37,10 +38,68 @@ android:theme="@style/ThemeOverlay.AppTheme.Dark" app:popupTheme="@style/AppTheme.Popup"> - + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_catalogue.xml b/app/src/main/res/layout/item_catalogue.xml index 6e34fa3b6..7273d1048 100644 --- a/app/src/main/res/layout/item_catalogue.xml +++ b/app/src/main/res/layout/item_catalogue.xml @@ -1,10 +1,10 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/card_background" + android:orientation="vertical"> + android:visibility="gone"/> + + + android:layout_alignStart="@+id/unreadText" + android:background="@color/white" + android:orientation="vertical"> + android:textStyle="bold" + tools:text="Sample name"/> + android:textSize="13sp" + tools:text="Sample name"/> diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/item_chapter.xml index 9ea767283..5f02487ed 100644 --- a/app/src/main/res/layout/item_chapter.xml +++ b/app/src/main/res/layout/item_chapter.xml @@ -64,7 +64,8 @@ android:layout_above="@+id/relativeLayout" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:layout_alignParentTop="true"/> + android:layout_alignParentTop="true" + android:layout_marginRight="30dp"/> + android:paddingBottom="18dp" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true"> - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 19994301c..0787c78d2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -21,10 +21,12 @@ Edit Sort up Sort down - Show unread + Unread + Downloaded + Next unread - Ok + OK Cancel