I've implemented this into my project, but it doesn't seem to work. Can you tell me what am I doing wrong? see code below...
final TickerView tickerView = (TickerView) findViewById(R.id.tickerView); tickerView.setCharacterList(TickerUtils.getDefaultNumberList()); String[] ticker_content = {"Lorem ipsum dolor sit amet", "Lorem ipsum dolor sit amet", "Lorem ipsum dolor sit amet"}; int idx = new Random().nextInt(ticker_content.length); tickerView.setText(ticker_content[idx]);
You are using setDefaultNumberList which only animates numbers, but your content is normal strings. See TickerUtils on other types of character lists or create your own.
I've implemented this into my project, but it doesn't seem to work. Can you tell me what am I doing wrong? see code below...
final TickerView tickerView = (TickerView) findViewById(R.id.tickerView); tickerView.setCharacterList(TickerUtils.getDefaultNumberList()); String[] ticker_content = {"Lorem ipsum dolor sit amet", "Lorem ipsum dolor sit amet", "Lorem ipsum dolor sit amet"}; int idx = new Random().nextInt(ticker_content.length); tickerView.setText(ticker_content[idx]);
PS: I've added the .xml view and gradle lib