0

여러 줄로 된 위젯을 만들려고하는데 자동 스크롤 (선택 윤곽)으로 설정하고 스크롤 속도를 조절할 수 있습니다. 이것을 어떻게 할 수 있습니까?Android App 위젯 - 조정 가능한 스크롤 속도로 두 개의 별도 라인에서 TextView 움직이는 텍스트를 만드는 방법?

TextView를 사용하여 한 줄로 스크롤 할 수 있었지만 그게 전부였습니다. 나는 그것의 속도를 조정하거나 동시에 두 줄을 스크롤하는 것처럼 보이지 않는다.

이의 예는 다음과 같습니다 https://play.google.com/store/apps/details?id=huntsman.stocktickertapelite&hl=en

또는

https://play.google.com/store/apps/details?id=com.cousinHub.widget

누군가가 그것을 어떻게의 아이디어가? (사용자 정의보기?)

감사합니다.

내가 지금까지 무엇을 가지고 : 나는의 setText 파일로 자바에서 텍스트를 얻고,

 <TextView 
      android:id="@+id/label" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@android:color/white" 
      android:textStyle="bold" 
      android:gravity="center" 
      android:textAppearance="?android:attr/textAppearanceSmall" 
      android:text="@string/app_name" 
      android:singleLine="true" 
      android:ellipsize="marquee" 
      android:marqueeRepeatLimit ="marquee_forever" 
      android:scrollHorizontally="true" 
      android:focusable="true" 
      android:focusableInTouchMode="true" 
      android:duplicateParentState="true" 
      android:layout_weight="1"> 
      <requestFocus 
       android:focusable="true" 
       android:focusableInTouchMode="true" 
       android:duplicateParentState="true" /> 
     </TextView> 

답변

0

이를 시도하고이 화면에 표시

<ScrollView 
      android:id="@+id/SCROLLER_ID" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
       android:layout_below="@+id/line_dotted" 
       android:layout_marginBottom="10dp" 
       android:fillViewport="true" 
       android:scrollbars="vertical" > 

       <TextView 
        android:id="@+id/text_description" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginBottom="10dp" 
        android:layout_marginLeft="15sp" 
        android:layout_marginRight="15sp" 
        android:layout_marginTop="10sp" 
        android:scrollbars="vertical" 
        android:textColor="#0A2A1B" 
        android:textSize="12sp" /> 
      </ScrollView> 

또는 당신이 시도 할 수 있습니다 scrollview없이 텍스트가 5 개 이상있을 때 스크롤합니다.

<EditText 
      android:id="@+id/Comments" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_above="@+id/Submitbtn" 
      android:layout_alignParentLeft="true" 
      android:layout_below="@+id/ratingBar" 
      android:layout_marginBottom="40dp" 
      android:ems="10" 
      android:gravity="left" 
      android:hint="Comments" 
      android:maxLines="5" 
      android:padding="20dp" 
      android:scrollbarStyle="outsideOverlay" 
      android:scrollbars="vertical" 
      android:imeOptions="actionDone" /> 
+0

앱 widg에서 scrollviews를 사용할 수 없다고 생각했습니다. et? – proview3r

+0

예 내 응용 프로그램에서 scrollview 있습니다. –

관련 문제