摘要:final AlertDialog alertDialog = new AlertDialog.Builder(TrainO2OActivity.this).create(); //加上这段代码 alertDialog.setView((TrainO2OActivity.this).getLayou
阅读全文
摘要:原理:通过接受系统开机发送的广播启动相应的Activity AndroidManifest加入权限 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <receiver android:name="
阅读全文
摘要:1、定义BroadcastReceiver 继承BroadcastReceiver 重写onReceive方法 2、注册广播 A、AndroidManifest注册 android:priority="100"表示广播顺序,取值在-1000到1000之间,越大优先级越高 <receiver andr
阅读全文
摘要:attr.xml <?xml version="1.0" encoding="utf-8"?> <resources> <attr name="borderRadius" format="dimension" /> <attr name="type"> <enum name="circle" val
阅读全文
摘要:1、设置为选中状态 > rb.setChecked(true)
阅读全文
摘要://adapter package com.wqdl.chr.ui.controller; import java.util.List; import android.support.v4.view.PagerAdapter;import android.support.v4.view.ViewPa
阅读全文
摘要:去掉箭头 android:groupIndicator="@null" ExpandableListView elv = new ExpandableListView(this); AdapterPersonnel adapter = new AdapterPersonnel (); elv.set
阅读全文
摘要:在webview.load(url)之前运行 //url是需要请求的链接 private void syncCookie( String url){ try{ Log.d("Nat: webView.syncCookie.url", url); CookieSyncManager.createIns
阅读全文
摘要:1、长按、点击冲突 > 长按事件(setOnItemLongClickListener)返回true 2、 android:divider="@null" //取消分割线 android:overScrollMode="never" //取消顶部和底部的蓝色背景 android:listSelect
阅读全文