2012-02-23 26 views

答えて

0

これは役に立ちますか?あなたがコントロールを使用して、

<TextView ... android:ellipsize="marquee" android:singleLine="true"/> 

に焦点を当てている間にテキストをスクロールしたい場合が見つかり、それがhere

<LinearLayout android:orientation="vertical"> 
<HorizontalScrollView> 
    <LinearLayout android:orientation="horizonal"> 
     <Image1 /> 
     <Image2 /> 
     <Image3 /> 
     <Image4 /> 
     <Image5 /> 
    </LinearLayout> 
</HorizontalScrollView> 
<LinearLayout android:orientation="horizonal"> 
    <Button1 android:layout_weight="1" /> 
    <Button2 android:layout_weight="1" /> 
    <Button3 android:layout_weight="1" /> 
    <Button4 android:layout_weight="1" /> 
</LinearLayout > 

+0

いいえ、私は私が読み違え、自動的TextViewにはああごめんなさい – MimmoG

+0

右から左に移動することにしたいです質問。 – Jon

0

そうしないと、この自分自身を実装する必要があります。

  1. タイマーを使う(またはハンドラ) TextViewにオフセットを設定します。
  2. this
  3. を盗んだそれとも私はあなたのテキストビューはMARQUEEにしたいと考えてい this
6

を試してみてください。もしそうなら、これは私がそれをした方法です:

XMLで。 TextViewのための次の属性を設定します。

android:singleLine="true" 
android:ellipsize="marquee" 
android:marqueeRepeatLimit="marquee_forever" 
android:focusable="false" 
android:scrollHorizontally="true" 

あなたのTextViewがRelativeLayout内にある場合、幅または高さが(すなわち、32dp)静的である必要があります。ダイナミックが必要な場合は、RelativeLayout内の別のビューにTextViewを配置します。

のonCreateで

()、あなたはTextViewには、選択行う必要があります。

myTextView.setSelected(true); 

Original Answer

関連する問題