![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
FindMyDante
这个作者很懒,什么都没留下…
展开
-
activity的四种启动模式
设置activity的启动模式,只需在android manifest.xml中设置 android:launchMode="";1.standard(默认模式):每次启动都会创建一个新的activity.2.singletop启动的activity如果在栈顶,就不会创建新的activity.3.singletask启动的activity如果不存在,会创建新的activit原创 2015-09-19 14:37:49 · 454 阅读 · 0 评论 -
viewpager的clipChildren属性
设为false,可以填满原创 2018-05-09 17:55:33 · 1327 阅读 · 0 评论 -
android studio 3.0.1中文输入的问题
android studio 升级到3.0.1 后,搜狗输入法中文会卡或者无法输入。解决方法如下:1.替换android studio 目录的jre文件2.1如果不行,更新搜狗输入法到最新版原创 2017-11-27 17:10:08 · 591 阅读 · 0 评论 -
android的原生SlidingDrawer禁止触摸滑动
重写SlidingDrawer的onInterceptTouchEvent方法,返回false。原创 2017-08-31 15:00:38 · 551 阅读 · 0 评论 -
android 点击图标,应用重新启动
在启动activity的onCreate方法加入: if(!isTaskRoot()){ finish(); return; }原创 2017-07-25 16:40:52 · 511 阅读 · 0 评论 -
android按分辨率压缩图片
public static Bitmap getimage(String srcPath,int width,int height) { BitmapFactory.Options newOpts = new BitmapFactory.Options(); newOpts.inJustDecodeBounds = true; Bitmap b原创 2017-07-24 16:08:07 · 818 阅读 · 0 评论 -
android跳转至权限设置界面
public static void goToSettingIntent(Context context) {Intent localIntent = new Intent();localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);if (Build.VERSION.SDK_INT >= 9) {localIntent.setAct原创 2017-07-07 10:34:33 · 835 阅读 · 0 评论 -
android获取通知权限
支持API19以上方法一:public boolean isNotificationEnable(Context context){ AppOpsManager mAppOps = (AppOpsManager) context.getSystemService(APP_OPS_SERVICE); ApplicationInfo appInfo = conte...原创 2017-07-06 09:29:50 · 8586 阅读 · 0 评论 -
android的webview适应网页(url)中的图片
StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(" \n"); stringBuffer.append(" \n"); stringBuffer.append(" \n"); stringBuffer.append(" \n");原创 2017-07-03 17:32:56 · 322 阅读 · 0 评论 -
栈的顺序结构
1.栈的顺序存储结构:#define STACKSIZE 100;typedef struct{ int stack[STACKSIZE]; int top;}SequenceStack;2.入栈(增)status PushStack(SequenceStack *s,int e){//判断栈是否已满 if(s->top>=STACK原创 2015-09-17 12:50:03 · 470 阅读 · 0 评论 -
android开发中px,dip,dp,sp,dpi的区别,以及dp与px换算公式.
px全称pixel称为像素,就是屏幕上的实际像素点单位.dip或dp(device independent pixels),设备独立像素,与屏幕本身有关.sp全称(scale pixel),类似dp,主要处理文字大小.dpi是屏幕像素密度,每英寸多少像素.density表示每英寸的显示点数,单位dpi;公式:dip=(dpi/160)*px1.dpi=160时,dp=px;原创 2015-09-17 22:33:13 · 646 阅读 · 0 评论 -
andrid五大布局
LinearLayout: linearlayout将每个元素按照水平或垂直顺序排列,每一个子元素都在前一个元素后面.RelativeLayout: relativelayout是按各个按子元素之间的位置关系完成布局.AbsoluteLayout:absolutelayout是绝对定位布局,左上角为(0,0),通过android:layout_x和android:layou原创 2015-09-19 09:05:49 · 474 阅读 · 0 评论 -
andrid系统的架构
1.android系统的架构android采用分层结构,分为四层,从下到上:第一层:Linux核心层:Linux核心层是基于linux内核2.6,android系统的内存管理,系统管理,网络协议以及驱动模型都依赖Linux内核.第二层:系统运行层: 分为系统库(Library)和android run time;系统库用来联系第三层应用程序框架层和linux内核.(1)系统原创 2015-09-19 08:15:59 · 605 阅读 · 0 评论 -
android的5个存储方式
1.sharepreferences: 采用xml保存配置信息,只能在一个包中使用.2.文件存储: android中读取文件和java实现I/O一样,提供了openFileInput和openFileOutput来读取文件.3.sqlite: SQLite是标准的轻量级数据库,支持sql语句.4.ContentProvider: 用于应用之间的数原创 2015-09-19 09:18:54 · 479 阅读 · 0 评论 -
android四大组件
1.activity 一个activity就是一个单独的屏幕,每个activity之间通过intent来通信.2.service service用于在后台完成指定操作,没有用户界面.启动service有两种启动方式: start service:启动后,会导致服务的onstartCommand()方法被调用,其生命周期与启动它的组件无关. b原创 2015-09-19 09:32:41 · 347 阅读 · 0 评论 -
android 自定义实现键盘顶起输入框
1.activity的mainfest设为android:windowSoftInputMode="adjustResize|stateHidden"2.activity的布局结构为设为scrollview+Linearlayout原创 2018-05-22 14:02:38 · 2412 阅读 · 0 评论