Source:
<code>private void displayAccounts() { List<SiteModel> sites = mSiteStore.getVisibleSites(); ListView listView = (ListView) findViewById(android.R.id.list); ImageView iv = new ImageView(this); <START> iv.setBackgroundResource(R.drawable.list_divider); <END> listView.addFooterView(iv); listView.setVerticalFadingEdgeEnabled(false); listView.setVerticalScrollBarEnabled(true); if (sites.size() > 0) { ScrollView sv = new ScrollView(this); sv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); LinearLayout layout = new LinearLayout(this); layout.setPadding(10, 10, 10, 0); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); layout.setOrientation(LinearLayout.VERTICAL); blogNames = new String[sites.size()]; siteIds = new int[sites.size()]; accountUsers = new String[sites.size()]; blavatars = new String[sites.size()]; for (int i = 0; i < sites.size(); i++) { SiteModel site = sites.get(i); blogNames[i] = SiteUtils.getSiteNameOrHomeURL(site); accountUsers[i] = site.getUsername(); siteIds[i] = site.getId(); blavatars[i] = SiteUtils.getSiteIconUrl(site, 60); accountNames.add(i, blogNames[i]); } setListAdapter(new HomeListAdapter()); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View row, int position, long id) { AddQuickPressShortcutActivity.this.buildDialog(position); } }); if (sites.size() == 1) { AddQuickPressShortcutActivity.this.buildDialog(0); } } else { ActivityLauncher.showSignInForResult(AddQuickPressShortcutActivity.this); } }</code><technical_language>setImageDrawable instead</technical_language>

Target:
private void displayAccounts() { List<SiteModel> sites = mSiteStore.getVisibleSites(); ListView listView = (ListView) findViewById(android.R.id.list); View iv = new View(this); iv.setBackgroundResource(R.drawable.list_divider); listView.addFooterView(iv); listView.setVerticalFadingEdgeEnabled(false); listView.setVerticalScrollBarEnabled(true); if (sites.size() > 0) { ScrollView sv = new ScrollView(this); sv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); LinearLayout layout = new LinearLayout(this); layout.setPadding(10, 10, 10, 0); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); layout.setOrientation(LinearLayout.VERTICAL); blogNames = new String[sites.size()]; siteIds = new int[sites.size()]; accountUsers = new String[sites.size()]; blavatars = new String[sites.size()]; for (int i = 0; i < sites.size(); i++) { SiteModel site = sites.get(i); blogNames[i] = SiteUtils.getSiteNameOrHomeURL(site); accountUsers[i] = site.getUsername(); siteIds[i] = site.getId(); blavatars[i] = SiteUtils.getSiteIconUrl(site, 60); accountNames.add(i, blogNames[i]); } setListAdapter(new HomeListAdapter()); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View row, int position, long id) { AddQuickPressShortcutActivity.this.buildDialog(position); } }); if (sites.size() == 1) { AddQuickPressShortcutActivity.this.buildDialog(0); } } else { ActivityLauncher.showSignInForResult(AddQuickPressShortcutActivity.this); } }