
Android
番茄炒蛋213
stay hungry,stay foolish!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Intent的学习
Intent和IntentFilter详解 http://blog.youkuaiyun.com/cnnumen/article/details/84647862.Intent.Action http://www.cnblogs.com/hanyonglu/archive/2012/03/26/2417278.html (打电话那个需要在AndroidManifest.xml获取权限)转载 2016-06-04 16:24:38 · 262 阅读 · 0 评论 -
Json数据的解析-Gson
Gson gson=new Gosn(); String json = gson.toJson(list); List fromJson = gson.fromJson(json, new TypeToken>(){}.getType());原创 2016-07-24 20:00:29 · 251 阅读 · 0 评论 -
7种形式的Android Dialog使用举例
转载地址: http://www.oschina.net/question/54100_32486转载 2016-07-24 19:55:26 · 317 阅读 · 0 评论 -
自定义 Toast View
1.获得Toast view 添加view Toast toast = Toast.makeText(MainActivity.this, "自定义View", Toast.LENGTH_SHORT); LinearLayout linearLayout = (LinearLayout) toast.getView(); Image原创 2016-07-24 19:52:10 · 432 阅读 · 0 评论 -
全局获取Context
public class MyApplication extends Application { public static Context context; @Override public void onCreate() { super.onCreate(); context = getApplicationContext();原创 2016-07-24 17:01:17 · 300 阅读 · 0 评论 -
跑马灯的实现
1.单行显示 (singleLine) 2. 文字超过显示区域 (ellipsize="marquee") 3.获得焦点(重写isFocused())原创 2016-07-24 16:59:22 · 313 阅读 · 0 评论 -
按钮简单选择器
selector xmlns:android="http://schemas.android.com/apk/res/android"> item android:state_pressed="true"> shape android:shape="rectangle"> corners android:radius="2dp" /> solid android:color="原创 2016-07-24 16:56:58 · 310 阅读 · 0 评论 -
WOL
LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> EditText android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="wrap_content"原创 2016-07-24 16:55:59 · 420 阅读 · 0 评论 -
ImageView ScaleType属性
当内容与控件的大小不匹配时按照什么样的方式其填充 1. center 把图片放在ImageView中间,不进行任何缩放 2. fitXY 对图片 横向,纵向 独立缩放以适应控件大小 3. fitCenter 缺省值,图片放在ImageView中央 fitStart 开始的地方 fitEnd 结束的地方 centerCrop 完全覆盖 纵横比缩原创 2016-07-24 16:53:09 · 310 阅读 · 0 评论 -
android四大组件
1.Activity 是Android中最基本的一个组件,负责画面展示,UI空间存放,其上的内容直接和用户交互,一个android项目将有多个activity组成 2.Service 运行在系统后台,没有UI画面,他的作用是为程序提供一些服务。例如:下载任务,音乐播放,数据请求等。android系统内部的service 如:电话,短信,GPS ,WIFI等。 3.ContentPr原创 2016-07-24 16:49:55 · 238 阅读 · 0 评论 -
6.12
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.e原创 2016-06-12 20:28:53 · 522 阅读 · 0 评论 -
枚举
public enum SexEnum { Man(0, "man"), Woman(1, "woman"); private String desc; private int value; SexEnum(int value, String desc) { this.value = value; this.desc = d原创 2016-07-24 20:28:52 · 266 阅读 · 0 评论