1、map格式字符串如何解析?
借助json,先将字符串转化为json格式,再取值
JSONObject object = new JSONObject(posMap);
clientIden = object.getString("iden");
----------------------------------------------------------------------------
1、android中新建的项目如何去掉标题栏
修改AndroidManifest.xml中的主题:
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
2、有的时候需要隐藏掉EditText的边框和下划线
android:background="@null"
3、R包不存在
build---> cleanProject--->buildProject---->到类中重新导入包就可以了
4、Fragment中要用到土司
Toast.makeText(getActivity(), "ddd", Toast.LENGTH_SHORT).show();
5、android开发中引入依赖包
file--->project Structure---->app----->dependencies------->右上角加号---->library dependency---->搜索添加
-----------------------------------------------------------------------------------------------
1、获取系统当前日期
final Calendar ca = Calendar.getInstance();
mSt_Year = ca.get(Calendar.YEAR);
mSt_Month = ca.get(Calendar.MONTH);
mSt_Day = ca.get(Calendar.DAY_OF_MONTH);
2、日期对话框
DatePickerDialog dpd = new DatePickerDialog(FilterActivity.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
String DateStr = year+"年"+(month+1)+"月"+dayOfMonth+"日";
mTv_date.setText(DateStr);
}
},mSt_Year,mSt_Month,mSt_Day);
dpd.show();