1 package com.intel.realsense.camera;
3 import android.os.Bundle;
4 import androidx.appcompat.app.AppCompatActivity;
5 import android.util.Log;
6 import android.widget.ArrayAdapter;
7 import android.widget.ListView;
8 import android.widget.TextView;
16 import java.util.TreeMap;
19 private static final String TAG =
"librs camera info";
22 protected void onCreate(Bundle savedInstanceState) {
23 super.onCreate(savedInstanceState);
24 setContentView(
R.layout.activity_list_view);
31 TextView
message = findViewById(
R.id.list_view_title);
33 Map<CameraInfo,String> infoMap =
new TreeMap<>();
37 if(
devices.getDeviceCount() == 0){
40 message.setText(
"Device info:");
44 Log.e(TAG,
"failed to create device");
48 if(
device.supportsInfo(ci))
49 infoMap.put(ci,
device.getInfo(ci));
56 for(Map.Entry
e : infoMap.entrySet()){
57 info[i++] =
e.getKey().toString() +
": " +
e.getValue();
60 final ListView listview = findViewById(
R.id.list_view);
62 final ArrayAdapter adapter =
new ArrayAdapter<>(
this,
R.layout.files_list_view,
info);
63 listview.setAdapter(adapter);
GLenum GLuint GLenum GLsizei const GLchar * message
::rosgraph_msgs::Log_< std::allocator< void > > Log
uvc_xu_option< int > super
::std_msgs::String_< std::allocator< void > > String
def info(name, value, persistent=False)
void onCreate(Bundle savedInstanceState)