我ActionBar
在我的应用程序中添加了一个,现在我一直遇到这个问题.
我正在测试一个Galaxy S4
.此问题导致应用程序变慢并变得无法响应.
这是我的代码:
//Get action bar
actionBar = getActionBar();
//hide title to make room for spinner dropdown
actionBar.setDisplayShowTitleEnabled(false);
//set the mode
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
//spinner = (Spinner)findViewById(R.id.spinner);
quotetext = (TextView)findViewById(R.id.quote);
ArrayList<SpinnerItem> values = SpinnerProducer.create();
//Set spinner adapter
spinnerAdapter = new QuoteSpinnerAdapter(thisActivity,R.layout.spinner_row_layout,values);
actionBar.setListNavigationCallbacks(spinnerAdapter, new CustomOnItemSelectedListener());
actionBar.setSelectedNavigationItem(1);
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
08-11 18:59:51.776: E/Surface(17050): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -2147483646
08-11 18:59:51.776: E/Surface(17050): dequeueBuffer failed (Unknown error 2147483646)
08-11 18:59:51.776: E/ViewRootImpl(17050): Could not lock surface
08-11 18:59:51.776: E/ViewRootImpl(17050): java.lang.IllegalArgumentException
08-11 18:59:51.776: E/ViewRootImpl(17050): at android.view.Surface.nativeLockCanvas(Native …
Run Code Online (Sandbox Code Playgroud) 有时我需要在我的设备上运行命令或脚本,但它们不可用或不存在.
我们可以向Android
设备添加一些额外的命令shell
,除了那些已经可用的命令吗?
例如,将screenrecord
命令添加到我的设备(我的设备的Android
API低于19),这是不可用的.
我知道如何获取设备上的可用命令列表 adb shell
adb shell ls /system/bin
Run Code Online (Sandbox Code Playgroud)
但我想添加更多的自定义命令和脚本,做一些特殊的工作.
有什么办法吗?或者这不可能?