Commit d6c45df3 authored by Mygod's avatar Mygod

Fix some layout issues on 4.x

parent 232846a4
......@@ -15,7 +15,7 @@
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="-28dp">
android:layout_marginBottom="@dimen/fab_margin_bottom">
<android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@color/material_green_600"
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="fab_margin_bottom">-28dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- TODO: Remove when this issue is fixed: https://github.com/JorgeCastilloPrz/FABProgressCircle/issues/19 -->
<dimen name="fab_margin_bottom">-44dp</dimen>
</resources>
......@@ -1031,12 +1031,12 @@ class Shadowsocks
fabProgressCircle.show()
setPreferenceEnabled(enabled = false)
case State.CONNECTED =>
if (state == State.CONNECTING) fabProgressCircle.beginFinalAnimation()
if (state == State.CONNECTING) fabProgressCircle.beginFinalAnimation() else fabProgressCircle.hide()
fab.setEnabled(true)
changeSwitch(checked = true)
setPreferenceEnabled(enabled = false)
case State.STOPPED =>
if (state == State.STOPPING || state == State.CONNECTING) fabProgressCircle.hide()
fabProgressCircle.hide()
fab.setEnabled(true)
changeSwitch(checked = false)
if (m != null) Snackbar.make(getWindow.getDecorView.findViewById(android.R.id.content),
......
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