Android------水平滚动
来源:互联网 发布:centos 安装apache2 编辑:程序博客网 时间:2024/04/29 11:43
1. main.xml
<RelativeLayout 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_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <HorizontalScrollView android:layout_height="wrap_content"android:layout_width="fill_parent"android:scrollbarAlwaysDrawHorizontalTrack="false"> <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </HorizontalScrollView></RelativeLayout>
2. Activity
package com.multiple.textview;import android.app.Activity;import android.os.Bundle;import android.view.Menu;import android.widget.TextView;public class MainActivity extends Activity{private TextView textView;@Overrideprotected void onCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.main);textView = (TextView)findViewById(R.id.text);textView.setText("111111111111111111111111111111111111111111111111111111111111111111111111111");}@Overridepublic boolean onCreateOptionsMenu(Menu menu){// Inflate the menu; this adds items to the action bar if it is present.getMenuInflater().inflate(R.menu.main, menu);return true;}}
3. 效果:
- Android 水平滚动
- android 水平滚动 HorizontalScrollView
- Android------水平滚动
- android textview 水平滚动
- android水平循环滚动控件
- Android ScrollView水平自动滚动
- android 水平滚动ScrollView: HorizontalScrollView
- Android滚动选择器——水平滚动
- android 水平(左右)滚动 HorizontalScrollView
- android组件TextView实现字体水平滚动
- android实现TextView垂直或水平滚动
- android 水平滚动条的使用
- Android 判断Webview 的水平滚动
- android 通过按钮控制水平滚动条
- Android组件TextView实现字体水平滚动
- android实现TextView垂直或水平滚动
- android实现TextView垂直或水平滚动
- Android中HorizontalScrollView添加水平滚动图片
- html如何加载图片
- js加密
- Buffalo WZR-HP-G300NH刷机记
- UIImageview 点击事件 UITapGestureRecognizer传值
- asp.net解决高并发的方案(转)
- Android------水平滚动
- socket通信解析
- Linux基础命令实践二
- poj 1465 (BFS+剪枝)
- Parameter index out of range (1 > number of parameters, which is 0)
- oracle的split函数
- Hadoop集群安装配置
- UIImage转换成nsdata
- C# 中的委托和事件