安卓
懒人-dashu
垃圾程序猿,不解释
展开
-
高通平台视频编码日志输出
Command:for kernel logs please use the below.adb rootadb remountadb shell "echo 0x103F > /d/msm_vidc/debug_level"adb shell "echo 0x3f > /d/msm_vidc/fw_level"adb logcat -b kernel > kernel_log.txtfor logcat in another terminaladb rootadb .原创 2021-12-23 14:46:09 · 680 阅读 · 0 评论 -
安卓工具类------->Http请求的工具类
import java.io.BufferedReader;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.PrintWriter;import java.n原创 2015-02-06 16:49:31 · 1149 阅读 · 0 评论 -
安卓工具类-------->打开或关闭软键盘
import android.content.Context;import android.view.inputmethod.InputMethodManager;import android.widget.EditText;//打开或关闭软键盘public class KeyBoardUtils{ /** * 打卡软键盘 * * @param mEditText输入框原创 2015-02-06 16:51:39 · 872 阅读 · 0 评论 -
安卓工具类------->ToolFor9Ge
import java.io.BufferedReader;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.io.InputSt原创 2015-02-06 17:50:26 · 619 阅读 · 0 评论 -
安卓工具类------->跟网络相关的工具类
import android.app.Activity;import android.content.ComponentName;import android.content.Context;import android.content.Intent;import android.net.ConnectivityManager;import android.net.NetworkInfo原创 2015-02-06 17:38:02 · 643 阅读 · 0 评论 -
安卓工具类------>获得屏幕相关的辅助类
import android.app.Activity;import android.content.Context;import android.graphics.Bitmap;import android.graphics.Rect;import android.util.DisplayMetrics;import android.view.View;import android.原创 2015-02-06 17:39:37 · 555 阅读 · 0 评论 -
安卓工具类-------->Toast统一管理类
import android.content.Context;import android.widget.Toast; //Toast统一管理类public class T{ private T() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instan原创 2015-02-06 17:45:55 · 871 阅读 · 0 评论 -
安卓工具类------->SharedPreferences
import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.util.Map;import android.content.Context;import android.content.SharedPreferences;public class SPUt原创 2015-02-06 17:44:08 · 762 阅读 · 0 评论 -
安卓工具类------>SD卡相关的辅助类
import java.io.File;import android.os.Environment;import android.os.StatFs;//SD卡相关的辅助类public class SDCardUtils{ private SDCardUtils() { /* cannot be instantiated */ throw new UnsupportedO原创 2015-02-06 17:41:27 · 817 阅读 · 0 评论 -
Android 编程下两种方式注册广播的区别
常驻型广播常驻型广播,当你的应用程序关闭了,如果有广播信息来,你写的广播接收器同样的能接收到,它的注册方式就是在你应用程序的AndroidManifast.xml 中进行注册,这种注册方式通常又被称作静态注册。这种方式可以理解为通过清单文件注册的广播是交给操作系统去处理的。示例代码如下: 非常驻型广播非常驻型广播,当应用程序结束了,广原创 2015-05-13 11:48:40 · 1010 阅读 · 0 评论 -
Android Studio调试功能使用总结
这段时间一直在使用Intellij IDEA, 今天把调试区工具的使用方法记录于此。 先编译好要调试的程序。1.设置断点选定要设置断点的代码行,在行号的区域后面单击鼠标左键即可。 2.开启调试会话点击红色箭头指向的小虫子,开始进入调试。 IDE下方出现Debug视图,红色的箭头指向的是现在调试程序停留的原创 2015-08-12 10:17:44 · 1263 阅读 · 0 评论 -
Android开发之WebService介绍
经常有网友问:“在Android平台如何调用WebService”?经过沟通我发现,甚至有些朋友连什么是WebSerivce都不知道就在问怎么使用,更别说和WebService有关的SOAP、WSDL这类“火星”名词了。所以,我就想在讲解Android平台如何调用WebSerivce之前,先来介绍下WebService,看看它到底有多神秘。 记得我的硕士论文题目中就包含“Web Se原创 2015-08-12 08:59:42 · 742 阅读 · 0 评论 -
Android 自定义View 中的OnMeasure的用法
作用:根据父容器传递跟子容器的大小要求来确定子容器的大小。protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)的参数说明和MeasureSpec类的说明:通过MeasureSpec这个类可以获取父View传递过来的一些信息,包括MODE、SIZE属性。这里做一下说明MODE:分为一原创 2015-10-19 11:34:53 · 492 阅读 · 0 评论 -
ubuntu android studio
在 Ubuntu 15.04 上安装 Android Studio打开terminal,输入以下命令sudo apt-add-repository ppa:paolorotolo/android-studiosudo apt-get updatesudo apt-get install android-studio如果要把Android Studio添加到启动栏,你需要如下操作原创 2015-10-14 16:23:35 · 549 阅读 · 0 评论 -
onSaveInstanceState和onRestoreInstanceState触发的时机
当某个activity变得“容易”被系统销毁时,该activity的onSaveInstanceState就会被执行,除非该activity是被用户主动销毁的,例如当用户按BACK键的时候。注意上面的双引号,何为“容易”?言下之意就是该activity还没有被销毁,而仅仅是一种可能性。这种可能性有哪些?通过重写一个activity的所有生命周期的onXXX方法,包括onSaveInstan原创 2015-10-15 16:19:42 · 405 阅读 · 0 评论 -
Android ADB命令?这一次我再也不死记了!
adb的全称为Android Debug Bridge.是android司机经常用到的工具.但是问题是那么多命令写代码已经够费劲了,过段时间在次使用时压根记不住呀.本次的大餐就是为此开篇的.这一次我们不记命令.要用随时过来ctrl+F呀.哇哈哈哈!本篇ADB集锦不管是常用还是冷门的都有.客观您随意看.记不住没关系,收藏了再说呗.你能在本篇文章中收获什么?adb基本指令 Shell...转载 2018-11-14 20:50:16 · 1280 阅读 · 0 评论 -
安卓工具类------->Logcat统一管理类
import android.util.Log;//Logcat统一管理类public class L{ private L() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instantiated"); } public static boolean原创 2015-02-06 16:54:27 · 891 阅读 · 1 评论 -
Android应用性能优化之使用SparseArray替代HashMap
HashMap是java里比较常用的一个集合类,我比较习惯用来缓存一些处理后的结果。最近在做一个Android项目,在代码中定义这样一个变量,实例化时,Eclipse却给出了一个 performance 警告。意 思就是说用SparseArray来替代,以获取更好性能。老实说,对SparseArray并不熟悉,第一感觉应该是Android 提供的一个类。按住Ctrl点击进入Spar原创 2014-07-01 15:12:39 · 837 阅读 · 0 评论 -
基于安卓WebServicw天气预报demo
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >原创 2014-04-06 09:46:27 · 1210 阅读 · 1 评论 -
android ContentValues类
ContentValues类和 Hashtable比较类似,它也是负责存储一些名值对,但是它存储的名值对当中的名是一个String类型,而值都是基本类型。插入记录在这里我们将要插入的值都放到一个ContentValues的实例当中,然后执行插入操作,具体代码如下所示:01public longcreateDiary(String title, Strin转载 2014-03-05 08:43:08 · 1056 阅读 · 0 评论 -
android超链接
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <Tex原创 2014-04-01 16:40:04 · 691 阅读 · 0 评论 -
在TextView中显示表情图像和文本
像QQ一样输入表情图像<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"原创 2014-04-01 18:15:20 · 645 阅读 · 0 评论 -
TextView单击链接弹出Activity
ui设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-01 19:10:32 · 634 阅读 · 0 评论 -
安卓TextView滚动字幕实现跑马灯
ui设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-01 20:40:51 · 981 阅读 · 0 评论 -
EditText显示QQ聊天表情
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >原创 2014-04-02 09:18:58 · 738 阅读 · 0 评论 -
安卓EditText字符过滤
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-03 08:30:12 · 671 阅读 · 0 评论 -
安卓ToggleButton开关按钮使用
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-03 12:37:09 · 619 阅读 · 0 评论 -
android文本编辑自动提示
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-03 09:41:59 · 618 阅读 · 0 评论 -
安卓Button图文混排
Ui设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-03 10:50:12 · 829 阅读 · 0 评论 -
安卓RadioGroup和RadioButton简单使用
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-03 11:12:23 · 884 阅读 · 0 评论 -
安卓SeekBar使用
UI设计<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2014-04-04 12:50:28 · 760 阅读 · 0 评论 -
安卓CheckBox使用
UIactivity-main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation=原创 2014-04-03 14:03:59 · 747 阅读 · 0 评论 -
ViewPager向导demo
ui设计<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="w原创 2014-04-06 15:13:57 · 637 阅读 · 0 评论 -
Android开发学习笔记:数据存取之SQLite浅析
一.SQLite的介绍1.SQLite简介 SQLite是一款轻型的数据库,是遵守ACID的关联式数据库管理系统,它的设计目标是嵌入 式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持 Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如Tcl、PHP、Java、C++、.Net等转载 2014-03-05 09:12:40 · 583 阅读 · 0 评论