2
private ViewSwitcher.ViewFactory mFactory = new ViewSwitcher.ViewFactory() {
@Override
public View makeView() {
TextView t = new TextView(getActivity());
t.setTextColor(nptrackcolor); //global int variable
t.setMaxLines(2);
t.setMinLines(2);
TextViewCompat.setTextAppearance(t,R.style.NowPlayingTextAppereance);
return t;
}
};
今天我試圖使用textswitcher更新現在在我的應用程序中使用淡入/淡出動畫播放標題。它切換文本,但不是顏色。我意識到setFactory只能調用一次。那麼是否有可能改變文字開關的顏色?文本切換器更新textview顏色