diff --git a/.idea/misc.xml b/.idea/misc.xml
index 2aa7d3f47..2f486ebd0 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/EhViewer.iml b/EhViewer.iml
index c089350cc..8d4928417 100644
--- a/EhViewer.iml
+++ b/EhViewer.iml
@@ -1,5 +1,5 @@
-
+
@@ -7,9 +7,7 @@
-
-
-
+
diff --git a/app/app.iml b/app/app.iml
index c0a79dc16..64b8be0aa 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -1,5 +1,5 @@
-
+
@@ -25,6 +25,7 @@
+
@@ -84,12 +85,13 @@
-
-
-
-
+
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 86cf840e9..31c7cc604 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -27,6 +27,7 @@ dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
+ compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.github.japgolly.android:svg-android:2.0.6'
compile 'com.intellij:annotations:12.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 63061bd85..05bcf332e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -41,7 +41,8 @@
android:name="com.hippo.ehviewer.ui.ContentActivity"
android:configChanges="screenSize|uiMode"
android:label="@string/app_name"
- android:theme="@style/AppTheme.Content">
+ android:theme="@style/AppTheme.Content"
+ android:windowSoftInputMode="stateAlwaysHidden">
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/ContentActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/ContentActivity.java
index 9cd5fb61c..18deb08f2 100644
--- a/app/src/main/java/com/hippo/ehviewer/ui/ContentActivity.java
+++ b/app/src/main/java/com/hippo/ehviewer/ui/ContentActivity.java
@@ -16,24 +16,19 @@
package com.hippo.ehviewer.ui;
import android.content.res.Resources;
-import android.graphics.Color;
import android.os.Bundle;
-import android.support.v4.view.ViewCompat;
import android.support.v4.widget.DrawerLayout;
-import android.support.v7.widget.Toolbar;
import com.hippo.ehviewer.R;
import com.hippo.ehviewer.ui.scene.GalleryListScene;
import com.hippo.scene.StageActivity;
import com.hippo.scene.StageLayout;
-import com.hippo.util.UiUtils;
public class ContentActivity extends StageActivity {
private Resources mResources;
private DrawerLayout mDrawerLayout;
- private Toolbar mToolbar;
private StageLayout mStage;
@Override
@@ -44,14 +39,8 @@ public class ContentActivity extends StageActivity {
mResources = getResources();
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
- mToolbar = (Toolbar) mDrawerLayout.findViewById(R.id.toolbar);
mStage = (StageLayout) mDrawerLayout.findViewById(R.id.stage);
- setSupportActionBar(mToolbar);
-
- mToolbar.setTitleTextColor(Color.WHITE);
- ViewCompat.setElevation(mToolbar, UiUtils.dp2pix(4)); // TODO
-
mDrawerLayout.setStatusBarBackground(R.color.theme_primary_dark);
startFirstScene(GalleryListScene.class);
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java
index 1bf650dfa..de97a281f 100644
--- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java
+++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java
@@ -26,9 +26,11 @@ import com.hippo.ehviewer.data.GalleryListUrlBuilder;
import com.hippo.ehviewer.ui.fragment.GalleryListFragment;
import com.hippo.ehviewer.ui.fragment.SearchFragment;
import com.hippo.scene.Scene;
+import com.hippo.widget.Appbar;
public class GalleryListScene extends Scene implements SearchFragment.OnSearchListener {
+ private Appbar mAppbar;
private ViewPager mViewPager;
private GalleryListPagerAdapter mAdapter;
@@ -37,10 +39,13 @@ public class GalleryListScene extends Scene implements SearchFragment.OnSearchLi
public void onCreate() {
setContentView(R.layout.scene_gallery_list);
+ mAppbar = (Appbar) findViewById(R.id.appbar);
mViewPager = (ViewPager) findViewById(R.id.viewPager);
mAdapter = new GalleryListPagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mAdapter);
+
+ mAppbar.setTitle("EhViewer");
}
@Override
diff --git a/app/src/main/java/com/hippo/ehviewer/widget/SearchLayout.java b/app/src/main/java/com/hippo/ehviewer/widget/SearchLayout.java
index f2f2f8cc1..e7518911a 100644
--- a/app/src/main/java/com/hippo/ehviewer/widget/SearchLayout.java
+++ b/app/src/main/java/com/hippo/ehviewer/widget/SearchLayout.java
@@ -16,11 +16,12 @@
package com.hippo.ehviewer.widget;
import android.content.Context;
+import android.content.res.Resources;
import android.os.Bundle;
import android.os.Parcelable;
-import android.support.v4.view.ViewCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.SwitchCompat;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.LayoutInflater;
@@ -33,7 +34,6 @@ import android.widget.TextView;
import com.hippo.effect.ripple.RippleSalon;
import com.hippo.ehviewer.R;
-import com.hippo.util.UiUtils;
import com.hippo.util.ViewUtils;
import com.hippo.widget.FloatingActionButton;
import com.hippo.widget.PrefixEditText;
@@ -69,6 +69,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
};
private Context mContext;
+ private Resources mResources;
private int mSearchType = SEARCH_TYPE_NORMAL;
private boolean mEnableAdvance = false;
@@ -80,7 +81,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
private CategoryTable mTableCategory;
private CheckBox mCheckSpecifyAuthor;
private PrefixEditText mTextSearch;
- private CheckBox mCheckEnableAdvance;
+ private SwitchCompat mSwitchEnableAdvance;
private View mAdvanceView;
private AdvanceSearchTable mTableAdvanceSearch;
@@ -111,6 +112,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
private void init(Context context) {
mContext = context;
+ mResources = mContext.getResources();
LayoutInflater.from(context).inflate(R.layout.widget_search_layout, this);
@@ -162,7 +164,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
if (buttonView == mCheckSpecifyAuthor) {
mTextSearch.setPrefix(isChecked ? "uploader:" : null);
- } else if (buttonView == mCheckEnableAdvance) {
+ } else if (buttonView == mSwitchEnableAdvance) {
mEnableAdvance = isChecked;
if (mSearchType == SEARCH_TYPE_NORMAL) {
if (isChecked) {
@@ -241,7 +243,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
bindActionView((ActionHolder) holder);
} else {
View view = mInflater.inflate(R.layout.search_category, parent, false);
- ViewCompat.setElevation(view, UiUtils.dp2pix(4)); // TODO
+ // ViewCompat.setElevation(view, UiUtils.dp2pix(4)); // TODO
holder = new SearchHolder(view);
switch (viewType) {
case ITEM_TYPE_NORMAL:{
@@ -275,7 +277,7 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
mTableCategory = (CategoryTable) mNormalView.findViewById(R.id.search_category_table);
mCheckSpecifyAuthor = (CheckBox) mNormalView.findViewById(R.id.search_specify_author);
mTextSearch = (PrefixEditText) mNormalView.findViewById(R.id.search_text);
- mCheckEnableAdvance = (CheckBox) mNormalView.findViewById(R.id.search_enable_advance);
+ mSwitchEnableAdvance = (SwitchCompat) mNormalView.findViewById(R.id.search_enable_advance);
// Restore state
if (mSavedInstanceState != null) {
@@ -283,7 +285,8 @@ public class SearchLayout extends FrameLayout implements CompoundButton.OnChecke
}
mCheckSpecifyAuthor.setOnCheckedChangeListener(SearchLayout.this);
- mCheckEnableAdvance.setOnCheckedChangeListener(SearchLayout.this);
+ mSwitchEnableAdvance.setOnCheckedChangeListener(SearchLayout.this);
+ mSwitchEnableAdvance.setSwitchPadding(mResources.getDimensionPixelSize(R.dimen.switch_padding));
} else {
ViewUtils.removeFromParent(mNormalView);
holder.content.removeAllViews();
diff --git a/app/src/main/java/com/hippo/widget/Appbar.java b/app/src/main/java/com/hippo/widget/Appbar.java
new file mode 100644
index 000000000..9dff8bb29
--- /dev/null
+++ b/app/src/main/java/com/hippo/widget/Appbar.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2015 Hippo Seven
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.hippo.widget;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.hippo.ehviewer.R;
+import com.hippo.util.ViewUtils;
+
+public class Appbar extends FrameLayout {
+
+ private Context mContext;
+
+ private ImageView mNavigationIcon;
+ private TextView mTitle;
+
+ private String mTitleString;
+
+ public Appbar(Context context) {
+ super(context);
+ init(context);
+ }
+
+ public Appbar(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context);
+ }
+
+ public Appbar(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init(context);
+ }
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ public Appbar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ init(context);
+ }
+
+ private void init(Context context) {
+ mContext = context;
+
+ LayoutInflater.from(context).inflate(R.layout.widget_app_bar, this);
+
+ mNavigationIcon = (ImageView) findViewById(R.id.ab_navigation_icon);
+ mTitle = (TextView) findViewById(R.id.ab_title);
+
+ ViewUtils.setVisibility(mNavigationIcon, View.GONE);
+ }
+
+ public void setTitle(int resId) {
+ setTitle(mContext.getString(resId));
+ }
+
+ public void setTitle(String title) {
+ mTitleString = title;
+ mTitle.setText(title);
+ }
+}
diff --git a/app/src/main/java/com/hippo/widget/DrawerFrameLayout.java b/app/src/main/java/com/hippo/widget/DrawerFrameLayout.java
index 25a004a7a..19e25e83d 100644
--- a/app/src/main/java/com/hippo/widget/DrawerFrameLayout.java
+++ b/app/src/main/java/com/hippo/widget/DrawerFrameLayout.java
@@ -18,16 +18,21 @@ package com.hippo.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
+import android.graphics.Rect;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.FrameLayout;
+import org.jetbrains.annotations.NotNull;
+
public class DrawerFrameLayout extends FrameLayout {
private static final int[] MAX_ATTRS = {android.R.attr.maxWidth};
private int mMaxWidth = -1;
+ private OnGetPaddingListener mOnGetPaddingListener;
+
public DrawerFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs, 0, 0);
@@ -50,6 +55,7 @@ public class DrawerFrameLayout extends FrameLayout {
a.recycle();
}
+
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);
@@ -62,4 +68,25 @@ public class DrawerFrameLayout extends FrameLayout {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
+
+ @SuppressWarnings("deprecation")
+ @Override
+ protected boolean fitSystemWindows(@NotNull Rect insets) {
+ if (mOnGetPaddingListener != null) {
+ mOnGetPaddingListener.onGetPadding(insets.left, insets.top,
+ insets.right, insets.bottom);
+ }
+
+ insets.set(0, 0, 0, 0);
+
+ return super.fitSystemWindows(insets);
+ }
+
+ public void setOnGetPaddingListener(OnGetPaddingListener listener) {
+ mOnGetPaddingListener = listener;
+ }
+
+ public interface OnGetPaddingListener {
+ public void onGetPadding(int l, int t, int r, int b);
+ }
}
diff --git a/app/src/main/java/com/hippo/widget/PrefixEditText.java b/app/src/main/java/com/hippo/widget/PrefixEditText.java
index 470bdd6bb..d10478cef 100644
--- a/app/src/main/java/com/hippo/widget/PrefixEditText.java
+++ b/app/src/main/java/com/hippo/widget/PrefixEditText.java
@@ -16,6 +16,8 @@
package com.hippo.widget;
import android.content.Context;
+import android.os.Bundle;
+import android.os.Parcelable;
import android.text.Editable;
import android.text.Selection;
import android.text.TextWatcher;
@@ -25,6 +27,9 @@ import android.widget.AutoCompleteTextView;
public class PrefixEditText extends AutoCompleteTextView
implements TextWatcher {
+ private static final String STATE_KEY_SUPER = "super";
+ private static final String STATE_KEY_PREFIX = "prefix";
+
private Context mContext;
private String mPrefix;
@@ -95,4 +100,21 @@ public class PrefixEditText extends AutoCompleteTextView
}
}
+ @Override
+ public Parcelable onSaveInstanceState() {
+ final Bundle state = new Bundle();
+ state.putParcelable(STATE_KEY_SUPER, super.onSaveInstanceState());
+ state.putString(STATE_KEY_PREFIX, mPrefix);
+ return state;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ if (state instanceof Bundle) {
+ final Bundle savedState = (Bundle) state;
+ super.onRestoreInstanceState(savedState.getParcelable(STATE_KEY_SUPER));
+ setPrefix(savedState.getString(STATE_KEY_PREFIX));
+ }
+ }
+
}
diff --git a/app/src/main/res/layout-land/activity_start.xml b/app/src/main/res/layout-land/activity_start.xml
index 8ef73c7ea..ec8114058 100644
--- a/app/src/main/res/layout-land/activity_start.xml
+++ b/app/src/main/res/layout-land/activity_start.xml
@@ -23,7 +23,7 @@
+ android:layout_weight="1"/>
+ android:text="@string/tip_welcome"/>
+ android:scaleType="fitCenter"
+ android:contentDescription="@null"/>
diff --git a/app/src/main/res/values-sw720dp-land/dimens.xml b/app/src/main/res/layout-sw600dp/scene_gallery_list.xml
similarity index 50%
rename from app/src/main/res/values-sw720dp-land/dimens.xml
rename to app/src/main/res/layout-sw600dp/scene_gallery_list.xml
index 0a1c56fc3..bc3ef1a06 100644
--- a/app/src/main/res/values-sw720dp-land/dimens.xml
+++ b/app/src/main/res/layout-sw600dp/scene_gallery_list.xml
@@ -14,11 +14,21 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
+
-
+
-
- 128dp
- 128dp
+
-
+
diff --git a/app/src/main/res/layout-sw600dp/search_action.xml b/app/src/main/res/layout-sw600dp/search_action.xml
new file mode 100644
index 000000000..6a79b27c2
--- /dev/null
+++ b/app/src/main/res/layout-sw600dp/search_action.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout-sw600dp/search_category.xml b/app/src/main/res/layout-sw600dp/search_category.xml
new file mode 100644
index 000000000..299365746
--- /dev/null
+++ b/app/src/main/res/layout-sw600dp/search_category.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout-sw600dp/widget_search_layout.xml b/app/src/main/res/layout-sw600dp/widget_search_layout.xml
new file mode 100644
index 000000000..f325ac97f
--- /dev/null
+++ b/app/src/main/res/layout-sw600dp/widget_search_layout.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_content.xml b/app/src/main/res/layout/activity_content.xml
index c33f1fcff..d80fc0c65 100644
--- a/app/src/main/res/layout/activity_content.xml
+++ b/app/src/main/res/layout/activity_content.xml
@@ -20,34 +20,19 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true">
-
-
-
-
-
-
-
+ android:layout_height="match_parent"/>
+ android:background="?attr/colorAccent"
+ android:fitsSystemWindows="true"
+ android:clickable="true">
diff --git a/app/src/main/res/layout/activity_start.xml b/app/src/main/res/layout/activity_start.xml
index c592eec75..04236ec0a 100644
--- a/app/src/main/res/layout/activity_start.xml
+++ b/app/src/main/res/layout/activity_start.xml
@@ -40,6 +40,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="6"
- android:scaleType="fitCenter"/>
+ android:scaleType="fitCenter"
+ android:contentDescription="@null"/>
diff --git a/app/src/main/res/layout/draw_left.xml b/app/src/main/res/layout/draw_left.xml
index 521077f7d..f9355b396 100644
--- a/app/src/main/res/layout/draw_left.xml
+++ b/app/src/main/res/layout/draw_left.xml
@@ -13,11 +13,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
+ android:orientation="vertical"
+ android:background="@android:color/black">
diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml
index 8c523dd83..7972affe9 100644
--- a/app/src/main/res/layout/fragment_search.xml
+++ b/app/src/main/res/layout/fragment_search.xml
@@ -17,8 +17,4 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/search_layout"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/search_padding_start"
- android:paddingRight="@dimen/search_padding_end"
- android:paddingTop="@dimen/search_padding_top"
- android:paddingBottom="@dimen/search_padding_bottom"/>
+ android:layout_height="match_parent"/>
diff --git a/app/src/main/res/layout/scene_gallery_list.xml b/app/src/main/res/layout/scene_gallery_list.xml
index 5c2053f44..de3bd0e57 100644
--- a/app/src/main/res/layout/scene_gallery_list.xml
+++ b/app/src/main/res/layout/scene_gallery_list.xml
@@ -13,10 +13,21 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
+
+
+
+
+
diff --git a/app/src/main/res/layout/search_action.xml b/app/src/main/res/layout/search_action.xml
index 10ab0ddc6..c685e4205 100644
--- a/app/src/main/res/layout/search_action.xml
+++ b/app/src/main/res/layout/search_action.xml
@@ -23,7 +23,7 @@
@@ -31,7 +31,7 @@
diff --git a/app/src/main/res/layout/search_category.xml b/app/src/main/res/layout/search_category.xml
index 53716401a..ab5a74a45 100644
--- a/app/src/main/res/layout/search_category.xml
+++ b/app/src/main/res/layout/search_category.xml
@@ -17,18 +17,17 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/search_category_interval"
android:paddingLeft="@dimen/search_category_padding_start"
android:paddingRight="@dimen/search_category_padding_end"
+ android:paddingBottom="@dimen/search_category_padding_bottom"
android:orientation="vertical"
- android:background="@color/search_category_background_color"
- android:layout_marginBottom="8dip">
+ android:background="@color/search_category_background_color">
+ android:layout_height="wrap_content"/>
diff --git a/app/src/main/res/layout/search_normal.xml b/app/src/main/res/layout/search_normal.xml
index a23e7e155..2920e57ec 100644
--- a/app/src/main/res/layout/search_normal.xml
+++ b/app/src/main/res/layout/search_normal.xml
@@ -22,25 +22,29 @@
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/search_item_interval"/>
-
diff --git a/app/src/main/res/layout/widget_advance_search_table.xml b/app/src/main/res/layout/widget_advance_search_table.xml
index 99671ad75..10cf6965e 100644
--- a/app/src/main/res/layout/widget_advance_search_table.xml
+++ b/app/src/main/res/layout/widget_advance_search_table.xml
@@ -22,6 +22,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginBottom="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginRight="@dimen/advance_search_table_item_margin_half"
android:checked="true"
android:text="@string/search_sname"/>
@@ -30,6 +32,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginBottom="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginLeft="@dimen/advance_search_table_item_margin_half"
android:checked="true"
android:text="@string/search_stags"/>
@@ -40,6 +44,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginBottom="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginRight="@dimen/advance_search_table_item_margin_half"
android:text="@string/search_sdesc"/>
@@ -56,6 +66,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginBottom="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginRight="@dimen/advance_search_table_item_margin_half"
android:text="@string/search_sto"/>
@@ -72,6 +88,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginBottom="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginRight="@dimen/advance_search_table_item_margin_half"
android:text="@string/search_sdt2"/>
@@ -88,6 +110,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="@dimen/advance_search_table_item_margin_half"
+ android:layout_marginRight="@dimen/advance_search_table_item_margin_half"
android:text="@string/search_sr"/>
diff --git a/app/src/main/res/layout/widget_app_bar.xml b/app/src/main/res/layout/widget_app_bar.xml
new file mode 100644
index 000000000..cef5d763f
--- /dev/null
+++ b/app/src/main/res/layout/widget_app_bar.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/widget_category_table.xml b/app/src/main/res/layout/widget_category_table.xml
index 9494ad09a..2b3ac04cc 100644
--- a/app/src/main/res/layout/widget_category_table.xml
+++ b/app/src/main/res/layout/widget_category_table.xml
@@ -23,8 +23,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginBottom="4dp"
- android:layout_marginRight="4dp"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginRight="@dimen/category_table_item_margin_half"
android:background="@color/doujinshi"
android:textColor="@android:color/white"
android:text="@string/doujinshi" />
@@ -35,8 +35,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginBottom="4dp"
- android:layout_marginLeft="4dp"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginLeft="@dimen/category_table_item_margin_half"
android:background="@color/manga"
android:textColor="@android:color/white"
android:text="@string/manga" />
@@ -49,9 +49,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginRight="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginRight="@dimen/category_table_item_margin_half"
android:background="@color/artist_cg"
android:textColor="@android:color/white"
android:text="@string/artist_cg" />
@@ -62,9 +62,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginLeft="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginLeft="@dimen/category_table_item_margin_half"
android:background="@color/game_cg"
android:textColor="@android:color/white"
android:text="@string/game_cg" />
@@ -77,9 +77,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginRight="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginRight="@dimen/category_table_item_margin_half"
android:background="@color/western"
android:textColor="@android:color/white"
android:text="@string/western" />
@@ -90,9 +90,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginLeft="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginLeft="@dimen/category_table_item_margin_half"
android:background="@color/non_h"
android:textColor="@android:color/white"
android:text="@string/non_h" />
@@ -105,9 +105,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginRight="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginRight="@dimen/category_table_item_margin_half"
android:background="@color/image_set"
android:textColor="@android:color/white"
android:text="@string/image_set" />
@@ -118,9 +118,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:layout_marginLeft="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginBottom="@dimen/category_table_item_margin_half"
+ android:layout_marginLeft="@dimen/category_table_item_margin_half"
android:background="@color/cosplay"
android:textColor="@android:color/white"
android:text="@string/cosplay" />
@@ -133,8 +133,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginRight="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginRight="@dimen/category_table_item_margin_half"
android:background="@color/asian_porn"
android:textColor="@android:color/white"
android:text="@string/asian_porn" />
@@ -145,8 +145,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginTop="4dp"
- android:layout_marginLeft="4dp"
+ android:layout_marginTop="@dimen/category_table_item_margin_half"
+ android:layout_marginLeft="@dimen/category_table_item_margin_half"
android:background="@color/misc"
android:textColor="@android:color/white"
android:text="@string/misc" />
diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml
index d548109e5..38509baa8 100644
--- a/app/src/main/res/values-sw600dp/dimens.xml
+++ b/app/src/main/res/values-sw600dp/dimens.xml
@@ -16,11 +16,34 @@
-->
-
- 16dp
- 24dp
+
+ 64dp
+
+
+ 52dp
+ 52dp
+ 32dp
+
+
+ 16dp
+
+
+ 16dp
+
+ 160dp
24dp
+
+ 224dp
+ 196dp
+
+
+ 48dp
+ 8dp
+
+
+ 8dp
+
diff --git a/app/src/main/res/values-sw720dp/dimens.xml b/app/src/main/res/values-sw720dp/dimens.xml
deleted file mode 100644
index b16d180b2..000000000
--- a/app/src/main/res/values-sw720dp/dimens.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
- 80dp
- 80dp
-
-
- 24dp
- 24dp
-
-
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 7dd3a2672..6a0515113 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -22,8 +22,18 @@
标签搜索
图片搜索
指定上传者
- 启用高级选项
没关键字也行
+ 启用高级选项
+
+ 搜索画廊
+ 搜索画廊标签
+ 搜索画廊描述
+ 搜索种子文件名
+ 仅显示有种子的本子
+ 搜索 Low-Power 标签
+ 搜索 Downvoted 标签
+ 显示 Expunged 画廊
+ 最低评分:
添加
模式
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 78ddc8f47..0c56ac1b7 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -16,25 +16,29 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index ac51978c1..1725141a1 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -15,15 +15,10 @@
-->
-
- 0dp
- 0dp
- 0dp
- 0dp
-
-
- 0dp
- 0dp
+
+ 16dp
+ 16dp
+ 8dp
4dp
@@ -31,11 +26,30 @@
48dp
-
- 16dp
- 16dp
+
+ 8dp
+
+
+ 16dp
+
+ 0dp
+
+
+ 8dp
16dp
+
+ 56dp
+ @dimen/appbar_size
+ 28dp
+
+
+ 40dp
+ 4dp
+
+
+ 4dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 56fa1236f..297d192f3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -39,6 +39,7 @@
Tag
Image
Specify Uploader
+ No keyword is OK
Enable advance options
Search Gallery
@@ -51,8 +52,6 @@
Show Expunged Galleries
Minimum Rating:
- No keyword is OK
-
Add
Mode
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 5f9d0ae4e..fee4d0f92 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -39,14 +39,14 @@
- @style/TextAppearance.AppCompat.Subhead
- bold
- center
- - 40dp
+ - @dimen/category_table_item_height