android基础
文章平均质量分 77
Avatar0
没事敲敲代码
展开
-
第二行代码复习笔记之Activity的相关用法
0.Android历史: Andy Rubin创始人 2008年 谷歌正式发布Android 1.0系统。 1.开启主活动:<activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" />原创 2017-06-20 16:37:38 · 264 阅读 · 0 评论 -
第二行代码复习笔记之控件以及布局
3.1.常用控件TextView: android:gravity="center"// 居中 android:textSize="24sp" //文字大小 android:textColor="#00ff00" //文字颜色 android:hint="" //内容为空时显示文字信息 android:maxLines="2" //默认最多显示两行原创 2017-06-20 18:25:02 · 249 阅读 · 0 评论 -
Android Studio常用快捷键
ctrl + n 查找类ctrl + shift + n 查找文件名ctrl + shift + alt + n 查找方法名ctrl + alt + f 转变成全局变量shift + F6 修改变量名,全局响应右键 + Refactor + Extract + style 在布局中集体添加style样式ctrl + F12 在类中...原创 2018-09-11 19:36:47 · 108 阅读 · 0 评论 -
Git命令行
win10下git命令行的使用1.配置身份git config --global user.name "LiTao"git config --global user.email "taolee.developer@foxmail.com2.创建仓库 在项目的根目录下git init3.查看.git文件ls -al4.提交git add b...原创 2018-09-11 19:40:51 · 134 阅读 · 0 评论 -
Android 安装app
安装app```Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT");//文件作为数据源intent.setData(Uri.fromFile(file));intent.setType("applica...原创 2018-09-11 19:51:41 · 449 阅读 · 0 评论 -
Android全屏显示和沉浸式菜单栏
1.全屏显示 第一种方法(代码中)requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);第二种方法(布局...原创 2018-09-11 19:58:30 · 503 阅读 · 0 评论 -
Api28网络请求需要安全验证
在api上访问http协议被认为时不安全的所以需要配置: 1.在res目录下创建xml文件夹,创建network_security_config.xml文件<?xml version="1.0" encoding="utf-8"?><network-security-config> <base-config cleartextTrafficPerm...原创 2018-09-12 09:41:46 · 1060 阅读 · 0 评论