android - 如何通过 id 更改搜索位置?
问题描述
我有两个微调器,第二个是与第一个与位置链接的列表视图,当您单击与位置链接的项目时显示简历的列表视图,我想替换它将与 id 链接,怎么能我请
这是我的代码微调器
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int
position, long id) {
if(arrayListTache.size() > position)
{
spinner_tache.setSelection(position);
pos = position;
valueInteger = arrayListInteger.get(position);
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
我的代码 onclick 列表视图
SubjectListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> parent, View view, int
pos, long id) {
String selectedItem =
parent.getItemAtPosition(pos).toString();
Intent intent = new
Intent(getApplicationContext(),Main2Activity.class);
intent.putExtra("Position" , String.valueOf(id));
startActivity(intent);
// insert();
}
});
解决方案
推荐阅读
- javascript - 如何将 Base64 编码图像传递到 WCF REST 端点
- vba - 如何将通配符添加到组合框选定的值以扩大以多项形式返回的值
- python - Python方法尝试另一种任意方法,直到它运行没有错误?
- r - 如何将数据框转换为镶木地板文件并上传到 R 中的 Azure Blob 存储?任何工作示例?
- javascript - 如何获取 Javascript Sets/Maps 来测试对象/数组是否相等?
- java - Web 机器人中的框架操作 xPath 定位器问题
- algorithm - 背景减法的高斯混合模型
- mysql - 更改 MySQL 存储过程以获取标题而不是 ID
- spring-mvc - 如何处理 Spring Rest API 上的内部服务器错误(500)以自定义消息?
- mysql - 如何仅在某些情况下应用 UNION (MySQL)