
android控件
justwyy
这个作者很懒,什么都没留下…
展开
-
textview 小结
1、android:ems ——设置为n个汉字的宽度。 textview的宽度设了wrap_content 2、跑马灯效果: android:focusable="true" android:focusableInTouchMode="true" android:singleLine="true" android:ellipsize="ma...原创 2012-01-11 12:10:56 · 90 阅读 · 0 评论 -
search搜索框
转载: 动态修改android内置搜索对话框(浮动搜索)的Icon http://blog.youkuaiyun.com/wanglong0537/article/details/6342231 http://www.cnblogs.com/flysnow-z/archive/2011/06/22/2087319.html...原创 2012-07-05 12:50:12 · 115 阅读 · 0 评论 -
旋转对话框
<ProgressBar android:layout_width="wrap_content" android:interpolator="@android:anim/linear_interpolator" style="@style/ProgressBar" android:layout_height="wrap...原创 2012-03-12 17:15:46 · 162 阅读 · 0 评论 -
viewpager
Android ViewPager多页面滑动切换以及动画效果 转载: http://www.cnblogs.com/dwinter/archive/2012/02/27/2369590.html ViewPager和TabHost结合 转载: http://www.189works.com/article-49096-1.html 解决子界面滑动拦截的问题: http:...原创 2012-07-23 14:28:19 · 84 阅读 · 0 评论 -
dialog全屏的问题
自定义的dialog没有全屏的解决办法: AlertDialog dlg = new AlertDialog.Builder(this) .setView(textEntryView,0,0,0,0) 或者 <?xml version="1.0" encoding="utf-8"?> <resources> <sty...原创 2012-11-02 15:43:15 · 139 阅读 · 0 评论 -
ListView 中的TextView实现跑马灯效果
转载:http://blog.youkuaiyun.com/sky181772733/article/details/7003125# 案例:怎么样在一个ListView中含有TextView的item中实现字母滚动呢。这个在一些特定的场合经常用得到。如下图,当焦点位于某个item的时候其内容就自动滚动显示 要实现这样的效果,废话不多说直接上代码: adapter对应的layout 对应的lis...原创 2012-04-16 12:44:21 · 156 阅读 · 0 评论 -
ScrollView反弹效果的实现
转载:http://www.eoeandroid.com/thread-100933-1-1.html View中也有scrollBy和scrollTo这两个方法,但是ScrollView对scrollTo进行重写 由于:public void scrollBy(int x, int y) { scrollTo(mScrollX + x, mScrollY ...原创 2012-08-22 11:39:20 · 109 阅读 · 0 评论 -
ScrollView中的组件设置android:layout_height=fill_parent不起作用的解决办法
ScrollView中的组件设置android:layout_height=fill_parent不起作用的解决办法摘自IT者安全网(www.itzhe.org) 原文:http://www.itzhe.org/system/others/201208/94428.html ScrollView里面放了FrameLayout, 现在发现FrameLayout高度无法FILL。 ...原创 2012-08-31 11:01:23 · 131 阅读 · 0 评论 -
设置Scrollview滚动位置
appViewContent.post(new Runnable() { @Override public void run() { appViewContent.scrollTo(70, 0); } });原创 2012-09-03 09:51:56 · 539 阅读 · 0 评论 -
ListView的右边滚动滑块
ListView的右边滚动滑块: XML布局只需要在ListView节点加入: android:fastScrollEnabled="true" 代码中: listView.setFastScrollEnabled(true); 设置监听: listView.setOnScrollListener(new OnScrollListener() { ...原创 2012-09-03 18:09:22 · 178 阅读 · 0 评论 -
expandlistview
expandlistview的DEMO,来自网络。 for (int i = 0; i < 5; i++) { Map<String, String> curGroupMap = new HashMap<String, String>(); groupData.add(curGroupMap); curGroupMap.put(G_TE...原创 2012-04-22 17:03:54 · 126 阅读 · 0 评论 -
Android 对话框中的进度条 ProgressDialog
package com.yarin.android.TestOnPDialog; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.Bundle; import android.view....原创 2012-04-22 22:35:22 · 91 阅读 · 0 评论 -
定时器
定时器: http://www.cnblogs.com/jqyp/archive/2011/06/14/2080543.html原创 2012-02-27 10:00:13 · 63 阅读 · 0 评论 -
仿iphone滑动开关按钮实现
转载: http://www.apkbus.com/forum.php?mod=viewthread&tid=55593 http://www.eoeandroid.com/thread-156595-1-1.html http://2660311.blog.51cto.com/2650311/600521原创 2012-06-25 15:24:51 · 358 阅读 · 0 评论 -
relativelayout
// 相对于给定ID控件 android:layout_above 将该控件的底部置于给定ID的控件之上; android:layout_below 将该控件的底部置于给定ID的控件之下; android:layout_toLeftOf 将该控件的右边缘与给定ID的控件左边缘对齐; android:layout_toRightOf 将该控件的左边缘与给定ID的控件右...原创 2012-05-21 11:38:11 · 83 阅读 · 0 评论 -
edittext
EditText继承关系:View-->TextView-->EditText。 EditText的属性很多,这里介绍常用的几个: android:layout_gravity="center_vertical" 设置控件显示的位置:默认top,这里居中显示,还有bottom android:hint="请输入数字!" 设置显示在空间上的提示信息 android...原创 2012-05-21 11:40:53 · 81 阅读 · 0 评论 -
edittext判断输入字符长度
转载: http://blog.youkuaiyun.com/liujianminghero/article/details/7092236 Android 中的EditText最大可输入字符数可以通过xml文件中为EditText设置maxLength属性或者在代码中为EditText设置LengthFilter来设置。 例如要设置EditText只能输入10个字符 xml中: ...原创 2012-05-29 10:00:06 · 551 阅读 · 0 评论 -
listview的item点击无反应
用于处理在listview中加入某些控件后,控件和Listview只能有一个被点击的情况。 android:descendantFocusability 这个属性加在item里面: android:descendantFocusability="blocksDescendants"...原创 2012-06-04 13:56:48 · 127 阅读 · 0 评论 -
多级树形菜单的实现_expandlist
多级树形菜单的实现_expandlist http://blog.youkuaiyun.com/hellogv/article/details/6120133原创 2012-10-17 17:17:39 · 160 阅读 · 0 评论 -
纵向GALERY
纵向GALERY收藏:原创 2012-06-07 16:11:26 · 85 阅读 · 0 评论 -
控件宽高
imageView = (ImageView)findViewById(R.id.imageView1); //-----------------------------------------------方法三 ViewTreeObserver vto2 = imageView.getViewTreeObserver(); ...原创 2012-10-18 11:38:03 · 104 阅读 · 0 评论 -
Android中计算textView长度问题
http://zilla.blog.51cto.com/3095640/984775 1.TextView的宽度由屏幕总宽度- 额外宽度 得到。然后乘以2得到TextView可以显示的内容的宽度。 2.使用工具方法TextUtils.ellipsize方法,将1中计算的长度传入,得到TextView中可以显示的文本的内容。 3.将2中得到的文本set到TextView中。 ...原创 2012-10-18 17:54:45 · 644 阅读 · 0 评论 -
viewpager Android实现导航菜单左右滑动效果
http://blog.youkuaiyun.com/xiedantibu/article/details/7591996 http://blog.youkuaiyun.com/aiai373824745/article/details/7619054 <!--end: blogStats --><!--end: navigator 博客导航栏 --><!--done--&g...原创 2012-06-19 16:02:12 · 165 阅读 · 0 评论 -
能够兼容ViewPager的ScrollView
转载:http://www.strongcms.net/mobile/android/2012/0619/7272_7.html 能够兼容ViewPager的ScrollView ScrollView嵌套ViewPager冲突的解决办法: /** * 能够兼容ViewPager的ScrollView * @Description: 解决了ViewPager在Scro...原创 2012-06-25 13:03:07 · 145 阅读 · 0 评论 -
android仿iphone滚轮效果实现
转载:android仿iphone滚轮效果实现 http://blog.youkuaiyun.com/aomandeshangxiao/article/details/7397697原创 2012-06-25 15:19:10 · 193 阅读 · 0 评论 -
适应多行长文本的Android TextView
适应多行长文本的Android TextView http://blog.youkuaiyun.com/hellogv/article/details/7562315原创 2012-09-18 21:14:30 · 84 阅读 · 0 评论