Android, make scrollable view overflow to the left instead of right?

前端 未结 7 2017
孤独总比滥情好
孤独总比滥情好 2021-02-20 00:02

I was recommended using a parent view to get horizontal scrolling right in my TextView:



        
相关标签:
7条回答
  • 2021-02-20 00:36

    I have tested the code . So there are two ways to get around this problem First one with ScrollBars

    new Handler().postDelayed(new Runnable(){   
    @Override
    public void run() {
        HorizontalScrollView hsv = (HorizontalScrollView) findViewById(R.id.hsv1);
            hsv.scrollTo(hsv.getRight(), hsv.getTop());
        }       
    
    },100L);
    

    Second one is without scrollBars

     <TextView 
     android:ellipsize="start"   //add this line
     ...
     />
    
    0 讨论(0)
提交回复
热议问题