原创 android自定義最簡單的流式佈局

一、.首先 在自定義view方面需要 android 最基礎的知識也就是View的繪製流程了  measure、layout、draw的三個執行流程 measure:測量,測量自己有多大,如果是ViewGroup的話會同時測量裏面的子控件

原创 listview條目長按問題

listview的條目 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/and

原创 html5+原生 js互調

隨着移動互聯網的高速發展,常規的開發速度已經漸漸不能滿足市場需求。原生H5混合開發應運而生,目前,市場上許多主流應用都有用到混合開發,例如支付寶、美

原创 關於低版本design:23.0.0 會出現滑動的時候出現getX()出現爲null問題

如果使用23.0.0滑動會出現null問題 <?xml version="1.0" encoding="utf-8"?> <LinearLayout     xmlns:android="http://schemas.android.c

原创 實現秒錶

public String getMin() { long min = (timeUsedInsec) / 60000; return min <

原创 沉浸式java代碼實現

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window

原创 Retrofit使用

   //這段代碼放到   業務層公共操作的封裝   protected static ResponseInfoAPI responseInfoAPI;   public Presenter() { if (responseInfo

原创 在自己的app中調用其他瀏覽器顯示網頁

Uri uri=Uri.parse("http://www.baidu.com"); Intent intent=new Intent(Inten

原创 自定義scrollview彈性佈局

public class DailScrollview extends ScrollView{ private static final Strin