I spent hours trying and googling. I have looked at other posts and nothing worked. I do have tv.setSelected(true); in my code
`
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.bottom, container, false);
TextView tv = (TextView)v.findViewById(R.id.tv);
tv.setText(R.string.very_long);
tv.setSelected(true);
return v;
}
`
this is my textView
<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:scrollHorizontally="true"
android:singleLine="true"
android:textSize="30sp" />
place [tv.setSelected(true);] below to setContentView(R.layout.activity_main);
in xml