首页 > 解决方案 > 如何通过 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();

                }
            });

标签: androidjson

解决方案


推荐阅读