UI improvements
|
@ -5,6 +5,7 @@ import com.squareup.okhttp.Response;
|
||||||
|
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import eu.kanade.mangafeed.data.database.models.Chapter;
|
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
|
// Get the URL of the first page that contains a source image and the page list
|
||||||
protected String overrideChapterUrl(String defaultPageUrl) {
|
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;
|
return defaultPageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class CatalogueAdapter extends ArrayAdapter<Manga> {
|
||||||
@Bind(R.id.title) TextView title;
|
@Bind(R.id.title) TextView title;
|
||||||
@Bind(R.id.author) TextView author;
|
@Bind(R.id.author) TextView author;
|
||||||
@Bind(R.id.thumbnail) ImageView thumbnail;
|
@Bind(R.id.thumbnail) ImageView thumbnail;
|
||||||
|
@Bind(R.id.favorite_sticker) ImageView favorite_sticker;
|
||||||
|
|
||||||
CatalogueFragment fragment;
|
CatalogueFragment fragment;
|
||||||
|
|
||||||
|
@ -73,6 +74,12 @@ public class CatalogueAdapter extends ArrayAdapter<Manga> {
|
||||||
} else {
|
} else {
|
||||||
thumbnail.setImageResource(android.R.color.transparent);
|
thumbnail.setImageResource(android.R.color.transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(manga.favorite){
|
||||||
|
favorite_sticker.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
favorite_sticker.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png
Normal file
After Width: | Height: | Size: 651 B |
BIN
app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png
Normal file
After Width: | Height: | Size: 807 B |
BIN
app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png
Normal file
After Width: | Height: | Size: 461 B |
|
@ -19,6 +19,7 @@
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
|
android:descendantFocusability="blocksDescendants"
|
||||||
tools:listitem="@layout/item_chapter">
|
tools:listitem="@layout/item_chapter">
|
||||||
|
|
||||||
</android.support.v7.widget.RecyclerView>
|
</android.support.v7.widget.RecyclerView>
|
||||||
|
@ -37,10 +38,68 @@
|
||||||
android:theme="@style/ThemeOverlay.AppTheme.Dark"
|
android:theme="@style/ThemeOverlay.AppTheme.Dark"
|
||||||
app:popupTheme="@style/AppTheme.Popup">
|
app:popupTheme="@style/AppTheme.Popup">
|
||||||
|
|
||||||
<android.support.v7.widget.ActionMenuView
|
<RelativeLayout
|
||||||
android:id="@+id/bottom_menu"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginRight="4dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/action_sort_up"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="?attr/actionBarSize"/>
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_expand_less_white_36dp"
|
||||||
|
android:title="@string/action_sort_up"
|
||||||
|
android:visible="true"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/action_sort_down"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:src="@drawable/ic_expand_more_white_36dp"
|
||||||
|
android:title="@string/action_sort_down"
|
||||||
|
android:visible="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/white"/>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/action_show_unread"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:checkable="true"
|
||||||
|
android:text="@string/action_show_unread"
|
||||||
|
android:title="@string/action_show_unread"/>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/action_show_downloaded"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:checkable="true"
|
||||||
|
android:text="@string/action_show_downloaded"
|
||||||
|
android:title="@string/action_show_downloaded"/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/action_next_unread"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:src="@drawable/ic_play_arrow_white_36dp"
|
||||||
|
android:title="@string/action_next_unread"
|
||||||
|
android:visible="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
</android.support.v7.widget.Toolbar>
|
</android.support.v7.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,17 +27,29 @@
|
||||||
android:paddingTop="1dp"
|
android:paddingTop="1dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/favorite_sticker"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignEnd="@+id/thumbnail"
|
||||||
|
android:layout_alignRight="@+id/thumbnail"
|
||||||
|
android:layout_alignTop="@+id/thumbnail"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:src="@drawable/ic_action_favorite"
|
||||||
|
android:visibility="invisible"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/footerLinearLayout"
|
android:id="@+id/footerLinearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:background="@color/white"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_alignBottom="@+id/thumbnail"
|
android:layout_alignBottom="@+id/thumbnail"
|
||||||
android:layout_alignLeft="@+id/unreadText"
|
android:layout_alignLeft="@+id/unreadText"
|
||||||
android:layout_alignStart="@+id/unreadText">
|
android:layout_alignStart="@+id/unreadText"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -50,11 +62,10 @@
|
||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:textColor="@color/primary_text"
|
android:textColor="@color/primary_text"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
tools:text="Sample name"
|
android:textStyle="bold"
|
||||||
android:textStyle="bold" />
|
tools:text="Sample name"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
tools:text="Sample name"
|
|
||||||
android:id="@+id/author"
|
android:id="@+id/author"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -64,7 +75,8 @@
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:textColor="@color/hint_text"
|
android:textColor="@color/hint_text"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp"
|
||||||
|
tools:text="Sample name"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,8 @@
|
||||||
android:layout_above="@+id/relativeLayout"
|
android:layout_above="@+id/relativeLayout"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentTop="true"/>
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginRight="30dp"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/chapter_menu"
|
android:id="@+id/chapter_menu"
|
||||||
|
@ -72,10 +73,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:gravity="center|end"
|
android:gravity="center|end"
|
||||||
android:layout_alignRight="@+id/chapter_title"
|
|
||||||
android:layout_alignEnd="@+id/chapter_title"
|
|
||||||
android:layout_alignBottom="@+id/relativeLayout"
|
android:layout_alignBottom="@+id/relativeLayout"
|
||||||
android:paddingBottom="18dp">
|
android:paddingBottom="18dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentEnd="true">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_sort_up"
|
|
||||||
android:title="@string/action_sort_up"
|
|
||||||
android:icon="@drawable/ic_expand_less_white_36dp"
|
|
||||||
android:visible="true"
|
|
||||||
app:showAsAction="ifRoom" />
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_sort_down"
|
|
||||||
android:title="@string/action_sort_down"
|
|
||||||
android:icon="@drawable/ic_expand_more_white_36dp"
|
|
||||||
android:visible="true"
|
|
||||||
app:showAsAction="ifRoom" />
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_show_unread"
|
|
||||||
android:checkable="true"
|
|
||||||
android:title="@string/action_show_unread"
|
|
||||||
android:text="@string/action_show_unread"
|
|
||||||
app:actionViewClass="android.widget.CheckBox"
|
|
||||||
app:showAsAction="ifRoom|withText" />
|
|
||||||
</menu>
|
|
|
@ -21,10 +21,12 @@
|
||||||
<string name="action_edit">Edit</string>
|
<string name="action_edit">Edit</string>
|
||||||
<string name="action_sort_up">Sort up</string>
|
<string name="action_sort_up">Sort up</string>
|
||||||
<string name="action_sort_down">Sort down</string>
|
<string name="action_sort_down">Sort down</string>
|
||||||
<string name="action_show_unread">Show unread</string>
|
<string name="action_show_unread">Unread</string>
|
||||||
|
<string name="action_show_downloaded">Downloaded</string>
|
||||||
|
<string name="action_next_unread">Next unread</string>
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<string name="button_ok">Ok</string>
|
<string name="button_ok">OK</string>
|
||||||
<string name="button_cancel">Cancel</string>
|
<string name="button_cancel">Cancel</string>
|
||||||
|
|
||||||
|
|
||||||
|
|