`
Aina_hk55HK
  • 浏览: 388475 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论
文章列表
Android TabWidget/TabHost有两种使用方法: 第一种:使用系统自带写好的TabHost(及继承自TabActivity类)具体代码如下: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_he ...
TableLayout经常用的属性是:   1.android:collapseColumns:以第0行为序,隐藏指定的列:把android:collapseColumns=0,2 意思是把第0和第2列隐藏    2.android:shrinkColumns:以第0行为序,自动延伸指定的列填充可用部分:当LayoutRow里面的控件还没有布满布局时,shrinkColumns不起作用,设置了shrinkColumns=0,1,2,布局完全没有改变,因为LayoutRow里面还剩足够的空间。当LayoutRow布满控件时,设置了shrinkColumns=2,则控件自动向垂直方向填充空间   ...
1.将apk文件安装到Android设备(模拟器)上,操作步骤为:首先启动Android模拟器,然后打开命令行对话框,进入命令行模式。在命令行模式下进入Android SDK 安装目录下面的tools文件夹,输入adb install [-l] [-s] [-r] apk文件路径,这样便可以将apk文件安装到模拟器上面。(说明:[-l]:锁定应用程序,[-s]:将apk安装到SD卡上面,[-r]:重新安装) 2.卸载模拟器中的apk文件。操作步骤为:首先启动Android模拟器,然后打开命令行对话框,进入命令行模式。在命令行模式下进入Android SDK 安装目录下面的tools文件夹,输入 ...
安装完Android SDK后,默认会在C盘创建一个.Android的文件夹用来存放AVD.此时如果想修改AVD的路径,可以设置一个环境变量ANDROID_SDK_HOME=要设置的路径(比如:F:\Java\Android),重新启动Eclipse,修改成功!
Android ProgressDialog进度条对话框的使用: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height=& ...
Notification,NotificationManager状态栏提示的使用: 1.main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" and ...
SeekBar拖动条的使用: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent&q ...
ProgressBar进度条的使用: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_pare ...
ScrollView卷轴视图是指当拥有很多内容,一屏显示不完时,需要通过滚动跳来显示的视图.的使用: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ScrollView" android:layout_width="fill_parent" android:l ...
网格视图GridView的使用: package com.Aina.Android; import android.content.Context; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; public class ImageAdapter extends BaseAdapter { private Co ...
图片切换ImageSwitcher的使用: package com.Aina.Android; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageSwitcher; import android.widget.Ima ...
Gallery拖动效果的使用: <?xml version="1.0" encoding="utf-8"?> <Gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Gallery" android:layout_width="fill_parent" android:layout_height="wrap_content"> ...
Android中实现对话框可以使用AlertDialog.Builder类,还可以自定义对话框.如果对话框设置了按钮就需要对其设置事件监听OnClickListener. 下面将列出一个示例: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android ...
创建菜单选项有两种方法:    一.在xml文件中创建: 首先在工程的res目录下面创建一个menu的文件夹,然后在menu文件夹下面创建一个menu.xml文件,menu.xml里面的具体代码如下: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/about" an ...
1.首先配置main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent& ...
Global site tag (gtag.js) - Google Analytics