
Android学习
readerQ
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
第七章,动态添加按钮<二>(Android)
这两个动态添加按钮demo, 主要是添加有边框的按钮。 这一个demo是通过设置按钮的margin来让按钮有边框, 这样就只能是白色的边框,不能像上个demo中可以设置颜色。 主布局:activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:too原创 2015-06-15 18:34:48 · 453 阅读 · 0 评论 -
第二章,动态添加按钮<一>(Android)
package com.example.demo05; import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.widget.LinearLayout; public class MainActivity extends Activity { p原创 2015-06-09 18:45:13 · 504 阅读 · 0 评论 -
第六章,GET网络请求demo(Android)
在 AndroidManifest.xml中添加网络权限 MainActivity package com.example.demo10; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.原创 2015-06-15 14:54:41 · 566 阅读 · 0 评论 -
第五章,AsyncTask和ProgressBar的练习(Android)
<LinearLayout 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_par原创 2015-06-12 17:06:35 · 955 阅读 · 0 评论 -
第四章,简单的水果机游戏(Android)
首先说明一点,这个例子有个致命bug,是写到后面才发现的,就是快速连续点“start”和“stop”按钮会出错,因为用的handler,所以会不断开启线程,后来也想了一些办法来补救,但是还是不能让自己满意。于是只能就此作罢。不过,其他地方都是还不错的。 主要用的知识点:1.handler。2.自定义按钮 三个按钮的布局: 在res下drawable文件夹(如没有这个文件夹,就新建)创建xml原创 2015-06-11 18:11:06 · 778 阅读 · 0 评论 -
第三章,设置按钮边框(Android)
这种方法是通过层叠几个图片实现边框效果。 在res文件夹下的drawable文件夹下(没有就新建)建一个xml文件选layer-list。 <!-- 与顺序有关,最外层一定要放在最前面,最里层放在里面, 不然会被遮挡,也与item中设置的值大小有关系 -->原创 2015-06-10 13:37:38 · 917 阅读 · 0 评论 -
第一章,listview的简易用法(Android)
这篇文章主要是练习了安卓listview的arrayadapter和baseadapter的简单填充。 1.arrayadapter填充 布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools原创 2015-06-09 15:56:22 · 491 阅读 · 0 评论 -
第十四章,通过Intent打开其他软件(Android)
activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layou原创 2015-06-23 18:45:36 · 533 阅读 · 0 评论 -
第十三章,隐式intent小demo(Android)
MainActivity.java package com.example.demo16; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener原创 2015-06-19 17:47:39 · 401 阅读 · 0 评论 -
第十二章,菜单小demo(Android)
在res文件夹下的menu文件夹如(没有则新建)中建main.xml <item android:id="@+id/item001" android:title="001"/> <item android:id="@+id/item002" android:title="002"/> MainA原创 2015-06-19 15:51:10 · 528 阅读 · 0 评论 -
第十一章,SharedPreferences存取(Android)
package com.example.sharedemo01; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android原创 2015-06-17 19:03:07 · 458 阅读 · 0 评论 -
第十章,PopupWindow简易demo(Android)
package com.example.popupwindowdemo01; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import原创 2015-06-17 11:15:30 · 605 阅读 · 0 评论 -
第八章,POST网络请求demo(Android)
在 AndroidManifest.xml中添加网络权限 activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_widt原创 2015-06-16 11:35:18 · 878 阅读 · 0 评论 -
第九章,WebView点击网页内链接跳转到其他Activity(Android)
在 AndroidManifest.xml中添加网络权限 activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="m原创 2015-06-16 16:49:22 · 1881 阅读 · 1 评论 -
第十五章,循环动画(Android)
package com.example.coco_demo02; import android.app.Activity; import android.os.Bundle; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widge原创 2015-07-27 15:49:34 · 631 阅读 · 0 评论