Create textview scroll vertical with media player - android

I have a media player to play mp3 file and a text view show content of song mp3.
Now i want text view can scroll vertical when mp3 run. How I can do it?

Just set the
android:maxLines = "AN_INTEGER"
android:scrollbars = "vertical"
properties of your TextView in your layout's xml file.
Then use:
yourTextView.setMovementMethod(new ScrollingMovementMethod());
for more detail and reference visit this : Making TextView scrollable on Android
Hope this will help you.

Related

auto scroll in scrollview with speed

I want to auto-scroll lyrics on my app using ScrollView with speed control button. I have tried to animate the scrolling, but it didn't work.
For normal scrolling just set the
android:maxLines = "AN_INTEGER"
android:scrollbars = "vertical"
properties of your TextView in your layout's xml file.
Then use:
yourTextView.setMovementMethod(new ScrollingMovementMethod());
in your code.

Android Vertical Textview Marquee Widget

I want to know if it's possible to create TextView marque verticaly in Android widget. i already try with horizontal but i want my textview marquee by verticaly.
Already googling for several hour but not find something usefull i can use..
Any suggestion ?
Try this one-->
Add these tags inside your <TextView>
android:ems = "1"
android:multipleLine = true

How do i design scrollable text view in layout?

I'm not getting this "Scrollable Text View" part.. It messes up..
You don't need to use a ScrollView actually.
Just set the
android:maxLines = "a number"
android:scrollbars = "vertical"
properties of your TextView in your layout's xml file.
Then use:
yourTextView.setMovementMethod(new ScrollingMovementMethod())
in your code.
it will scrolls automatically.

How to give scroll view on TextView using java for android

Hi my code can any any one tell me how to scroll text in textview for android.
physical = new TextView(this);
positionView.setTextView(getResources().getString(R.string.textviewp), 0,"Physical", physical, ImageType.TEXT_VIEW_GOAL);
physical.setId(R.id.physical);
physical.setTextColor(Color.BLACK);
physical.setTextSize(18);
physical.setTypeface(fonts);
physical.setBackgroundColor(Color.parseColor("#FFFFFF"));
physical.setOnClickListener(onClickListener);
physical.setOnLongClickListener(OnLongClickListener);
ScrollGoalRelativeLayout.addView(physical);
set the android:maxLines and android:scrollbars = "vertical" properties of textview in xml file in layout.
After that use the TexView.setMovementMethod(new ScrollingMovementMethod()) in your code.

How to set focus to Textview in HorizontalScrollView?

I have a dynamic array of Textview in HorizontalScrollView.
Now i want to set focus to particular Textview
How can i do this?
You can use this Code for Focus
textview[i].requestFocus();

Categories

Resources