摘要:
1.在edittext编辑框中调用属性。2.创建一个drawable资源文件来设置,也可以直接用颜色设置。 3.监听edittext的焦点变化,获得焦点时将光标设置到最后的位置; @Override public void onFocusChange(View v, boolean hasFocus) { switch (v.... 阅读全文
摘要:
1. 创建ProgressDialog 法1: ProgressDialog dialog=ProgressDialog.show(this,"标题","内容","true","true"); // this这里是context环境,context最好是你要用的activity,其他环境有时候会造成 阅读全文
摘要:
1.创建自己的主题样式(style) 在vules资源目录下的style中创建一个样式 阅读全文
摘要:
1. 首先获取BluetoothAdapter 方法 1:final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE); BluetoothAdapter mBluet 阅读全文
摘要:
// 昵称修改 弹出框popuwindowprivate void showNickPopuWindow(View view){ if (nickWindow==null){ View layout=LayoutInflater.from(this.getContext()).inflate(R.l 阅读全文
摘要:
在androi中WIFI信息的获取可以通过系统提供的WIFI Service获取 WifiManager wifi_service = (WifiManager)getSystemService(WIFI_SERVICE); WifiInfo wifiInfo = wifi_service.getC 阅读全文
摘要:
MapView mapView= (MapView) findViewById(R.id.home_map_view); mapView.showScaleControl(false); // 设置比例尺是否可见(true 可见/false不可见)mapView.showZoomControls(f 阅读全文
摘要:
方法1: 在xml文件中设置 android:drawableLeft="@drawable/lock_open"android:drawableTop="@drawable/lock_open"android:drawableRight="@drawable/lock_open"android:d 阅读全文
摘要:
java.lang.NoSuchMethodError: android.content.res.Resources.getDrawable/getColor 异常错误。 原因:Context类的getDrawable(res)/geColor(res)方法和Resources的getDrawabl 阅读全文