Code example for RemoteViews

Methods: setTextViewText

0
 
 
    private void setLine(final RemoteViews views, final ArrayList<String> headlines, final int id, final int num) {
        if (num < headlines.size()) {
            final String headline = headlines.get(num);
            views.setTextViewText(id, headline);
        } 
        else { 
            views.setTextViewText(id, "");
        } 
    } 
 
 
    @Override 
    public void onDeleted(Context context, int[] appWidgetIds) {
        super.onDeleted(context, appWidgetIds);
    } 
}