Code example for SparseArray

Methods: put

0
	 
	private SparseArray<String> mDtNames;
	 
	public ListAdapterDB2DeviceTypes(){ 
		 
		mDtNames = new SparseArray<String>();
		mDtNames.put(1, "TV ?");
		mDtNames.put(2, "Cablebox ?");
		mDtNames.put(3, "Tuner / Hifi ?");
		mDtNames.put(4, "BD Player ?");
		mDtNames.put(5, "? ?");
	} 
	 
	@Override 
	public int getCount() { 
		return 5; 
	} 
 
	@Override 
	public Object getItem(int position) {
Contextual code suggestions in your IDE  Get Codota for Java