自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

转载 《将博客搬至CSDN》

将博客搬至CSDN转载于:https://www.cnblogs.com/qcgAd/p/6503345.html

2017-03-04 23:56:00 72

转载 大神的一个仿qq气泡

https://github.com/MonkeyMushroom/DragBubbleView 转载于:https://www.cnblogs.com/qcgAd/p/6503328.html

2017-02-23 13:20:00 124

转载 TextInputLayout应用

源码解释: Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text. Also supports showing an error viasetErrorEna...

2017-01-11 14:18:00 104

转载 3D动画工具类

package com.android.cgcxy.rotate3danimation;import android.content.Context;import android.graphics.Camera;import android.graphics.Matrix;import android.view.animation.Animation;import android.vie...

2016-12-16 10:31:00 93

转载 Android studio 的FFmpeg移植

转自:http://www.jianshu.com/p/9d6c42081d08转载于:https://www.cnblogs.com/qcgAd/p/6178218.html

2016-12-14 10:24:00 95

转载 android aidl分析

http://blog.csdn.net/luoyanglizi/article/details/51980630转载于:https://www.cnblogs.com/qcgAd/p/5976227.html

2016-10-19 10:16:00 43

转载 PathEffect 样式解读

PathEffect的六个子类:这六个子类分别可以实现不同的路径效果:以此往下-------》CornerPathEffect:CornerPathEffect mEffects=new CornerPathEffect(50); DashPathEffect:DashPathEffect mEffects = new DashPat...

2016-09-28 10:16:00 111

转载 Android程序开发之获取汉字的首字母

获取一个汉字的拼音首字母。 GB码两个字节分别减去160,转换成10进制码组合就可以得到区位码例如汉字“你”的GB码是0xC4/0xE3,分别减去0xA0(160)就是0x24/0x430x24转成10进制就是36,0x43是67,那么它的区位码就是3667,在对照表中读音为‘n'。案例演示: 1 <LinearLayout xmlns:android="http:/...

2016-09-02 13:40:00 223

转载 调用AsyncTask的excute方法不能立即执行程序的原因分析及改善方案

LinkedBlockingQueue<Runnable> blockingQueue = new LinkedBlockingQueue<Runnable>();ExecutorService exec = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, blockingQueue);n...

2016-08-31 13:24:00 197

转载 辅助

package com.example.test01;import java.util.List;import android.R.bool;import android.accessibilityservice.AccessibilityService;import android.accessibilityservice.AccessibilityServ...

2016-08-18 17:04:00 239

转载 AccessibilityService 使用

