You great God, torment me this question a day, seeking Weapon!
As follows:
I added a Spinner control
in ViewFlow (an open source framework for page scrolling, similar Viewpage)
spnSYDK = (Spinner) findViewById (R.id.spn_test1);
ArrayAdapteradapter = new ArrayAdapter (this, android.R.layout.simple_spinner_item, strChannelNumber);
adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
spnSYDK.setAdapter (adapter);
spnSYDK.setOnItemSelectedListener (new Spinner.OnItemSelectedListener () {
public void onItemSelected (AdapterView arg0, View arg1, int arg2, long arg3) {
/ / TODO Auto-generated method stub
/ * The value of the selected mySpinner into myTextView in * /
Log.d ("test", "onItemSelected arg2 =" + arg2);
}
public void onNothingSelected (AdapterView arg0) {
/ / TODO Auto-generated method stub
Log.d ("test", "onNothingSelected");
}
});
But no matter what I choose Spinner inside a onItemSelected event is not triggered, it can not achieve the selection function The page layout is as follows
xmlns: android = "http://schemas.android.com/apk/res/android"
android: layout_height = "fill_parent"
android: descendantFocusability = "blocksDescendants"
android: layout_width = "fill_parent" android: orientation = "vertical" android: weightSum = "1">android: layout_width = "fill_parent"
android: id = "@ + id/spn_test1" />
There used ViewFlow and inside used to recruit students supporting Spinner's next, I am currently suspected ViewFlow the event intercepted. . . It is not a must abandon ViewFlow
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
android: descendantFocusability = "blocksDescendants" plus without no relationship
Reply:
Inheritance ViewFlow of setOnItemSelectedListener, where print log, give it a try.
Reply:
It was also raised on github this problem .
Reply:
hey. . . There is no proper reply
Reply:
Reply:
Nobody encountered this problem?
Reply:
A change in thinking. . . . . .

No comments:
Post a Comment