【问题标题】:Animate vertical scrolling of text within TextView在 TextView 中动画垂直滚动文本
【发布时间】:2014-01-06 13:41:22
【问题描述】:

我正在开发一个 android 应用程序,该应用程序需要自动动画显示在多行 TextView 中显示的文本的垂直滚动。 我的要求是 Activity 首先在我的 TextView 中显示文本,然后在短暂的暂停(例如 1 - 2 秒)之后,文本开始垂直滚动,无需用户干预。 我唯一的选择是在后台线程中调用“public void scrollBy (int x, int y)”吗?

【问题讨论】:

    标签: android animation textview vertical-scrolling


    【解决方案1】:

    在 onStart() 方法中尝试这段代码

        Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
    
            @Override
            public void run() {
                // TODO Auto-generated method stub
            // here put editext scroll code and i have set 5 seconds 
            }
        }, 5000);
    

    【讨论】:

    • 感谢您的宝贵时间,我还不能测试,我会及时通知您我的发现
    猜你喜欢
    • 1970-01-01
    • 2019-02-09
    • 2013-01-04
    • 2020-08-17
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    • 2014-04-01
    • 1970-01-01
    相关资源
    最近更新 更多