Code example for SparseArray

Methods: put

0
{ 
	private WebView web;
	 
	private final SparseArray<String> senses;
	{ 
		senses = new SparseArray<String>();
		senses.put(Sensor.TYPE_ROTATION_VECTOR, "rotate");
		senses.put(Sensor.TYPE_ACCELEROMETER, "accel");
		senses.put(Sensor.TYPE_LIGHT, "light");
	} 
	 
	protected void onCreate(Bundle savedInstanceState)
	{ 
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		 
		web = (WebView) findViewById(R.id.web);
	} 
	 
	@SuppressLint("SetJavaScriptEnabled") 
	public void onResume()