2016-09-28 19 views
0

私は電卓を作成します。私はいくつかのシンボルを画面の右側に置いています。画面のサイズが十分でない場合、左側のシンボルが消え、Horizo​​ntalScrollViewは右側にスペースを追加します。Horizo​​ntalScrollViewでスクロールの方向を右から左に変更するには

enter image description here

enter image description here

どのように私は左から右へ、フォームのスクロールdirectonを変更できますか? API 17の後

<ScrollView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:id="@+id/top_scr_v" 
     android:layout_marginTop="@dimen/standard_view_margin"> 

     <HorizontalScrollView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/top_scr_hor_sc_v" 
      > 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="end" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:id="@+id/resultValue" 
       android:textColor="@color/mainColor" 
       android:textSize="@dimen/display_text_size" 
       /> 
     </HorizontalScrollView> 

    </ScrollView> 

答えて

1

あなたはandroid:supportsRtl="true"前に、android:layoutDirection="rtl"を使用することができます。

関連する問題