开发(仿微信)Android日程总结(四)

最后一次记录了,通信基本实现,朋友圈粗略实现,添加好友实现。

其中一部分发朋友圈添加好友在我的GitHub上,另一部分是组员用eclipse写的。gong共用一个数据库,可是开发出两个软件,无法集成(有些麻烦,没时间了)。

Android开发记录(四)
1、Switch开关
2、insert into friends (A, B) select id, id from user;
3、有时布局文件来不及刷新,需手动刷新。
4、Shift + F6 [+ Fn]重构快捷键
5、layout_marginHorizontal 用于API26+,
6、divider="@null"去掉listview中间的线。
7、动态填充组件。样例
ll_my_new_friend_vertify = findViewById(R.id.ll_my_new_friend_vertify);
        RelativeLayout relativeLayout = (RelativeLayout)LayoutInflater.from(this).inflate(R.layout.layout_my_new_friend_vertify_apply, ll_my_new_friend_vertify, false);
        ll_my_new_friend_vertify.addView(relativeLayout, 0); 
        若不指定父组件,填充的布局的一些属性是无效的。
8、声明时初始化易抛出异常。
9、学习使用了数据库操作。db.exeSQL() db.insert(name, null, values); //ContentValues
10、Ctrl + Shift + 左右键,快速选择
11、LayoutInflater.from(this).inflate()填充布局文件,若要修改布局文件中的控件。可以用View.findViewById()获取控件对象,真的。
12、#00000000 透明色。
13、Toast + tab.
14、android stuido重复操作是Ctrl + shift + Z.
15、Ctrl+ P 提示。
16、重写onBackPressed()时,super.onBackPressed();//不能要super()
17、InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
                imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
                隐藏输入法
18、getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
输入法一直可见。
19、通过路径获得图片

你可能感兴趣的:(安卓基础)