Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import android.view.ViewGroup.LayoutParams
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.view.animation.AccelerateDecelerateInterpolator
import android.view.animation.Animation
import android.view.animation.AnimationUtils
import android.view.animation.DecelerateInterpolator
import android.view.animation.LinearInterpolator
Expand Down Expand Up @@ -317,8 +318,21 @@ class AppOverviewWindow(
}

override fun dismiss() {
// runFadeAnimationSet(false, null, null)
destroy()
// val anim = AnimationUtils.loadAnimation(getContext(), R.anim.lp_exit)
//
// anim.setAnimationListener(object : Animation.AnimationListener {
// override fun onAnimationStart(animation: Animation) {
// }
//
// override fun onAnimationEnd(animation: Animation) {
destroy()
// }

// override fun onAnimationRepeat(animation: Animation) {
// }
// })
//
// appsVp?.startAnimation(anim)
}

fun destroy(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class TopBarControlWindow(
try {
wifiStatus = Settings.Global.getInt(getContext().contentResolver, "wifi_status")
wifiImage?.apply {
setBackgroundResource(if (wifiStatus == 1) R.drawable.control_oval_blue else R.drawable.control_oval_grep)
setBackgroundResource(if (wifiStatus == 1) R.drawable.control_oval_blue else R.drawable.control_oval_gray_22)
setImageResource(if (wifiStatus == 1) R.drawable.icon_wifi_select_full else R.drawable.icon_wifi_select_empty)
}
val wifiName = Settings.Global.getString(getContext().contentResolver, "wifi_name")
Expand Down Expand Up @@ -360,7 +360,7 @@ class TopBarControlWindow(
getContext().sendBroadcast(intent)

wifiImage?.apply {
setBackgroundResource(if (wifiStatus == 0) R.drawable.control_oval_blue else R.drawable.control_oval_grep)
setBackgroundResource(if (wifiStatus == 0) R.drawable.control_oval_blue else R.drawable.control_oval_gray_22)
setImageResource(if (wifiStatus == 0) R.drawable.icon_wifi_select_full else R.drawable.icon_wifi_select_empty)
}
}
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/anim/lp_exit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="120">
<scale
android:fromXScale="1.0" android:toXScale="1.1"
android:fromYScale="1.0" android:toYScale="1.1"
android:pivotX="50%" android:pivotY="50%" />
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/control_oval_gray_22.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<corners android:radius="22dp" />
<solid android:color="#0f000000" />
</shape>
3 changes: 2 additions & 1 deletion app/src/main/res/drawable/control_oval_grep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
android:width="44dp"
android:height="44dp"
android:viewportWidth="44"
android:viewportHeight="44">
android:viewportHeight="44"
>
<path
android:pathData="M0,22a22,22 0,1 0,44 0a22,22 0,1 0,-44 0z"
android:fillColor="#000000"
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/layout/window_topbar_control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@
android:layout_marginTop="15dp"
android:background="@drawable/round_rect_12dp_top"
android:elevation="@dimen/elevation_control_panel"
android:paddingBottom="15dp"
>
<ImageView
android:id="@+id/wifi_img"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="center_vertical"
android:padding="10dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="10dp"
android:src="@drawable/icon_wifi_select_full"
android:background="@drawable/control_oval_blue"
Expand All @@ -61,6 +59,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="6dp"
android:layout_marginBottom="15dp"
>
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -98,7 +97,6 @@
android:layout_alignParentRight="true"
android:background="@drawable/round_rect_12dp_top"
android:elevation="@dimen/elevation_control_panel"
android:paddingBottom="15dp"
>
<ImageView
android:layout_width="44dp"
Expand All @@ -107,14 +105,14 @@
android:layout_marginLeft="10dp"
android:src="@drawable/icon_light_unselect"
android:padding="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/control_oval_gray"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="6dp"
android:layout_marginBottom="15dp"
>
<TextView
android:layout_width="wrap_content"
Expand Down
Loading