data) {
@@ -446,7 +467,7 @@ public class ContentLayout extends FrameLayout {
@Override
public boolean onFooterRefresh() {
- if (mLastPage >= mPageSize) {
+ if (mLastPage >= mPageCount) {
return false;
} else {
mCurrentTaskId = mIdGenerator.nextId();
@@ -525,8 +546,8 @@ public class ContentLayout extends FrameLayout {
* Only work when data is loaded
*/
public void goTo(int page) {
- if (page < 0 || page >= mPageSize) {
- throw new IndexOutOfBoundsException("Page size is " + mPageSize + ", page is " + page);
+ if (page < 0 || page >= mPageCount) {
+ throw new IndexOutOfBoundsException("Page count is " + mPageCount + ", page is " + page);
} else if (page >= mFirstPage && page < mLastPage) {
cancelCurrentTask();
diff --git a/app/src/main/java/com/hippo/scene/Scene.java b/app/src/main/java/com/hippo/scene/Scene.java
index 5d17a3144..ef6dff8ae 100644
--- a/app/src/main/java/com/hippo/scene/Scene.java
+++ b/app/src/main/java/com/hippo/scene/Scene.java
@@ -32,6 +32,8 @@ import android.widget.FrameLayout;
import com.hippo.util.AssertUtils;
import com.hippo.util.ViewUtils;
+import java.util.Map;
+
/**
* {@link com.hippo.scene.Scene} is a {@code Activity} of {@link android.app.Activity}.
*
@@ -164,8 +166,11 @@ public abstract class Scene {
}
}
- void destroy() {
- onDestroy();
+ // TODO Tell destory is it need close
+ void destroy(boolean willSave) {
+ onDestroy(willSave);
+
+ SceneApplication.getRefWatcher(getStageActivity()).watch(this);
}
void open() {
@@ -184,8 +189,12 @@ public abstract class Scene {
onResume();
}
- void replace(@NonNull Scene oldScene) {
- onReplace(oldScene);
+ void save(Map transferStop) {
+ onSave(transferStop);
+ }
+
+ void restore(Map transferStop) {
+ onRestore(transferStop);
}
void setFitPaddingBottom(int b) {
@@ -239,7 +248,7 @@ public abstract class Scene {
}
@SuppressWarnings("ConstantConditions")
- protected void onDestroy() {
+ protected void onDestroy(boolean willSave) {
// Make sure soft key broad is hidden
InputMethodManager imm = (InputMethodManager) getStageActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mSceneView.getWindowToken(), 0);
@@ -259,10 +268,16 @@ public abstract class Scene {
getSceneView().setEnableTouch(true);
}
- protected void onReplace(@NonNull Scene oldScene) {
- mId = oldScene.mId;
- mAnnouncer = oldScene.mAnnouncer;
- mCurtain = oldScene.mCurtain;
+ protected void onSave(Map transferStop) {
+ transferStop.put("scene_id", mId);
+ transferStop.put("scene_announcer", mAnnouncer);
+ transferStop.put("scene_curtain", mCurtain);
+ }
+
+ protected void onRestore(Map transferStop) {
+ mId = (Integer) transferStop.get("scene_id");
+ mAnnouncer = (Announcer) transferStop.get("scene_announcer");
+ mCurtain = (Curtain) transferStop.get("scene_curtain");
if (mCurtain != null) {
mCurtain.onReplace();
}
diff --git a/app/src/main/java/com/hippo/scene/SceneApplication.java b/app/src/main/java/com/hippo/scene/SceneApplication.java
index 235603d14..feba98893 100644
--- a/app/src/main/java/com/hippo/scene/SceneApplication.java
+++ b/app/src/main/java/com/hippo/scene/SceneApplication.java
@@ -16,15 +16,23 @@
package com.hippo.scene;
import android.app.Application;
+import android.content.Context;
+
+import com.squareup.leakcanary.LeakCanary;
+import com.squareup.leakcanary.RefWatcher;
public class SceneApplication extends Application {
private SceneManager mSceneManager;
+ private RefWatcher mRefWatcher;
+
@Override
public void onCreate() {
super.onCreate();
+ mRefWatcher = LeakCanary.install(this);
+
mSceneManager = SceneManager.getInstance();
StageActivity.setSceneManager(mSceneManager);
Scene.setSceneManager(mSceneManager);
@@ -33,4 +41,9 @@ public class SceneApplication extends Application {
public SceneManager getSceneManager() {
return mSceneManager;
}
+
+ public static RefWatcher getRefWatcher(Context context) {
+ SceneApplication application = (SceneApplication) context.getApplicationContext();
+ return application.mRefWatcher;
+ }
}
diff --git a/app/src/main/java/com/hippo/scene/SceneManager.java b/app/src/main/java/com/hippo/scene/SceneManager.java
index 068f0673d..63836e71d 100644
--- a/app/src/main/java/com/hippo/scene/SceneManager.java
+++ b/app/src/main/java/com/hippo/scene/SceneManager.java
@@ -23,7 +23,9 @@ import com.hippo.util.IntIdGenerator;
import com.hippo.util.Log;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Stack;
public class SceneManager {
@@ -39,6 +41,8 @@ public class SceneManager {
private List mSceneStateListenerList = new ArrayList<>();
+ private Map mTransferStop = new HashMap<>();
+
private static SceneManager sSceneManger;
public static SceneManager getInstance() {
@@ -100,12 +104,6 @@ public class SceneManager {
}
}
- private void notifyReplace(Class clazz) {
- for (SceneStateListener l : mSceneStateListenerList) {
- l.onReplace(clazz);
- }
- }
-
Scene createSceneByClass(@NonNull Class sceneClass) {
try {
return (Scene) sceneClass.newInstance();
@@ -210,7 +208,7 @@ public class SceneManager {
// It is the last scene, just finish the activity
mSceneStack.remove(index);
- scene.destroy();
+ scene.destroy(false);
scene.setState(Scene.SCENE_STATE_DESTROY);
notifyDestroy(scene.getClass());
@@ -229,7 +227,7 @@ public class SceneManager {
notifyResume(previousState.getClass());
}
- scene.destroy();
+ scene.destroy(false);
scene.setState(Scene.SCENE_STATE_DESTROY);
notifyDestroy(scene.getClass());
@@ -298,15 +296,18 @@ public class SceneManager {
tempStack.addAll(mSceneStack);
mSceneStack.clear();
+ Map transferStop = mTransferStop;
for (Scene oldScene : tempStack) {
- Scene newScene = createSceneByClass(oldScene.getClass());
- newScene.replace(oldScene);
- notifyReplace(newScene.getClass());
-
- oldScene.destroy();
+ oldScene.destroy(true);
oldScene.setState(Scene.SCENE_STATE_DESTROY);
notifyDestroy(oldScene.getClass());
+ oldScene.save(transferStop);
+
+ Scene newScene = createSceneByClass(oldScene.getClass());
+
+ newScene.restore(transferStop);
+
newScene.create(savedInstanceState);
newScene.setState(Scene.SCENE_STATE_CREATE);
notifyCreate(newScene.getClass());
@@ -315,6 +316,8 @@ public class SceneManager {
newScene.setState(Scene.SCENE_STATE_RUN);
mSceneStack.push(newScene);
+
+ transferStop.clear();
}
}
@@ -323,6 +326,5 @@ public class SceneManager {
void onDestroy(Class clazz);
void onPause(Class clazz);
void onResume(Class clazz);
- void onReplace(Class clazz);
}
}
diff --git a/app/src/main/java/com/hippo/scene/SimpleDialog.java b/app/src/main/java/com/hippo/scene/SimpleDialog.java
index 6fa906ebd..489f44b90 100644
--- a/app/src/main/java/com/hippo/scene/SimpleDialog.java
+++ b/app/src/main/java/com/hippo/scene/SimpleDialog.java
@@ -37,6 +37,8 @@ import com.hippo.effect.ripple.RippleSalon;
import com.hippo.ehviewer.R;
import com.hippo.util.ViewUtils;
+import java.util.Map;
+
public class SimpleDialog extends SceneDialog implements View.OnClickListener,
SceneDialogView.OnClickOutOfDialogListener, AdapterView.OnItemClickListener {
@@ -103,18 +105,22 @@ public class SimpleDialog extends SceneDialog implements View.OnClickListener,
}
@Override
- protected void onReplace(@NonNull Scene oldScene) {
- super.onReplace(oldScene);
+ protected void onSave(Map transferStop) {
+ super.onSave(transferStop);
- SimpleDialog oldDialog = (SimpleDialog) oldScene;
- mBuilder = oldDialog.mBuilder;
- // Avoid memory leak
- mBuilder.mContext = getStageActivity();
+ transferStop.put("builder", mBuilder);
}
@Override
- protected void onDestroy() {
- super.onDestroy();
+ protected void onRestore(Map transferStop) {
+ super.onRestore(transferStop);
+
+ mBuilder = (Builder) transferStop.get("builder");
+ }
+
+ @Override
+ protected void onDestroy(boolean willSave) {
+ super.onDestroy(willSave);
OnCloseListener listener = mBuilder.mOnCloseListener;
if (listener != null) {
@@ -446,6 +452,9 @@ public class SimpleDialog extends SceneDialog implements View.OnClickListener,
}
public @NonNull SimpleDialog build() {
+ // Avoid memory leak
+ mContext = null;
+
SimpleDialog dialog = new SimpleDialog();
dialog.setBuilder(this);
return dialog;
diff --git a/app/src/main/java/com/hippo/scene/TransitionCurtain.java b/app/src/main/java/com/hippo/scene/TransitionCurtain.java
index 8112ba5dc..88950fcf0 100644
--- a/app/src/main/java/com/hippo/scene/TransitionCurtain.java
+++ b/app/src/main/java/com/hippo/scene/TransitionCurtain.java
@@ -29,6 +29,7 @@ import android.widget.AbsoluteLayout;
import com.hippo.animation.ArgbEvaluator;
import com.hippo.animation.SimpleAnimatorListener;
import com.hippo.util.AnimationUtils;
+import com.hippo.util.AssertUtils;
import com.hippo.util.Log;
import com.hippo.util.ViewUtils;
import com.hippo.widget.GlobalLayoutSet;
@@ -42,12 +43,12 @@ public class TransitionCurtain extends Curtain {
private static long ANIMATE_TIME = 300L;
- private ViewPair[] mViewPairArray;
+ private ViewPairSet mViewPairSet;
private AnimatorSet mAnimatorSet;
- public TransitionCurtain(ViewPair[] viewPairArray) {
- mViewPairArray = viewPairArray;
+ public TransitionCurtain(ViewPairSet viewPairSet) {
+ mViewPairSet = viewPairSet;
}
// TODO what if back key press before move animator start
@@ -82,9 +83,13 @@ public class TransitionCurtain extends Curtain {
Set transitionItemSet = new HashSet<>();
// Handle transit part
- for (ViewPair pair : mViewPairArray) {
- final View enterView = pair.getToView(enter);
- final View exitView = pair.getFromView(exit);
+ View[] enterViews = mViewPairSet.getToViewSet(enter);
+ View[] exitViews = mViewPairSet.getFromViewSet(exit);
+ AssertUtils.assertEquals("From view size and to view size must be the same", enterViews.length, exitViews.length);
+ int length = enterViews.length;
+ for (int i = 0; i < length; i++) {
+ final View enterView = enterViews[i];
+ final View exitView = exitViews[i];
if (enterView == null) {
Log.w(TAG, "Can't get enterView when open.");
continue;
@@ -266,9 +271,13 @@ public class TransitionCurtain extends Curtain {
Set transitionItemSet = new HashSet<>();
// Handle transit part
- for (ViewPair pair : mViewPairArray) {
- final View enterView = pair.getFromView(enter);
- final View exitView = pair.getToView(exit);
+ View[] enterViews = mViewPairSet.getFromViewSet(enter);
+ View[] exitViews = mViewPairSet.getToViewSet(exit);
+ AssertUtils.assertEquals("From view size and to view size must be the same", enterViews.length, exitViews.length);
+ int length = enterViews.length;
+ for (int i = 0; i < length; i++) {
+ final View enterView = enterViews[i];
+ final View exitView = exitViews[i];
if (enterView == null) {
Log.w(TAG, "Can't get enterView when close");
continue;
@@ -447,28 +456,8 @@ public class TransitionCurtain extends Curtain {
/**
* the interface help {@link TransitionCurtain} to get the views to do transfer
*/
- public interface ViewPair {
- View getFromView(@NonNull Scene fromScene);
- View getToView(@NonNull Scene toScene);
- }
-
- public static class IdViewPair implements ViewPair {
- private int mFromId;
- private int mToId;
-
- public IdViewPair(int fromId, int toId) {
- mFromId = fromId;
- mToId = toId;
- }
-
- @Override
- public View getFromView(@NonNull Scene fromScene) {
- return fromScene.findViewById(mFromId);
- }
-
- @Override
- public View getToView(@NonNull Scene toScene) {
- return toScene.findViewById(mToId);
- }
+ public interface ViewPairSet {
+ View[] getFromViewSet(@NonNull Scene fromScene);
+ View[] getToViewSet(@NonNull Scene toScene);
}
}
diff --git a/app/src/main/java/com/hippo/scene/preference/PreferenceHeaderScene.java b/app/src/main/java/com/hippo/scene/preference/PreferenceHeaderScene.java
index b8e3eddec..0d45687d8 100644
--- a/app/src/main/java/com/hippo/scene/preference/PreferenceHeaderScene.java
+++ b/app/src/main/java/com/hippo/scene/preference/PreferenceHeaderScene.java
@@ -50,11 +50,11 @@ public class PreferenceHeaderScene extends AppbarScene {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ setContentView(R.layout.scene_preference_header);
mActivity = getStageActivity();
- mRecyclerView = new EasyRecyclerView(getStageActivity());
- setContentView(mRecyclerView);
+ mRecyclerView = (EasyRecyclerView) findViewById(R.id.recycler_view);
mHeaderAdapter = new HeaderAdapter();
mRecyclerView.setAdapter(mHeaderAdapter);
diff --git a/app/src/main/java/com/hippo/scene/preference/PreferenceScene.java b/app/src/main/java/com/hippo/scene/preference/PreferenceScene.java
index 4f1a31426..1c2e325d6 100644
--- a/app/src/main/java/com/hippo/scene/preference/PreferenceScene.java
+++ b/app/src/main/java/com/hippo/scene/preference/PreferenceScene.java
@@ -46,9 +46,9 @@ public class PreferenceScene extends AppbarScene {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ setContentView(R.layout.scene_preference);
- mRecyclerView = new EasyRecyclerView(getStageActivity());
- setContentView(mRecyclerView);
+ mRecyclerView = (EasyRecyclerView) findViewById(R.id.recycler_view);
mAdapter = new PreferenceAdapter();
mRecyclerView.setAdapter(mAdapter);
diff --git a/app/src/main/java/com/hippo/util/FastByteArrayOutputStream.java b/app/src/main/java/com/hippo/util/FastByteArrayOutputStream.java
deleted file mode 100644
index 6a81082ed..000000000
--- a/app/src/main/java/com/hippo/util/FastByteArrayOutputStream.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (C) 2014-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.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-/**
- * It is the same as {@link java.io.ByteArrayOutputStream}, but buffer can be got
- * directly. So it is not safe.
- */
-public class FastByteArrayOutputStream extends OutputStream {
- /**
- * The byte array containing the bytes written.
- */
- protected byte[] buf;
-
- /**
- * The number of bytes written.
- */
- protected int count;
-
- /**
- * Constructs a new ByteArrayOutputStream with a default size of 32 bytes.
- * If more than 32 bytes are written to this instance, the underlying byte
- * array will expand.
- */
- public FastByteArrayOutputStream() {
- buf = new byte[32];
- }
-
- /**
- * Constructs a new {@code ByteArrayOutputStream} with a default size of
- * {@code size} bytes. If more than {@code size} bytes are written to this
- * instance, the underlying byte array will expand.
- *
- * @param size
- * initial size for the underlying byte array, must be
- * non-negative.
- * @throws IllegalArgumentException
- * if {@code size} < 0.
- */
- public FastByteArrayOutputStream(int size) {
- if (size >= 0) {
- buf = new byte[size];
- } else {
- throw new IllegalArgumentException("size < 0");
- }
- }
-
- /**
- * Closes this stream. This releases system resources used for this stream.
- *
- * @throws java.io.IOException
- * if an error occurs while attempting to close this stream.
- */
- @Override
- public void close() throws IOException {
- /**
- * Although the spec claims "A closed stream cannot perform output
- * operations and cannot be reopened.", this implementation must do
- * nothing.
- */
- super.close();
- }
-
- private void expand(int i) {
- /* Can the buffer handle @i more bytes, if not expand it */
- if (count + i <= buf.length) {
- return;
- }
-
- byte[] newbuf = new byte[(count + i) * 2];
- System.arraycopy(buf, 0, newbuf, 0, count);
- buf = newbuf;
- }
-
- /**
- * Resets this stream to the beginning of the underlying byte array. All
- * subsequent writes will overwrite any bytes previously stored in this
- * stream.
- */
- public synchronized void reset() {
- count = 0;
- }
-
- /**
- * Returns the total number of bytes written to this stream so far.
- *
- * @return the number of bytes written to this stream.
- */
- public int size() {
- return count;
- }
-
- /**
- * Returns the contents of this ByteArrayOutputStream as a byte array. Any
- * changes made to the receiver after returning will not be reflected in the
- * byte array returned to the caller.
- *
- * @return this stream's current contents as a byte array.
- */
- public synchronized byte[] getBuffer() {
- return buf;
- }
-
- /**
- * Returns the contents of this ByteArrayOutputStream as a string. Any
- * changes made to the receiver after returning will not be reflected in the
- * string returned to the caller.
- *
- * @return this stream's current contents as a string.
- */
-
- @Override
- public String toString() {
- return new String(buf, 0, count);
- }
-
- /**
- * Returns the contents of this ByteArrayOutputStream as a string. Each byte
- * {@code b} in this stream is converted to a character {@code c} using the
- * following function:
- * {@code c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))}. This method is
- * deprecated and either {@link #toString()} or {@link #toString(String)}
- * should be used.
- *
- * @param hibyte
- * the high byte of each resulting Unicode character.
- * @return this stream's current contents as a string with the high byte set
- * to {@code hibyte}.
- * @deprecated Use {@link #toString()} instead.
- */
- @Deprecated
- public String toString(int hibyte) {
- char[] newBuf = new char[size()];
- for (int i = 0; i < newBuf.length; i++) {
- newBuf[i] = (char) (((hibyte & 0xff) << 8) | (buf[i] & 0xff));
- }
- return new String(newBuf);
- }
-
- /**
- * Returns the contents of this ByteArrayOutputStream as a string converted
- * according to the encoding declared in {@code charsetName}.
- *
- * @param charsetName
- * a string representing the encoding to use when translating
- * this stream to a string.
- * @return this stream's current contents as an encoded string.
- * @throws java.io.UnsupportedEncodingException
- * if the provided encoding is not supported.
- */
- public String toString(String charsetName) throws UnsupportedEncodingException {
- return new String(buf, 0, count, charsetName);
- }
-
- /**
- * Writes {@code count} bytes from the byte array {@code buffer} starting at
- * offset {@code index} to this stream.
- *
- * @param buffer
- * the buffer to be written.
- * @param offset
- * the initial position in {@code buffer} to retrieve bytes.
- * @param len
- * the number of bytes of {@code buffer} to write.
- * @throws NullPointerException
- * if {@code buffer} is {@code null}.
- * @throws IndexOutOfBoundsException
- * if {@code offset < 0} or {@code len < 0}, or if
- * {@code offset + len} is greater than the length of
- * {@code buffer}.
- */
- @Override
- public synchronized void write(byte[] buffer, int offset, int len) {
- if ((offset | count) < 0 || offset > buffer.length || buffer.length - offset < count) {
- throw new ArrayIndexOutOfBoundsException("length=" + buffer.length + "; regionStart=" + offset
- + "; regionLength=" + count);
- }
- if (len == 0) {
- return;
- }
- expand(len);
- System.arraycopy(buffer, offset, buf, this.count, len);
- this.count += len;
- }
-
- /**
- * Writes the specified byte {@code oneByte} to the OutputStream. Only the
- * low order byte of {@code oneByte} is written.
- *
- * @param oneByte
- * the byte to be written.
- */
- @Override
- public synchronized void write(int oneByte) {
- if (count == buf.length) {
- expand(1);
- }
- buf[count++] = (byte) oneByte;
- }
-
- /**
- * Takes the contents of this stream and writes it to the output stream
- * {@code out}.
- *
- * @param out
- * an OutputStream on which to write the contents of this stream.
- * @throws java.io.IOException
- * if an error occurs while writing to {@code out}.
- */
- public synchronized void writeTo(OutputStream out) throws IOException {
- out.write(buf, 0, count);
- }
-}
diff --git a/app/src/main/java/com/hippo/widget/GlobalLayoutSet.java b/app/src/main/java/com/hippo/widget/GlobalLayoutSet.java
index 74a2f0174..ecbde2341 100644
--- a/app/src/main/java/com/hippo/widget/GlobalLayoutSet.java
+++ b/app/src/main/java/com/hippo/widget/GlobalLayoutSet.java
@@ -35,6 +35,10 @@ public class GlobalLayoutSet {
mSize++;
}
+ public int getSize() {
+ return mSize;
+ }
+
private class LayoutListener implements ViewTreeObserver.OnGlobalLayoutListener {
private ViewTreeObserver mObserver;
diff --git a/app/src/main/res/drawable/ic_cellphone_android_theme_primary.xml b/app/src/main/res/drawable/ic_cellphone_android_theme_accent.xml
similarity index 92%
rename from app/src/main/res/drawable/ic_cellphone_android_theme_primary.xml
rename to app/src/main/res/drawable/ic_cellphone_android_theme_accent.xml
index 191f8b6e7..bfee3f683 100644
--- a/app/src/main/res/drawable/ic_cellphone_android_theme_primary.xml
+++ b/app/src/main/res/drawable/ic_cellphone_android_theme_accent.xml
@@ -31,9 +31,9 @@
+ android:fillColor="@color/theme_accent"/>
diff --git a/app/src/main/res/drawable/ic_eh_theme_primary.xml b/app/src/main/res/drawable/ic_eh_theme_accent.xml
similarity index 91%
rename from app/src/main/res/drawable/ic_eh_theme_primary.xml
rename to app/src/main/res/drawable/ic_eh_theme_accent.xml
index 3295ac609..0dcc3a039 100644
--- a/app/src/main/res/drawable/ic_eh_theme_primary.xml
+++ b/app/src/main/res/drawable/ic_eh_theme_accent.xml
@@ -31,9 +31,9 @@
+ android:fillColor="@color/theme_accent"/>
diff --git a/app/src/main/res/drawable/ic_lambda_theme_primary.xml b/app/src/main/res/drawable/ic_lambda_theme_accent.xml
similarity index 92%
rename from app/src/main/res/drawable/ic_lambda_theme_primary.xml
rename to app/src/main/res/drawable/ic_lambda_theme_accent.xml
index c0d0aeb1a..79ff4c3b8 100644
--- a/app/src/main/res/drawable/ic_lambda_theme_primary.xml
+++ b/app/src/main/res/drawable/ic_lambda_theme_accent.xml
@@ -31,9 +31,9 @@
+ android:fillColor="@color/theme_accent"/>
diff --git a/app/src/main/res/layout/scene_gallery_detail.xml b/app/src/main/res/layout/scene_gallery_detail.xml
index 42797ff94..9d863d757 100644
--- a/app/src/main/res/layout/scene_gallery_detail.xml
+++ b/app/src/main/res/layout/scene_gallery_detail.xml
@@ -13,10 +13,76 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/scene_gallery_list.xml b/app/src/main/res/layout/scene_gallery_list.xml
index 9e0e782c4..db3dd741d 100644
--- a/app/src/main/res/layout/scene_gallery_list.xml
+++ b/app/src/main/res/layout/scene_gallery_list.xml
@@ -31,8 +31,8 @@
android:layout_height="match_parent"
android:clipToPadding="false"
auto:space="@dimen/search_layout_space"
- auto:spaceLeft="@dimen/search_layout_space_vertical"
- auto:spaceRight="@dimen/search_layout_space_vertical"/>
+ auto:spaceLeft="@dimen/search_layout_space_horizontal"
+ auto:spaceRight="@dimen/search_layout_space_horizontal"/>
+
+
+
diff --git a/app/src/main/res/layout/scene_preference_header.xml b/app/src/main/res/layout/scene_preference_header.xml
new file mode 100644
index 000000000..1e2cd2c3d
--- /dev/null
+++ b/app/src/main/res/layout/scene_preference_header.xml
@@ -0,0 +1,25 @@
+
+
+
diff --git a/app/src/main/res/layout/widget_content_layout.xml b/app/src/main/res/layout/widget_content_layout.xml
index b64f6a33f..d122c3be3 100644
--- a/app/src/main/res/layout/widget_content_layout.xml
+++ b/app/src/main/res/layout/widget_content_layout.xml
@@ -58,8 +58,8 @@
android:layout_height="match_parent"
android:clipToPadding="false"
auto:space="@dimen/search_layout_space"
- auto:spaceLeft="@dimen/search_layout_space_vertical"
- auto:spaceRight="@dimen/search_layout_space_vertical"
+ auto:spaceLeft="@dimen/search_layout_space_horizontal"
+ auto:spaceRight="@dimen/search_layout_space_horizontal"
tools:ignore="RtlHardcoded"/>
diff --git a/app/src/main/res/values-sw600dp-land/dimens.xml b/app/src/main/res/values-sw600dp-land/dimens.xml
new file mode 100644
index 000000000..f32e01f71
--- /dev/null
+++ b/app/src/main/res/values-sw600dp-land/dimens.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ 128dp
+
+
+ 128dp
+
+
diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml
index dace243cf..8e957c3f7 100644
--- a/app/src/main/res/values-sw600dp/dimens.xml
+++ b/app/src/main/res/values-sw600dp/dimens.xml
@@ -15,13 +15,23 @@
-->
-
+
8dp
32dp
+ 64dp
+
+
+ 64dp
48dp
+
+ 32dp
+
+
+ 32dp
+
52dp
52dp
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index c7788ad8d..bbd8b1047 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -76,7 +76,7 @@
@color/material_teal_500
@color/material_teal_700
- #ffff6977
+ #ffe91e63
@android:color/white
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index a354bacb3..57231265e 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -15,19 +15,20 @@
-->
-
+
72dp
24dp
16dp
32dp
+ 0dp
+
+
64dip
+ 0dp
56dp
-
-
-
24dp
@@ -70,7 +71,7 @@
8dp
- 8dp
+ 8dp
16dp
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index a4597f125..2bffea35b 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -135,4 +135,20 @@
- @color/text_button_text_accent
+
+
+
+