原创 短信
時間限制 void limited() { Time t = new Time(); // or Time t=new Time("GMT+8"); 加上Time Zone資料。 t.setToNow(); // 取得系統時間
原创 AsyncTask淺談
1.AsyncTask的源碼解析 首先我們從異步任務執行開始,即執行execute()開始分析,將任務放到線程池中執行,線程池中線程都是子線程。我們看executeOnExecutor(sDefaultExecutor,params)執行
原创 廣播的簡單理解
1.什麼是廣播? 廣播是android的四大組件之一,主要對手機的一個全局的監聽,比如說開機,電量,鎖屏都可以監聽到。不過android3.0之後就監聽不到了。 2.有序廣播和無序廣播。 有序廣播:有序廣播首先是有順序的廣播,它是一個
原创 時間轉換
package com.wd.tech.advisorylibrary.utils; import java.text.ParseException; import java.text.SimpleDateFormat; import
原创 面試題
1.Handler詳解 https://note.youdao.com/ynoteshare1/index.html?id=27ff5a76da61396ccf0a99c899811f96&type=note 2.Https自我總結(精簡
原创 上傳頭像
public MultipartBody filesMutipar(Map<String, String> map) { MultipartBody.Builder builder = new MultipartBody
原创 第三方視頻
//第三方視頻依賴 implementation 'com.github.bumptech.glide:glide:3.8.0' //第三方視頻播放 implementation 'cn.jzvd:jia
原创 瀑布流
StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.
原创 預告視頻popuWindow
popupWindow.showAtLocation(v, Gravity.BOTTOM, 0, 0);break; //預告 private void popup1() {
原创 時間
package com.bw.movie.utils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date
原创 textview行間距和省略
android:singleLine="true" android:ellipsize="end" android:lineSpacingExtra = "10dp"
原创 沉浸式狀態欄
if (Build.VERSION.SDK_INT >= 21) { View decorView = getWindow().getDecorView(); int option
原创 按兩次退出
//監聽返回鍵 private long exitTime = 0; @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
原创 6.0權限
package com.bw.movie; import android.Manifest; import android.content.DialogInterface; import android.content.Intent;
原创 RecyclerView購物車
Fragment package com.example.zsd.myapplication0403.frag; import android.support.v7.widget.LinearLayoutManager; impor