Questions tagged [textswitcher]
13 questions
7
votes
1 answer
Getting text from TextSwitcher
How can I get the text in textswitcher which is previously set. Just like textview.getText(). I have tried the following code but didn't work.
TextSwitcher textSwitcher = (TextSwitcher)findViewById(...);
TextView currentlyShownTextView = (TextView)…

ndn
- 127
- 1
- 12
3
votes
1 answer
Text Switcher update textview color
private ViewSwitcher.ViewFactory mFactory = new ViewSwitcher.ViewFactory() {
@Override
public View makeView() {
TextView t = new TextView(getActivity());
t.setTextColor(nptrackcolor); //global int variable
…

LutfiTekin
- 441
- 1
- 10
- 19
2
votes
2 answers
Remove margin while switching text using textswitcher
I'm using a TextSwitcher to animate the text changes. I'm using a slide up animation when the text is changed. However the text is not sliding up to the container. Have a look at the video posted below. The text is neither sliding in from the red…

div
- 1,475
- 3
- 22
- 32
1
vote
1 answer
Getting Null Error message TextSwitcher in RecycleView adapter
**I'm trying to implement a TextSwitcher in a recyclerView but every time I debug it return an error message : java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()'…

freeday same
- 43
- 7
1
vote
1 answer
TextSwitchers: reverse the animation
This is my textSwitcher code:

Simon
- 19,658
- 27
- 149
- 217
0
votes
1 answer
Add TextSwitcher Animation in RecyclerView using MVVM
I am building a very simple Shopping List app using Room and MVVM.
Objective: Animate the quantity textView in recycler according to the action, if increased the slide down, if decreased the slide up.
Problem: Do not know to handle the click event…

Waqas Younis
- 84
- 1
- 11
0
votes
1 answer
HorizontalScrollView keeps scrollable after clearing the text of the TextView
I've a HorizontalScrollView with a TextSwitcher as child, as shown below.

t.r.hogenkamp
- 73
- 2
- 7
0
votes
0 answers
How to make a TextView horizontally scrollable and always aligned to the right side?
I need a TextView that has the same functionality as, for example, the EditText that shows the equation/result in the Huawei Calculator, but without the need of a cursor, etc.
In this calculator, the equation starts from the right side. When…

t.r.hogenkamp
- 73
- 2
- 7
0
votes
1 answer
Android - create sliding up animation for textview similar to movie credits
I am using a w TextSwitcher's that looks like this:
activity_main.xml:

j2emanue
- 60,549
- 65
- 286
- 456
0
votes
0 answers
TextSwitcher flicker/stutter sometimes
I'm using a TextSwitcher to automatically switch text when certain broadcasts are received, and I add slide in / out animation for this TextSwitcher. But sometimes (like 30% of time) when the TextSwitcher switches from the textView before last one…

Zip
- 809
- 2
- 14
- 30
0
votes
3 answers
TextSwitcher not centered vertically with layout_gravity: center_vertical
I have a vertical LinearLayout with 2 TextSwitcher inside. Sometimes only the first one(@+id/ts1) will show, sometimes both of them will show on screen. The font size for ts1 is 20, for ts2 is 16.

Zip
- 809
- 2
- 14
- 30
0
votes
1 answer
Chaining animation of a TextSwitcher and an ImageSwitcher
I have an android studio project with a TextSwitcher and an ImageSwitcher objects already set up and work perfectly (simultaneously).
The thing is, I want the animation of the TextSwitcher preformed first, and the animation of the ImageSwitcher…

Ben Venezia
- 1
- 1
-1
votes
1 answer
TextSwitcherActivity, cannot resolve symbol
thank you.
I wanted to add a simple TextSwitcher to a fragment, it's all good (I think) till this line:
TextView t = new TextView (TextSwitcherActivity.this);
I am missing out why it cannot resolve the symbol: TextSwitcherActivity.
Please, if you…

Tomkat
- 3
- 3