work hard work smart

专注于Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 58 下一页

2013年3月27日

摘要: 原文链接:http://coolxing.iteye.com/blog/1211403 原文地址什么是JSON:JSON即JavaScript Object Natation, 它是一种轻量级的数据交换格式, 与XML一样, 是广泛被采用的客户端和服务端交互的解决方案.JSON对象: JSON中对象(Object)以"{"开始, 以"}"结束. 对象中的每一个item都是一个key-value对, 表现为"key:value"的形式, key-value对之间使用逗号分隔. 如:{"name":"cool 阅读全文

posted @ 2013-03-27 20:05 work hard work smart 阅读(413) 评论(0) 推荐(0) 编辑

2013年3月25日

摘要: Android中ExpandableList的使用2本文介绍Android中ExpandableList的使用,在前文的基础上作了很多改进,增加了增加、删除、回调等功能。图中的 “第一行班组号: 1 软件工程2班”是要显示的信息。先看效果图:首先定义一个含有ExpandableListView的Layout。还有一个是显示的文本信息。<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com 阅读全文

posted @ 2013-03-25 16:42 work hard work smart 阅读(1200) 评论(0) 推荐(0) 编辑

摘要: Android ExpandableListView的使用一、MainActivity要继承ExpandableListActivity。效果是当单机ListView的子项是显示另一个ListView。public class MainActivity extends ExpandableListActivity { private static final String NAME = "NAME"; private static final String IS_EVEN = "IS_EVEN"; private ExpandableListAdapte 阅读全文

posted @ 2013-03-25 10:40 work hard work smart 阅读(1604) 评论(0) 推荐(0) 编辑

2013年3月21日

摘要: eclipse插件-easy explore原文地址这个方法比较有效,我用的是最新的Android Developer Tools Build: v21.1.0-569685最近找到一个Eclipse的插件,名字是Easy Explore,是Easy Structs其 中的一个部分。主要的功能就是在Eclipse里面视图的部分如果看到自己的工程,或者Package,包什么的,在安装完该插件以后点击鼠标右键,选 择"Easy Explore"就可以快速的打开该文件的windows存放文件夹,对于快速的导出源文件是一个很有用的插件。安装方法:下载Easy Explore 1.0 阅读全文

posted @ 2013-03-21 17:32 work hard work smart 阅读(262) 评论(0) 推荐(0) 编辑

摘要: Android 资源的使用一、dimension资源的使用Android中dimension单位有: px 像素 dp 密度mm 毫米 pt 点sp 刻度in英寸dimension资源的定义<resources> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertica 阅读全文

posted @ 2013-03-21 14:55 work hard work smart 阅读(368) 评论(0) 推荐(0) 编辑

摘要: Tortoise SVN使用方法,简易图解原文地址svn 使用教程svn 手册文档 刚到公司实习,为了版本控制,我公司使用SVN控制版本,在此记下SVN使用方法,仅供参考! 废话少说,上图!-------------------------------------------------------我是分割线--------------------------------------------------------------------------------------首先就是安装程序啦,这就不用讲解了吧!------------------------------------... 阅读全文

posted @ 2013-03-21 08:47 work hard work smart 阅读(443) 评论(0) 推荐(0) 编辑

2013年3月18日

摘要: Android 自定义View为MyCustomView。在MyCustomView画了一个Rect,颜色为Green,和一个为红色的文字。public class MyCustomView extends View{ private Paint mPaint; private Context mContext; private static final String mString = "Hello world!"; public MyCustomView(Context context) { super(context); // TODO Auto-ge... 阅读全文

posted @ 2013-03-18 15:59 work hard work smart 阅读(322) 评论(0) 推荐(0) 编辑

摘要: Android中的TableLayout的简单使用在Layout中加入TableLayout控件。 <TableLayout android:id="@+id/myTableLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="40dp" android:layout_marginTop="157dp" > </Tab 阅读全文

posted @ 2013-03-18 15:22 work hard work smart 阅读(886) 评论(0) 推荐(0) 编辑

摘要: 项目的结构首先新建一个book_info.xml的xml文件,结构如下:<?xml version="1.0" encoding="UTF-8"?><books> <catalog>Computer</catalog> <book> <country>USA</country> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <price>10 阅读全文

posted @ 2013-03-18 14:58 work hard work smart 阅读(239) 评论(0) 推荐(0) 编辑

2013年3月17日

摘要: 一、Android Notication的使用 private void sendNotification() { // TODO Auto-generated method stub NotificationManager manager = (NotificationManager)this... 阅读全文

posted @ 2013-03-17 21:10 work hard work smart 阅读(931) 评论(0) 推荐(0) 编辑

2013年3月16日

摘要: Layout的设计,其实有我这里直接拖了一个TabHost控件,然后在每个Tab中放一个Button。文件名为activity_tab_host.xml.<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="matc 阅读全文

posted @ 2013-03-16 18:25 work hard work smart 阅读(1166) 评论(0) 推荐(0) 编辑

摘要: Android TabHost的使用,这里采用继承TabActivity的方法。这里分别定制三个Tab,分别为american.xml, chinese.xml, japanese.xml三个Layout。american.xml文件 chinese.xml文件 japanese.xml文件 三个Layout对应的java文件为AmericanActivity.java, ChinaActivity.java, JapanActivity.javaAmericanActivity.java文件public clas... 阅读全文

posted @ 2013-03-16 17:35 work hard work smart 阅读(527) 评论(0) 推荐(0) 编辑

2013年3月15日

摘要: Android 中PopupWindow使用。PopupWindow会阻塞对话框,要在外部线程 或者 PopupWindow本身做退出才行。mypopWindow.xml的Layout设计如下。<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android: 阅读全文

posted @ 2013-03-15 14:47 work hard work smart 阅读(21682) 评论(0) 推荐(0) 编辑

2013年3月14日

摘要: 1、定义简单的适配器形式。首先定义一个Layout为listviewitem.xml. 里面有三个TextView。分别代表学号,姓名,班级。<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cuslistViewItem" android:layout_width="match_pa 阅读全文

posted @ 2013-03-14 19:07 work hard work smart 阅读(369) 评论(0) 推荐(0) 编辑

摘要: Android 中AlterDialog使用,AlterDialog的使用分为两种,一种是直接使用,一种是自己设计一个Layout,然后当做Dialog显示出来。1、定义两个Button,一个用来显示AlterDialog,一个显示自定义的AlterDialog。 private Button bt1; private Button bt2;注册事件 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity.. 阅读全文

posted @ 2013-03-14 16:27 work hard work smart 阅读(6480) 评论(0) 推荐(0) 编辑

摘要: Android中BroadcastReceiver使用分为动态注册BroastcastReceiver ,静态注册BroastcastReceiver1、动态注册BroastcastReceiver。定义BroadcastReceiver: private BroadcastReceiver bcr1 = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated meth... 阅读全文

posted @ 2013-03-14 15:19 work hard work smart 阅读(1838) 评论(0) 推荐(0) 编辑

摘要: Android 中的Theme和Style使用,还是比较简单的。1、 首先在res/values/styles.xml的resource中定义三个样式,分别为: <style name="TextView"> <item name="android:textSize">38sp</item> <item name="android:textColor">#128</item> <item name="android:shadowRadius"> 阅读全文

posted @ 2013-03-14 13:14 work hard work smart 阅读(3150) 评论(0) 推荐(0) 编辑

摘要: Android的Handler使用如何每隔一段时间进行一些操作呢,Handler就可以做到。 下面的Demo的功能为每隔3秒显示MyItems数组中的不同数据。public class MainActivity extends Activity { private int count = 0; private static final String[] MyItems = { "Here is a Item1", "Here is a Item2", "Here is a Item3", "Here is a Item4&q 阅读全文

posted @ 2013-03-14 10:45 work hard work smart 阅读(436) 评论(0) 推荐(0) 编辑

摘要: Android 中SharedPreferences使用一、SharedPreferences使用1 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences mPerferences = PreferenceManager.getDefaultSharedPreferences(this); int counter = mPerferences... 阅读全文

posted @ 2013-03-14 10:16 work hard work smart 阅读(287) 评论(0) 推荐(0) 编辑

2013年3月13日

摘要: 声明:eoe文章著作权属于作者,受法律保护,转载时请务必以超链接形式附带如下信息原文作者: Android_Tutor原文地址: http://my.eoe.cn/androidtutor/archive/1327.html大家好我们这一节讲的是LayoutInflater的使用,在实际开发种LayoutInflater这个类还是非常有用的,它的作用类似于 findViewById()不同点是LayoutInflater是用来找layout下xml布局文件,并且实例化!而findViewById()是找具体xml下的具体 widget控件(如:Button,TextView等)。为了让大家容易 阅读全文

posted @ 2013-03-13 19:38 work hard work smart 阅读(251) 评论(0) 推荐(0) 编辑

上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 58 下一页