开发者

how to get the data from map by the key in android

开发者 https://www.devze.com 2023-03-11 04:14 出处:网络
i have a problem to retrieve the data from the map with key. here is my code. v is vector;s object that i get from another activity.

i have a problem to retrieve the data from the map with key. here is my code. v is vector;s object that i get from another activity. i got the value what i want with.... System.out.println("save in map********"+settingName); at the end but how i can the value one by one.

final Serializable v1 = getIntent().getSerializableExtra("v");

System.out.println("*****"+v1);
keyname = (EditText) findViewById(R.id.saveas);     
saveEdit = (Button)findViewById(R.id.savebtn);  

saveEdit.setOnClickListener(new OnClickListener() {     
    @Override
    public void onC开发者_如何学运维lick(View v) {
        // TODO Auto-generated method stub
        String keysetting = keyname.getText().toString();
        System.out.println(keysetting);
        settingName.put(keysetting, v1);                    
    }
});

thanks in advance


settingName.get(keyname.getText());
0

精彩评论

暂无评论...
验证码 换一张
取 消