`
文章列表
被判断的Service 必须是带包名的全名 通过Service的类名来判断是否启动某个服务  private boolean MusicServiceIsStart(List<ActivityManager.RunningServiceInfo> mServiceList,String className){ for(int i = 0; i < mServiceList.size(); i ++){ if(className.equals(mServiceList.get(i).service ...
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.READ_SMS"/> <uses-permission android:name="android.permission.WRITE_SMS"/> private void writeSMS() { ContentResolver cr ...
public class TestService extends ServiceTestCase<TService> { public TestService() { super(TService.class); } @Override protected void setUp() throws Exception { super.setUp(); } @SmallTest public void testPreconditions() { } /** * Test basic startup/shutdown ...
原文http://googletesting.blogspot.jp/2010/12/test-sizes.html 引用 by Simon Stewart What do you call a test that tests your application through its UI? An end-to-end test? A functional test? A system test? A selenium test? I’ve heard all them, and more. I reckon you have too. Tests running against less o ...
测试Application public class TestApplication extends ApplicationTestCase<TApplication> { public TestApplication() { super(TApplication.class); } @Override protected void setUp() throws Exception { super.setUp(); } @SmallTest public void testPreconditions() { } / ...
测试ACTIVITY 直接上类了 public class TestActivity extends ActivityInstrumentationTestCase2<Test1Activity> { private Test1Activity mActivity; // the activity under test private TextView mView; // the activity's TextView (the only view) private String resourceString; public TestActivity( ...
新建ANDROID TEST项目 ECLIPSE右键-->new -->Other-->Android -->Android Test Project-->选择你要测试的项目 简单测试代码 public class SampleCalculator { public int add(int augend, int addend) { return augend + addend; } public int subtration(int minuend, int subtrahend) { return minuend - subtr ...

imagebutton 带文字

<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight=&q ...

SecureCRT 安装SZ RZ

1 wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz 下载。 2 tar zxvf rzsz-3.48.tar.gz 3 make posix 4 cp rz sz /usr/bin 5 使用sz下载文件以后,查看目录见附件

android orm

选择了http://ormlite.com/ 里面还支持ANDROID可以使用的H2数据库 @DatabaseTable(tableName = "accounts") public class Account { @DatabaseField(id = true) private String name; @DatabaseField(canBeNull = false) private String password 下面通过注解的方式配置该类的持久化参数: 1.表名: @DatabaseTable(tableName=" ...
一 全部隐藏 可以试下 <uses-sdk android:minSdkVersion="15" />或者targetVersion=15 版本号可以对应你的手机的ROM的系统版本 二 部分隐藏 在VIEW对象上调用setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); Controls for system UI visibility Since the early days of Android, the system has managed a UI component known a ...
1 编译项目 mvn clean compile 2 执行测试 mvn clean test 3 打包运行 mvn clean package 4 让其他项目引用 mvn clean instal 执行test之前是会先执行compile的,执行package之前 是会先执行test的,而类似地,install之前会执行package。
1 http://maven.apache.org/download.html#Installation下载最新版本的MAVEN 2 http://hzbook.group.iteye.com/group/wiki/2872-Maven-in-action#3338 MAVEN中文使用入门 3 检查JAVA是否安装 CMD模式下:java -version/echo %JAVA_HOME% 4 配置M2_HOME :E:\apache-maven-3.0 5 添加到PATH ;%M2_HOME%\bin;

android 切图

1 程序launcher icons规格 32-bit PNGs with an alpha channel for transparency ldpi(120dpi):36*36px mdpi(160dpi):48*48px hdpi(240dpi):72*72px xhdpi(320dpi):96*96px API Level 8才开始支持 2 图片尺寸与屏幕密度 如果有个图片是为xhdpi准备的,尺寸是200* ...
gdata-src.java-1.47.0 下载地址:http://download.csdn.net/detail/dingbuoyi/4272908 gdata-samples.java-1.47.0 下载地址:http://download.csdn.net/detail/dingbuoyi/4272911 google-api-java-client-1.8.0-beta 下载地址:http://download.csdn.net/detail/dingbuoyi/4272915 google-oauth-java-client-1.8.0-beta 下载地址:http://do ...
Global site tag (gtag.js) - Google Analytics