自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

不二菜菜子的博客

项目中用到的一些代码

  • 博客(30)
  • 资源 (5)
  • 收藏
  • 关注

转载 Android Handler详细使用方法实例

本文主要介绍Android中Handler的简单使用方法,Handler跟多线程,消息队列联系很紧密,在平常的实际程序开发中比较常见。本文分为4个简单的例子来学习handler。开发环境为android4.1.Handler使用例1这个例子是最简单的介绍handler使用的,是将handler绑定到它所建立的线程中.本次实验完成的功能是:单击Start按钮,程序会开

2016-06-08 15:51:22 223

原创 startActivityForResult和startActivity详解

startActivityForResult与startActivity的不同之处在于:1、startActivity( ) 仅仅是跳转到目标页面,若是想跳回当前页面,则必须再使用一次startActivity( )。2、startActivityForResult( ) 可以一次性完成这项任务,当程序执行到这段代码的时候,假若从T1Activity跳转到下一个Text2Activ

2016-06-08 15:15:11 540

转载 android非常好的在线视频播放器源码(包含在线音频播放源码)

一、在线音频播放器<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"

2016-06-08 15:03:55 9060 5

原创 android字幕滚动,屏幕宽度计算,时间控制

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_p

2016-06-08 15:00:20 600

原创 Android 视频录制限制时间

package com.example.movetest;import java.io.File;import android.app.Activity;import android.content.Intent;import android.database.Cursor;import android.graphics.Bitmap;import android.media.Th

2016-06-08 14:56:34 6002 2

原创 Android调用JavaScript

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <WebVi

2016-06-08 14:52:03 271

原创 Android webView和js交互

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <WebVi

2016-06-08 14:47:24 609

原创 Android 设置欢迎界面

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_p

2016-06-08 14:43:55 304

转载 刮刮乐开奖

