Remove ProgressDialog in AppManager
This commit is contained in:
@@ -42,6 +42,7 @@ import java.io._
|
||||
import java.net._
|
||||
import java.security.MessageDigest
|
||||
|
||||
import android.animation.{AnimatorListenerAdapter, Animator}
|
||||
import android.app.ActivityManager
|
||||
import android.content.pm.{ApplicationInfo, PackageManager}
|
||||
import android.content.{Context, Intent}
|
||||
@@ -142,6 +143,16 @@ object Utils {
|
||||
toast
|
||||
}
|
||||
|
||||
def crossFade(context: Context, from: View, to: View) {
|
||||
def shortAnimTime = context.getResources.getInteger(android.R.integer.config_shortAnimTime)
|
||||
to.setAlpha(0)
|
||||
to.setVisibility(View.VISIBLE)
|
||||
to.animate().alpha(1).setDuration(shortAnimTime)
|
||||
from.animate().alpha(0).setDuration(shortAnimTime).setListener(new AnimatorListenerAdapter {
|
||||
override def onAnimationEnd(animation: Animator) = from.setVisibility(View.GONE)
|
||||
})
|
||||
}
|
||||
|
||||
// Blocked > 3 seconds
|
||||
def toggleAirplaneMode(context: Context) {
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
|
||||
Reference in New Issue
Block a user