android传感器
view:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_he...
分类:
移动开发 时间:
2015-04-26 15:19:29
阅读次数:
160
view:
<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_...
分类:
其他好文 时间:
2015-04-26 09:33:14
阅读次数:
155
布局文件layout背景色里:
<LinearLayout
android:layout_width="130dp"
android:layout_height="104dp"
android:background="@drawable/bg_frame"
android:orientation="vertical">
drawable/bg_frame.xml内容如下
<?xmlversion="1.0"encoding="UTF-8"?>
<laye..
分类:
移动开发 时间:
2015-04-24 16:45:31
阅读次数:
519
这两天被一个奇怪的bug弄得很烦恼
症状是这样的:在listview下方有一个edittext,在edittext中输入字符的时候listview会重新读取数据,使得app运行非常慢
在代码里getview只在加载的时候调用,按道理不应该在这时候被调用的
查了很久代码,终于找到问题了!!(de别人的bug真是悲催)
这是一个方向垂直的linearlayout...
分类:
其他好文 时间:
2015-04-24 09:22:43
阅读次数:
131
android 采用ScrollView布局时出现异常:ScrollView can host only one direct?child。 主要是ScrollView内部只能有一个子元素,即不能并列两个子元素,所以需要把所有的子元素放到一个LinearLayout内部或Relat...
分类:
其他好文 时间:
2015-04-23 18:04:45
阅读次数:
131
直接上demo,用法都在程序的注释里了,首先上五渣效果图,
布局代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_...
分类:
移动开发 时间:
2015-04-23 09:43:13
阅读次数:
231
RatingBar是我们在做项目时常用到的一个控件View,用来表示评价的指数。是五角星样式的,但自带的样式有时候在我们项目中显示不协调,我们就要自定义RatingBar的显示样式。
先还是在布局页面中写上控件:
android:id="@+id/my_need_evaluate_linearlayout_top"
android:layout_w...
分类:
其他好文 时间:
2015-04-22 15:16:10
阅读次数:
190
Android UI工具包提供了一些布局管理器,它们使用起来相当容易,而且,大多数的时候,你只需要使用它们最基本的特征来实现UI。执着于基本特征的使用对于创建UI来说,往往不是最高效的。一个常见的例子就是滥用LinearLayout,它将会导致View树中的View数量激增。View——更糟的是,布...
分类:
其他好文 时间:
2015-04-22 00:17:43
阅读次数:
130
在做界面布局的时候,我们经常用到的就是LinearLayout,但是有时候用起来也不方便,比如我们在页面中要把一个Button放在屏幕底部,此时我们设置android:layout_gravity="bottom"是没有效果的。为什么呢?对于
LinearLayout:
当 android:orientation="vertical" 时, 只有水平方向的设置才起作用,垂直方向的设置不...
分类:
移动开发 时间:
2015-04-21 11:10:47
阅读次数:
153