开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