I do an android software, which used a spinner drop-down control.
Why do people use the spinner to the right is an inverted triangle
, And I was
In the end what is the problem? Hope this problem encountered friends, to the point tips.
java code is as follows:
package com.example.b;
import com.example.b.R;
import android.os.Bundle;
import android.app.Activity;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
public class MainActivity extends Activity {
private static final String [] mCountries = {"China1", "China2", "China3", "China4", "China5", "China6"};
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_main);
Spinner sp1 = (Spinner) findViewById (R.id.spinner1);
ArrayAdapter
ad.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
sp1.setAdapter (ad);
}
}
xml code is as follows:
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: paddingBottom = "@ dimen / activity_vertical_margin"
android: paddingLeft = "@ dimen / activity_horizontal_margin"
android: paddingRight = "@ dimen / activity_horizontal_margin"
android: paddingTop = "@ dimen / activity_vertical_margin"
tools: context = ". MainActivity">
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
style = "@ android: attr / spinnerDropDownItemStyle" />
ps: I know "style =" @ android: attr / spinnerDropDownItemStyle "/" is set spinner style, but, in my place, there are no words, style are unchanged.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
If someone else's style down 30 cents is not a system, then probably custom styles
Reply:
According to what you mean, I was not the first system to check the style spinner, ah,
Where the investigation ah?
Reply:
In style.xml, and did not indicate that the system default style. Not studied whether there are other systems styles.
You see someone pour 3 corner is where to look. Look what style it is used?
Reply:
Previous Spinner is this inverted triangle style. 4.0 will be replaced later this style of you.
Want ago that you can customize Spinner.
Reply:
Thank you upstairs reply, but I checked style.xml file, as follows,
No spinner style settings.
Fair to say that there is a triangular pattern, it should be the default style, but also add my own look? ?
<-!
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res / values-vXX / styles.xml on newer devices.
->
<-! Application theme -.>
Reply:
previous Spinner this is the inverted triangle style. 4.0 will be replaced later this style of you.
Want ago that you can customize Spinner.
Trouble you again, how to set the style now spinner ah.
XML Lane "style =" @ android: attr / spinnerDropDownItemStyle "" is so write it?
java in "ArrayAdapter
My code has ah
Reply:
System problems, usually custom
Reply:
style = "@ android: attr / spinnerDropDownItemStyle" defines the style pop up after you click on Spinner These options are.
android.R.layout.simple_spinner_item this Spinner is your style. You can try the system comes other styles .
Reply:
style = "@ android: attr / spinnerDropDownItemStyle" defines the style pop up after you click on Spinner these options are .
android.R.layout.simple_spinner_item this Spinner is your style. You can try the system comes other styles .
I have changed my previous "android.R.layout.select_dialog_singlechoice" But look becomes,
I still do not have the inverted triangle. .
Reply:
The landlord, do not tangle the system down 30 cents.
4.0 should be poured before the default is 3 corner style, this style changed after 4.0.
If the landlord have to fall 30 cents, they wrote.
See the source code to know, in fact, that is a textview come. Things that background image can not be complex.
You do not see someone is down 30 cents it? If someone else is also 4.0, certainly define yourself, you can pull with the use of his image.
Reply:
555555555555
I did not want to use textview to do, but I really do not ah,
JAVA scholarship a few days.
Reply:
555555555555
I did not want to use textview to do, but I really do not ah,
JAVA scholarship a few days.
Then you do not tangle this, the system comes, there comes the truth.
If you really could not stand. And so you learn to reconvert.
Been entangled in this, and other things of delay
Reply:
Inverted triangle is a 2.3 system that style before, behind that is the style of 4.0 out of system after system
Reply:
Support it. . . . .
Reply:
Why tangled system problems that issue after 2.3 previously inverted triangle is a triangle or to customize
No comments:
Post a Comment