您好,我有一個開發我app..here都在我的mysql數據庫中更新了我的微調值..微調值動態變化取決於數據庫
爲如: ....在這裏,我要運行應用程序第一次總是隻顯示Q. ..我必須更新狀態Q後,我必須運行應用程序意味着自動顯示狀態C ....我怎麼能發展this.Why總是顯示Q .. 。我可以在這裏管理代碼。 這裏我使用了下面的代碼。
private void createSpinnerDropDown() {
//get reference to the spinner from the XML layout
Spinner spinner = (Spinner) findViewById(R.id.spinner1);
//Array list of animals to display in the spinner
List<String> list = new ArrayList<String>();
list.add("Q");
list.add("P");
list.add("F");
list.add("I");
list.add("C");
//create an ArrayAdaptar from the String Array
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, list);
//set the view for the Drop down list
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//set the ArrayAdapter to the spinner
spinner.setAdapter(adapter);
adapter.notifyDataSetChanged();
//attach the listener to the spinner
spinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
}
我該如何開發這個。
我不清楚你想保存選擇的項目到數據庫或想要顯示保存的項目在數據庫到微調? – Ishtiaq
我的數據庫的狀態是C意味着我想顯示我的微調也顯示C ...但在我的代碼Q只顯示在微調總是... –
在這裏我必須運行應用程序第一次總是顯示Q我的旋轉框..我必須更新狀態Q到C後,我必須運行應用程序意味着自動顯示狀態C ....我怎麼能發展this.Why總是顯示Q ...我如何管理代碼在這裏。 –