번들에 추가 한 일부 데이터를 검색하려고하는데 정상적인 방법으로 검색 할 수 없습니다. 작동번들에서 데이터를 다시 검색 할 수 없습니다.
내 현재 코드이 나에게 번들 값을 가져옵니다
Intent i = getIntent();
Bundle bundle = i.getExtras();
for (String key : bundle.keySet()) {
Object value = "start_color";
start_color = String.format("%s", key);
}
,하지만 난이
Intent i = getIntent();
Bundle bundle = i.getExtras();
if (bundle != null)
{
String value = bundle.getString("start_color");
}
같은 표준 코드를 사용하면 번들 값 내가 혼란 스러워요을 얻을 수 없습니다입니다 왜 이런 일이 일어나고 있는지 !! 왜 이런 일이 일어 났는지 말해 줄 수 있습니까?
이것은, 내가 번들
String rgbString = "R: " + Color.red(color) + " B: " + Color.blue(color) + " G: " + Color.green(color);
//Change activity send data
Intent device = new Intent(v.getContext(), Create_Preset.class);
device.putExtra(rgbString,"start_color");
startActivity(device);
overridePendingTransition(R.anim.left_in, R.anim.left_out);
심지어 번들이 값이있는 경우 그래서 그 궁금 REST API를 통해 변경된 코드를 사용하여 내 프리셋 테이블에 새 행을 추가로 값을 걸었습니다 코드입니다 네! 여기
내가 값을 참조 저장하고있는 데이터베이스의 선택이다start_color
및
end_color
사람들은 내가 번들에서 점점 오전 값입니다
Host: localhost Database: led Generation Time: Jan 17, 2015 at 04:37 PM Generated by: phpMyAdmin 4.2.7.1/MySQL 5.6.20 SQL query: SELECT * FROM `preset` WHERE 1 LIMIT 0, 25 ; Rows: 2 Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available. preset starttime_hour starttime_min endtime_hour endtime_min startColor endColor test 12 0 12 0 R: 159 B: 159 G: 159 R: 159 B: 159 G: 159 test2 12 0 12 0 R: 39 B: 122 G: 91 R: 39 B: 122 G: 91
번들에 값이 포함되어 있습니까? 번들에 값을 넣는 곳의 코드를 보여주세요. – Marcus
@Marcus 번들에 값이 어떻게 포함되어 있나요? 변경된 코드를 다른 곳으로 가져 오는 방법은 무엇입니까? –
키와 값을 반대로합니다. – corsair992