2018年8月13日 星期一
自訂義的Toash
public static void showToast(final Activity activity, final String word, final long time){
activity.runOnUiThread(new Runnable() {
public void run() {
final Toast toast = Toast.makeText(activity, word, Toast.LENGTH_LONG);
toast.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
toast.cancel();
}
}, time);
}
});
}
訂閱:
張貼留言 (Atom)
-
@Override public void onResponse(Call call, Response response) throws IOException { // final String string = res...
-
//取得網頁上的字串 HttpURLConnection conn=null; try { URL httpUri = new URL(url); conn = (HttpURLConnec...
-
安裝ZX條碼器 public void Menu_QRCODE_Click(View v) { Intent intent = new Intent("com.google.zxing.client.android.SCAN"); ...
沒有留言:
張貼留言