摘要:
1、将Eclipse项目导入到Android studio 中 很多点9图出现问题解决方法: 在build.gradle里添加以下两句: aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false 用来关闭Androi
阅读全文
posted @ 2017-09-25 15:20
随缘101
阅读(246)
推荐(0)
摘要:
CardView继承至FrameLayout类,可以在一个卡片布局中一致性的显示内容,卡片可以包含圆角和阴影。CardView是一个Layout,可以布局其他View。 CardView常用属性: card_view:cardElevation 阴影的大小及柔和度,以至于可以逼真的模拟出对于深度效果
阅读全文
posted @ 2016-12-29 09:41
随缘101
阅读(765)
推荐(0)
摘要:
上面两句分别配置了项目的Sdk版本和编译Tools版本,在下面的defaultConfig 中配置了 minSdkVersion 、targetSdkVersion 、versionCode 和versionName,相信大家这些都看得懂这些名词的意思, 然后看他们对应的值,project.VERS
阅读全文
posted @ 2016-12-20 00:41
随缘101
阅读(2581)
推荐(0)
摘要:
url = new URL(urlStr); urlConn = (HttpURLConnection) url.openConnection(); // 设置请求方式为"GET" urlConn.setRequestMethod("GET"); // 超时响应时间为5秒 urlConn.setCo
阅读全文
posted @ 2016-12-06 10:19
随缘101
阅读(9372)
推荐(0)
摘要:
/** * 判断SD卡上的文件是否存在 * * pathName = "/storage/sdcard0/doc/1.txt" * * @param pathName * @return */ public static boolean isFileExist(String pathName) { ...
阅读全文
posted @ 2016-12-02 16:08
随缘101
阅读(126)
推荐(0)
摘要:
String SDPATH = Environment.getExternalStorageDirectory() + "/"; String path = SDPATH + "files/"; /** * 此文件支持下载docx,pdf,xls,jpg, * @param urlStr * @param path * @param file...
阅读全文
posted @ 2016-12-02 02:56
随缘101
阅读(349)
推荐(0)
摘要:
打开: et_search.requestFocus(); et_search.setFocusable(true); et_search.setFocusableInTouchMode(true); InputMethodManager imm = (InputMethodManager) get
阅读全文
posted @ 2016-11-30 09:33
随缘101
阅读(282)
推荐(0)
摘要:
public class HandlerTestActivity extends Activity { private TextView tv; private static final int UPDATE = 0; private Handler handler = new Handler() { @Override public v...
阅读全文
posted @ 2016-11-30 09:22
随缘101
阅读(871)
推荐(0)
摘要:
//获得某月份的天数private int getDaysForMonth(int month) { // month is 0-based if (month == 1) { int x400 = month % 400; if (x400 < 0) { x4...
阅读全文
posted @ 2016-11-30 09:06
随缘101
阅读(214)
推荐(0)
摘要:
listview选中没有效果了,设置了android:listselector也没有效果,最后发现是listview中的item布局设置了背景颜色导致,把item的背景色去掉就OK了 http://blog.csdn.net/chenchuntong/article/details/8963630
阅读全文
posted @ 2016-11-22 11:27
随缘101
阅读(253)
推荐(0)