Android gallery里显示文字
来源:互联网 发布:辽宁省人工智能学会 编辑:程序博客网 时间:2024/05/22 01:56
有时候想 向左向右设置文字的变化 不妨试试gallery
- "demo.xml"
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/widget44"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:gravity="center_horizontal">
- <TextView
- android:id="@+id/txt1_gvi"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#051b4d"
- android:gravity="center_horizontal"
- android:textColorHighlight="#656565"
- android:textSize="10sp">
- </TextView>
- </LinearLayout>
- public Activity activity;
- private static LayoutInflater inflater=null;
- private String [] stringid=new String[]{"Index-Nifty","Positional calls","Intraday calls","InvestmentIdea","Optional calls","BTST-STBT calls"};
- public TabGallary(Activity a) {
- activity = a;
- inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- }
- public int getCount(){
- return stringid.length;
- }
- public Object getItem(int position) {
- return position;
- }
- public long getItemId(int position) {
- return position;
- }
- public View getView(int position, View convertView, ViewGroup parent)
- {
- View v;
- if (convertView == null)
- {
- LayoutInflater li = getLayoutInflater();
- v = li.inflate(R.layout.demo, null);
- TextView tv1 = (TextView)v.findViewById(R.id.txt1_gvi);
- tv1.setText(stringid[position]);
- v.setOnClickListener(new OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- // Call intent or perform ur activity;
- }
- });
- }
- else
- {
- v= convertView;
- }
- return v;
- }
- Android gallery里显示文字
- Android 实现显示文字的Gallery
- Android Gallery图片显示和文字提示及Menu 菜单
- android Gallery(Gallery图片下面有文字)
- Android里TextView中显示不下的文字转而显示省略号
- Android Gallery组件实现循环显示图像
- android 图片水平显示,类Gallery效果
- Android 图片水平显示 类Gallery效果
- android Gallery可循环显示图片
- Android Gallery组件实现循环显示图像
- Android中Gallery来显示图片
- Android Gallery组件实现循环显示图像
- Android Gallery组件实现循环显示图像
- Android Gallery组件实现循环显示图像
- Android Gallery组件实现循环显示图像
- Android Gallery组件实现循环显示图像
- Android Gallery组件实现循环显示图像
- Android竖排显示文字
- 如何学习linux
- 数据库的连接-各个数据库的连接方式
- Linux软件安装方法---含有源代码的压缩包
- HDU2134:Cuts the cake
- 使用uploadify组件在struts2中实现上传
- Android gallery里显示文字
- android资料
- Backup
- Android UI ---星度条RatingBar
- 《多线程服务器的适用场合》例释与答疑
- 【分词】正向最大匹配中文分词算法
- dp,px,pt,sp 的区别 以及dp 和 px 互转
- C# Excel ColorIndex 对应列表
- (转)关于个别前任课教师对广州传智造谣攻击的声明