帐篷在Android中 [英] marquee in Android

查看:118
本文介绍了帐篷在Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要选取框TextView的,但我没有得到成功的正确做到这一点。虽然我已经通过一些例子给出了计算器中,但仍然有问题。任何人可以帮助?

I want to marquee the textview but am not getting success to do it properly. Though i have gone through some examples give in stackoverflow, but still having problem. can anybody help?

推荐答案

有最低code创建一个劳斯莱斯 -

It is the minimum code to create a marque -

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

<TextView
    android:id="@+id/MarqueeText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:scrollHorizontally="true"
    android:singleLine="true"
    android:text="This is a very long text which is not fitting in the screen so it needs to be marqueed."
    android:textAppearance="?android:attr/textAppearanceLarge" />

为了使您更劳斯莱斯presentable鉴于这种:
http://yhisham.blogspot.in/2012 /08/android-how-to-make-marquee-ticker.html

To make your marque more presentable view this: http://yhisham.blogspot.in/2012/08/android-how-to-make-marquee-ticker.html

这篇关于帐篷在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