package com.example.guale;import com.example.guale.R;import android.os.Bundle;import android.app.Activity;import android.view.Menu;public class MainActivity extends Activity { @Override prot

2016-06-07 14:31:15 930

转载 android刮奖效果

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/layout" android:layout_width="match_parent" a

2016-06-07 14:25:16 656

转载 安卓核心基础知识梳理之Android消息处理机制

Looper、Message、Handler的关系 当我们的Android应用程序的进程一创建的时候,系统就给这个进程提供了一个Looper,Looper是一个死循环,它内部维护这个一个消息队列。Looper不停地从消息队列中取消息(Message),取到消息就发送给了Handler,最后Handler根据接收到的消息去修改UI。Handler的sendMessage方法就是将消息添加到消息队列中

2016-06-07 10:35:16 318

原创 android 加速度传感器,重力传感器,线性加速度传感器

package com.example.acceleration;import android.app.Activity;import android.content.Context;import android.hardware.Sensor;import android.hardware.SensorEvent;import android.hardware.SensorEvent

2016-06-07 10:24:49 1976

原创 android 输入法,里面还集成语音输入

<com.example.android.softkeyboard.LatinKeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyboard" android:layout_alignParentBottom="true

2016-06-07 10:13:56 6355 1

原创 捕获Home键

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_p

2016-06-07 10:09:14 271

翻译 Android :短信验证码自动填写-v2

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jikexueyuan.validatecode" > <application android:allowBackup="true" android:icon="@mipm

2016-06-07 09:44:27 516

转载 Android 滑动开关按钮源码

AndroidManifest.xml<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.qing" android:versionCode="1" android:versionName="1.0" > <application

2016-06-07 09:38:24 625

原创 android 源码大全总结

A5源码---------------------http://down.admin5.com/android/111933.htmlAndroid中文站-----------http://www.androidchina.net/dev/android_sourceDevStore-----------------http://www.devstore.cn/code/list/pn1-

2016-06-06 17:48:25 483

转载 Android中防止重复点击的小技巧

在点击时设置时间标志,判断2次点击的时间差,自定义一个时间间隔SPACE_TIME,做判断:当2次点击的时间差大于SPACE_TIME时才能出发点击。工具类:12345678910111213141516171819

2016-06-06 17:12:10 314

原创 android知识库

android中文apiapp源码站JavaApk手机游戏源码分享极客邦SOHO程序员头条菜鸟要飞

2016-06-06 17:00:41 335

转载 Android开发者服务

Android DevelopersAndroid Studio 中文社区AndroidDevToolsDropbox云存储eoe AndroidFace++ShareSDKTestBird手游测试七牛云存储个推开放平台中国移动应用内计费云测 Testin云知声语音云平台友盟安卓巴士支付宝(移动快捷支付)有道翻译API极光推送

2016-06-06 16:53:54 332

原创 Android广告平台

91斗金移动广告平台admobAdViewiadpush万普世纪力美广告平台哇棒广告多盟广告安沃(Adwo)帷千动媒广告易传媒广告易积分有米广告果合广告聚合点乐广告百度移动联盟艾德思奇广告芒果芒果移动广告优化平台趣米移动广告道有道广告平台酷果

2016-06-06 16:34:15 1110

转载 15 个 Android 通用流行框架大全

2016-06-06 16:27:34 191

转载 Android之应用内部实现国际化

1和2的方法是一样的,然而还是会调整了手机的语言设置3对于大型应用来说显得有点儿笨重针对于这两种程况,我也提供一种方法,即能在不改变手机设置的前提下,又能在大型项目上显得不会太笨重。直接上代码:工具类:import android.content.Context;import android.content.SharedPreferences;import

2016-06-06 16:24:03 362

原创 获取当前屏幕的宽高

DisplayMetrics    dm = new DisplayMetrics();                getWindowManager().getDefaultDisplay().getMetrics(dm);                //获得手机的宽带和高度像素单位为px                String str = "手机屏幕分辨率为:" + dm

2016-06-06 16:22:32 247

原创 动态更改屏幕方向的简单例子(LANDSCAPE与PORTRAIT)

//如果是竖排,则改为横排         if(getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)         {          setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);         }

2016-06-06 16:21:04 1400

转载 ScrollView嵌套ListView,GridView,ViewPager,以及这些控件自动滚动到底部问题的解决

一、在ScrollView中嵌套ListView,有两张方法第一种是自定义View,继承ListView代码如下:[java] view plain copy 在CODE上查看代码片派生到我的代码片import android.content.Context;  import android.util.AttributeSet;  import andr

2016-06-06 16:20:27 648

原创 java实现 阿拉伯数字转换为汉字数字 算法

package test;public class NumberFormatTest {static String[] units = { "", "十", "百", "千", "万", "十万", "百万", "千万", "亿","十亿", "百亿", "千亿", "万亿" };static char[] numArray = { '零', '一'

2016-06-06 16:18:38 602

原创 Andoid自动判断输入是电话,网址或者Email的方法----Linkify的应用!

TextView    tv=      (TextView)findViewById(R.id.tv1); Linkify.addLinks(tv, Linkify.WEB_URLS|            Linkify.EMAIL_ADDRESSES|Linkify.PHONE_NUMBERS);          扩展学习:当然我们还有更简单的方

2016-06-06 16:13:45 286

转载 Android多国语言文件夹文件汇总

中文(中国):values-zh-rCN中文(台湾):values-zh-rTW中文(香港):values-zh-rHK英语(美国):values-en-rUS英语(英国):values-en-rGB英文(澳大利亚):values-en-rAU英文(加拿大):values-en-rCA英文(爱尔兰):values-en-rIE英文(印度):values-en-r

2016-06-06 16:04:45 366

转载 Android代码资源的国际化

internationalization (国际化)简称 i18n,因为在i和n之间还有18个字符,localization(本地化 ),简称L10n。一般用语言_地区的形式表示一种语言,如  zh_CN, zh_TW. 各国语言缩写  http://www.loc.gov/standards/iso639-2/php/code_list.php国家和地区简写 ht

2016-06-06 15:53:54 210

空空如也

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

TA关注的人

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