android.support.v7.widget.ListViewCompat Java Examples

The following examples show how to use android.support.v7.widget.ListViewCompat. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FullScreenListPopupWindow.java    From fuckView with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
protected View onCreateView(final Context context) {
    listView = new ListViewCompat(context);
    listView.setBackgroundColor(Color.BLACK);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        listView.setAlpha(0.8f);
    }
    return listView;
}
 
Example #2
Source File: DonateActivity.java    From always-on-amoled with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.donation_activity);
    ArrayList<Item> items = getItemsList(this);
    if (items == null || items.isEmpty()) {
        Snackbar.make(findViewById(R.id.donation_list), getString(R.string.error_IAP), Snackbar.LENGTH_LONG).show();
        finish();
    } else {
        ((ListViewCompat) findViewById(R.id.donation_list)).setAdapter(new DonationAdapter(this, items));
    }
}