上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 68 下一页
WebView可以使得网页轻松的内嵌到app里,还可以直接跟js相互调用。webview有两个方法:setWebChromeClient 和 setWebClientsetWebClient:主要处理解析,渲染网页等浏览器做的事情setWebChromeClient:辅助WebView处理Javas... Read More
posted @ 2014-07-22 15:17 tinyphp Views(288344) Comments(11) Diggs(16)
Intent(意图)主要是解决Android应用的各项组件之间的通讯。小实例package com.example.testopen;import android.app.Activity;import android.content.Intent;import android.net.Uri;im... Read More
posted @ 2014-07-21 18:15 tinyphp Views(5548) Comments(0) Diggs(0)
在Web开发中,HTML提供了下拉列表的实现,就是使用元素实现一个下拉列表,在其中每个下拉列表项使用表示即可。这是在Web开发中一个必不可少的交互性组件,而在Android中的对应实现就是Spinner。方法一:以资源方式,静态展示 Spinner 选项:数据文件: 北京 ... Read More
posted @ 2014-07-21 17:57 tinyphp Views(181792) Comments(3) Diggs(4)
如果是列表(单列多行形式)的使用ListView,如果是多行多列网状形式的优先使用GridView。 GirdView的一些属性:android:numColumns="auto_fit" --------列数设置为自动android:columnWidth="90dp",----------... Read More
posted @ 2014-07-19 18:14 tinyphp Views(221089) Comments(3) Diggs(2)
本文目录监听ListView点击事件监听ListView滚动事件监听ListView点击事件使用监听器OnItemClickListenerpackage com.example.testsend;import android.app.Activity;import android.os.Bundl... Read More
posted @ 2014-07-17 17:31 tinyphp Views(9744) Comments(0) Diggs(0)
Listview是用来展示一些重复性的数据用的,比如一些列表集合数据展示到手机,需要适配器作为载体获取数据,最后将数据填充到布局。ListView里面的每个子项Item可以使一个字符串,也可以是一个组合控件。而适配器就是 Item数组,动态数组有多少元素就生成多少个Item;ArrayAdapter... Read More
posted @ 2014-07-16 14:41 tinyphp Views(21227) Comments(1) Diggs(0)
进入模拟器,Setting->apps ->找到相应的app,选择uninstall 即可! Read More
posted @ 2014-07-15 16:19 tinyphp Views(503) Comments(0) Diggs(0)
一个activity就好比一个网页,此文章讲解怎样创建一个activity并且实现跳转! 一、学习创建Activity 1、新建一个java类,右击src目录,选择new-->class,新的activity需要继承Activity类 2、需要复写onCreate() 例子: 3、配置到Androi Read More
posted @ 2014-07-15 12:11 tinyphp Views(80329) Comments(3) Diggs(1)
记录开发中常出现的错误1、遇到这样的错误时,应该立马想到是书写错误或语法错误,常见为android:name写成了nameAttribute is missing the Android namespace prefix2、解决:菜单:project->clean。Activity not star... Read More
posted @ 2014-07-14 16:56 tinyphp Views(545) Comments(0) Diggs(0)
创建工程的时候会出现appcompat_v7这个文件夹手贱删除后,发现出错了说明test项目是依赖于appcompat_v7包的,所以这个appcompat_v7包是不能被删除的。appcompat_v7包是一个能让2.1以上全使用上4.0版本的界面的支持库,建项目时直接把最小SDK选在Androi... Read More
posted @ 2014-07-14 16:06 tinyphp Views(792) Comments(0) Diggs(0)
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 68 下一页