File tree Expand file tree Collapse file tree
subutil/src/main/java/com/blankj/subutil/util
utilcode/src/main/java/com/blankj/utilcode/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .blankj .subutil .util ;
22
3- import android .content .Context ;
43import android .content .Intent ;
54import android .location .Address ;
65import android .location .Criteria ;
1211import android .os .Bundle ;
1312import android .provider .Settings ;
1413import android .util .Log ;
15- import android .widget .Toast ;
1614
1715import java .io .IOException ;
1816import java .util .List ;
Original file line number Diff line number Diff line change 2828 */
2929public final class ToastUtils {
3030
31- private static final int DEFAULT_COLOR = 0x12000000 ;
32- private static Toast sToast ;
31+ private static final int DEFAULT_COLOR = 0x12000000 ;
32+ private static final Handler sHandler = new Handler (Looper .getMainLooper ());
33+ private static Toast sToast ;
34+ private static WeakReference <View > sViewWeakReference ;
3335 private static int gravity = Gravity .CENTER_HORIZONTAL | Gravity .BOTTOM ;
3436 private static int xOffset = 0 ;
3537 private static int yOffset = (int ) (64 * Utils .getContext ().getResources ().getDisplayMetrics ().density + 0.5 );
3638 private static int backgroundColor = DEFAULT_COLOR ;
3739 private static int bgResource = -1 ;
3840 private static int messageColor = DEFAULT_COLOR ;
39- private static WeakReference <View > sViewWeakReference ;
40- private static Handler sHandler = new Handler (Looper .getMainLooper ());
4141
4242 private ToastUtils () {
4343 throw new UnsupportedOperationException ("u can't instantiate me..." );
You can’t perform that action at this time.
0 commit comments