Here you can find the source of provideNavigationAdapter( Activity activity, String[] items)
Parameter | Description |
---|---|
activity | a parameter |
items | a parameter |
public static ArrayAdapter<String> provideNavigationAdapter( Activity activity, String[] items)
//package com.java2s; import android.app.ActionBar; import android.app.Activity; import android.widget.ArrayAdapter; public class Main { /**/*from www . j a v a 2s . c o m*/ * Prepares a correctly colored ArrayAdapter for a given theme * * @param activity * @param items */ public static ArrayAdapter<String> provideNavigationAdapter( Activity activity, String[] items) { ActionBar actionBar = activity.getActionBar(); if (actionBar != null) { return new ArrayAdapter<String>( actionBar.getThemedContext() != null ? actionBar.getThemedContext() : activity, android.R.layout.simple_list_item_1, items); } return null; } }