我今天已经为此寻找了一个芒果.这看起来很容易,但我从来没有让它工作.我想用光标填充微调器.我一直在尝试使用SimpleCursorAdapter,因为很多网站都说我会,但我从来没有让它工作.告诉我它是多么容易:)
谢谢你的时间!
我的光标
Cursor cursor = db.query(DATABASE_TABLE_Clients, new String[] {"_id", "C_Name"}, null, null, null, null, "C_Name");
Run Code Online (Sandbox Code Playgroud)
我的旋转器
(Spinner) findViewById(R.id.spnClients);
Run Code Online (Sandbox Code Playgroud)
我的守则
Cursor cursor_Names = SQLData.getClientNames();
startManagingCursor(cursor_Names);
String[] columns = new String[] { "C_Name" };
int[] to = new int[] { R.id.txt_Address };
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_dropdown_item, cursor_Names, columns, to);
Spinner spnClients = (Spinner) findViewById(R.id.spnClients);
spnClients.setAdapter(mAdapter);
Run Code Online (Sandbox Code Playgroud) 我一直在按照本指南加载我的菜单配置,我认为加载菜单是非常好的和干净的方式.
我的问题很简单,有没有办法以配置数组和某种工厂的方式加载ACL配置?
如果没有,我如何加载ACL配置并以简单的方式使用该菜单?
谢谢!
编辑:这是一个非常好的博客文章,关于为什么使用已经完成的模块而不是自己创建的模块,http://hounddog.github.com/blog/there-is-a-module-for-that/