小编Rah*_*isi的帖子

无法锁定表面

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)

java android android-actionbar

7
推荐指数
0
解决办法
2421
查看次数

如何为Android shell构建可执行文件

有时我需要在我的设备上运行命令或脚本,但它们不可用或不存在.

我们可以向Android设备添加一些额外的命令shell,除了那些已经可用的命令吗?

例如,将screenrecord命令添加到我的设备(我的设备的AndroidAPI低于19),这是不可用的.

我知道如何获取设备上的可用命令列表 adb shell

adb shell ls /system/bin 
Run Code Online (Sandbox Code Playgroud)

但我想添加更多的自定义命令和脚本,做一些特殊的工作.

有什么办法吗?或者这不可能?

c shell executable android android-ndk

7
推荐指数
1
解决办法
7367
查看次数

标签 统计

android ×2

android-actionbar ×1

android-ndk ×1

c ×1

executable ×1

java ×1

shell ×1