public class MyAccessibilityService extends AccessibilityService { @Override public void onAccessibilityEvent(AccessibilityEvent arg0) { int eventyp = arg0.getEventType();...

2016-08-18 14:47:00 97

转载 PopupWindow在某个View之上

View popuView = LayoutInflater.from(this).inflate(R.layout.purrify_main_poupow, null); popuView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); popupWidth = popuView.getMeasure...

2016-05-27 11:14:00 348

转载 日期剩余计算

package com.text;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;public class Text1 { /** * TODO(descr...

2016-04-26 12:31:00 210

转载 Eclipse迁移到Android studio步骤如下:

一、从Eclipse中导出:1、将你的ADT插件版本升级到22.0以上。2、在Eclipse中,选择File-->Export。3、在弹出的导出窗口中,打开Android的文件夹,选择“Generate Gradle Build Files”。4、选中你想要导入到Android Studio中的项目,Finish。注意:导出的项目将会和原来的项目在同一目录,覆盖原来的同时,会新增一...

2016-04-12 10:58:00 72

转载 ViewTreeObserver简介

转自:http://www.cnblogs.com/xingfuzzhd/archive/2013/06/25/3154674.html一、结构public final class ViewTreeObserver extends Object java.lang.Object android.view.ViewTreeObserver...

2016-04-12 09:22:00 101

转载 Android Https通讯

Android Https通信https与http的通信,在我看来主要的区别在于https多了一个安全验证机制,而Android采用的是X509验证,首先我们需要这重写X509类,建立我们的验证规则、、不过对于特定的项目,我们一般都是无条件信任服务端的,因此我们可以对任何证书都无条件信任(其实本质上我们只是信任了特定url的证书,为了偷懒,才那么选择的)/** * 信任所有主...

2016-04-08 09:20:00 82

转载 Android 加载系统图库

public class MainActivity extends Activity implements LoaderCallbacks<Cursor>{ private ListView listView=null; private Uri uri=null; private ContentResolver resolver=null...

2016-02-24 19:39:00 157

转载 Android 自定义Dialog仿洋米购物

1.定义布局文件<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_...

2016-02-24 12:58:00 90

转载 Android 手势

//定义布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:lay...

2016-02-24 10:24:00 59

转载 Android 窗体控件

public class MainActivity extends Activity { private static WindowManager windowManger = null; // 悬浮窗的属性都在这里设置 private static WindowManager.LayoutParams lp = null; // 定义一个悬浮的view...

2016-02-23 16:01:00 122

转载 Android手机横竖屏

三、Android设置横屏或竖屏:(一)、全屏:在Activity的onCreate方法中的setContentView(myview)调用之前添加下面代码 :requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题 getWindow().setFlags(WindowManager.LayoutParams.FLAG...

2016-02-22 13:04:00 139

转载 Android textView中划线

String string = "市场价:¥158.00";TextView textView = (TextView) findViewById(R.id.textView);SpannableString sp = new SpannableString(string);sp.setSpan(new StrikethroughSpan(), 0, string.len...

2016-02-15 20:46:00 110

转载 Android图片轮播

if (autoSwitchpicTask==null){ autoSwitchpicTask = new AutoSwitchPicTask(); autoSwitchpicTask.start(); }else { autoSwitchpicTask.start(); ...

2016-01-20 22:32:00 59

转载 Android 电话拦截

rivate String strAction="android.intent.action.NEW_OUTGOING_CALL"; @Override public void onReceive(Context context, Intent intent) { System.out.println("===PhoneInterceptorRe...

2016-01-14 16:39:00 170

转载 Android 短信拦截

public void onReceive(Context context, Intent intent) { //得到发送广播的意图中的动作 String action=intent.getAction(); //手机收到短信后发送的广播 if(strAction.equals(action)){ ...

2016-01-14 16:05:00 133

转载 Android 系统广播

String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式。 String ALL_APPS_ACTION 动作:列举所有可用的应用。输入:无。 String ALTERNATIVE_CATEGORY 类别:说明 activity 是用户正在浏览的数据的一个可选操作。 String ANSWER_ACTION 动作:处理拨入的电话。 Stri...

2016-01-14 14:54:00 123

转载 RecyclerView

ListViewMainActivity:public class MainActivity extends AppCompatActivity { private RecyclerView recyclerView; private List<String> list= new ArrayList<String>(); ...

2016-01-13 20:55:00 90

转载 Android 网络状态操作

/** * 声明连接管理器对象 */ private ConnectivityManager connectivityManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInst...

2016-01-13 11:35:00 93

转载 webview加载html5的问题

WebSettings ws = mViewHolder.contentWbv.getSettings(); /** * setAllowFileAccess 启用或禁止WebView访问文件数据 setBlockNetworkImage 是否显示网络图像 * setBuiltInZoomControls 设置是否支持缩放 s...

2016-01-12 19:09:00 112

转载 ActionBar

actionLayout:使用 app:actionLayout="@layout/action_layout_view" View edit_view=menuItem_edit.getActionView();actionProvider:使用 app:actionProviderClass="android.support.v7.wi...

2016-01-12 09:19:00 45

转载 android对通讯录的增删改查

1.修改联系人 public void update(View view){ String name=this.editText_name.getText().toString().trim(); if(TextUtils.isEmpty(name)){ this.editText_name.setError("联系...

2016-01-05 16:06:00 313

转载 Android数据库游标封装

public List<Map<String,Object>> cursorToList(Cursor cursor){ List<Map<String,Object>> maps=new ArrayList<Map<String,Object>>(); //返回游标中字...

2016-01-04 10:47:00 115

转载 sqlite语句的基本语法

--删除表t_personDROPTABLEIFEXISTSt_person;--创建t_person表CREATETABLEIFNOTEXISTSt_person(_idINTEGERPRIMARYKEYAUTOINCREMENT,--编号nameVARCHAR(10)UNIQUE,--姓名ageI...

2015-12-31 16:10:00 65

转载 安卓SD卡的操作

/** * 得到常用路径 */ public void getDir(){ // /mnt/sdcard File root=Environment.getExternalStorageDirectory(); // /system File root=Environment.getRootDirectory(); // ...

2015-12-31 11:30:00 72

转载 菜单、toast、对话框的使用

1.请说出android中菜单的类型?  <1.选项菜单(在用户按手机上的Menu键时弹出的菜单)  <2.上下文菜单(在用户长按指定的View对象超过2秒后自动弹出的菜单)  <3.弹出菜单(当用户点击指定的View时弹出的菜单)2.请说出生成选项菜单和处理选项菜单时需要重写Activity中的哪两个方法?  public boolean onCrea...

2015-12-29 08:51:00 108

转载 对话框应用反射销毁

/** * 设置对话框是否打开 * @param dialog 对话框 * @param isOpened true:对话框开着,false:对话框关闭 */ private void dialogIsOpened(DialogInterface dialog, boolean isOpened) { C...

2015-12-28 17:52:00 77

转载 java随机汉字生成

private static String getRandomChinese(){ Random random = new Random(); int code1,code2,code3,code4;//分别代表四个位码 String checkCode = ""; String[] rBase = {"0","1","2","3","4","5","6","...

2015-12-27 14:41:00 108

转载 Android从主界面退出

public class MyApplication extends Application { private LinkedList<Activity> list =null; private static MyApplication instance; MyApplication(){ list=new L...

2015-12-24 14:45:00 152

转载 Android获取网络状态

1 ConnectivityManager manager= (ConnectivityManager) MainActivity.this.getSystemService(Context.CONNECTIVITY_SERVICE);2 NetworkInfo[] infos= manager.getAllNetworkInfo();//获取所有的可用连接3 info.ge...

2015-12-22 17:44:00 73

转载 Android取消状态栏

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);  转载于:https://www.cnblogs.com/qcgAd/p/5067427.html

2015-12-22 17:42:00 106

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除