Commit 28523091 authored by Max Lv's avatar Max Lv

Move snackbar to the bottom

parent 62e2d636
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" /> <include layout="@layout/toolbar_light_dark" />
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment android:id="@+id/content" <fragment android:id="@+id/content"
class="com.github.shadowsocks.GlobalConfigFragment" class="com.github.shadowsocks.GlobalConfigFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:background="@drawable/background_stat" android:background="@drawable/background_stat"
android:orientation="vertical" android:orientation="vertical"
android:nextFocusRight="@+id/fab" android:nextFocusRight="@+id/fab"
android:layout_alignParentBottom="true"> android:layout_above="@+id/snackbar">
<TextView android:id="@+id/status" <TextView android:id="@+id/status"
android:textSize="16sp" android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
...@@ -81,4 +81,9 @@ ...@@ -81,4 +81,9 @@
app:srcCompat="@drawable/ic_start_idle" app:srcCompat="@drawable/ic_start_idle"
app:pressedTranslationZ="6dp" app:borderWidth="0dp" /> app:pressedTranslationZ="6dp" app:borderWidth="0dp" />
</com.github.jorgecastilloprz.FABProgressCircle> </com.github.jorgecastilloprz.FABProgressCircle>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout> </RelativeLayout>
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" /> <include layout="@layout/toolbar_light_dark" />
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment android:id="@+id/content" <fragment android:id="@+id/content"
class="com.github.shadowsocks.ProfileConfigFragment" class="com.github.shadowsocks.ProfileConfigFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/toolbar_light_dark"/> <include layout="@layout/toolbar_light_dark"/>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/profilesList" android:id="@+id/profilesList"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -252,7 +252,7 @@ final class ProfilesFragment extends ToolbarFragment with Toolbar.OnMenuItemClic ...@@ -252,7 +252,7 @@ final class ProfilesFragment extends ToolbarFragment with Toolbar.OnMenuItemClic
layoutManager.scrollToPosition(profilesAdapter.profiles.zipWithIndex.collectFirst { layoutManager.scrollToPosition(profilesAdapter.profiles.zipWithIndex.collectFirst {
case (profile, i) if profile.id == app.profileId => i case (profile, i) if profile.id == app.profileId => i
}.getOrElse(-1)) }.getOrElse(-1))
undoManager = new UndoSnackbarManager[Profile](view.findViewById(R.id.snackbar), profilesAdapter.undo, profilesAdapter.commit) undoManager = new UndoSnackbarManager[Profile](getActivity.findViewById(R.id.snackbar), profilesAdapter.undo, profilesAdapter.commit)
new ItemTouchHelper(new SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN, new ItemTouchHelper(new SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN,
ItemTouchHelper.START | ItemTouchHelper.END) { ItemTouchHelper.START | ItemTouchHelper.END) {
def onSwiped(viewHolder: ViewHolder, direction: Int) { def onSwiped(viewHolder: ViewHolder, direction: Int) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment