【问题标题】:How to display Scrollbar in left side in ionic如何在离子的左侧显示滚动条
【发布时间】:2015-12-01 09:38:21
【问题描述】:

如何在 ionic 项目的 android 中将滚动条的位置更改为左侧以获得 rtl 支持?

【问题讨论】:

  • 你能展示一下到目前为止你做了什么代码吗?
  • 我也在寻找相同的。你知道如何在 ionic >=2 中显示滚动条

标签: android cordova scrollbar ionic


【解决方案1】:

ScrollView 文件中添加这个XML -

android:verticalScrollbarPosition="left"

您也可以动态执行此操作。在代码中调用 ScrollView 并添加这个 -

mView.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);

如果有任何问题,请提问。如果你喜欢这个答案,请标记为selected

【讨论】:

    【解决方案2】:
        In drawable :
           scrollbar_thumb.xml
    
         <?xml version="1.0" encoding="utf-8"?>
         <shape xmlns:android="http://schemas.android.com/apk/res/android">
         <gradient android:startColor="#3333FF" android:endColor="#8080FF"
         android:angle="0"/>
         <corners android:radius="6dp" />
         </shape>
    
          In your layout:
    
       <ScrollView
                android:id="@+id/scrolldes"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/viewId"
                android:layout_centerHorizontal="true"
                android:padding="8dp"
                android:scrollbarSize="12dip"
                android:verticalScrollbarPosition="left"
                android:scrollbarThumbVertical="@drawable/scrollbar_thumb" >
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-05
      • 2011-11-12
      • 2012-12-14
      • 1970-01-01
      • 2017-07-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多