spinner

Simple Android two spinner and submit example

て烟熏妆下的殇ゞ 提交于 2020-01-06 22:44:46
问题 Very new to Android development. I have been referencing this StackOverflow thread: Android: two Spinner onItemSelected(), but thus far have been running into issues with trying to build a simple program with two spinners and a submit button. The simple program I am trying to develop captures whatever is selected in both Spinners and on submit, does 'something'. If I use the below onItemSelectedListener, how do I implement an onClick Listener that captures whatever is currently selected in

Simple Android two spinner and submit example

落花浮王杯 提交于 2020-01-06 22:44:05
问题 Very new to Android development. I have been referencing this StackOverflow thread: Android: two Spinner onItemSelected(), but thus far have been running into issues with trying to build a simple program with two spinners and a submit button. The simple program I am trying to develop captures whatever is selected in both Spinners and on submit, does 'something'. If I use the below onItemSelectedListener, how do I implement an onClick Listener that captures whatever is currently selected in

Mono for Android: Spinner within a listview

一世执手 提交于 2020-01-06 19:39:09
问题 I have a listview which is populated from a webservice using an ArrayAdapter. The webservice provides me with all the data I need. Some are just plain textviews yet other alternate between EditText and spinners. I show them easily, also filling up the values where they're due in EditText fields. The problem comes with filling up the value of the Spinner. Can I define an adapter within an adapter? Also my data comes from a webservice as an XML passed as a string. My Spinner code so far inside

Custom font for spinner in android [duplicate]

会有一股神秘感。 提交于 2020-01-06 18:52:41
问题 This question already has answers here : How to set font custom font to Spinner text programmatically? (7 answers) Closed 5 years ago . I want to set the custom font for spinner. Here is my pojo class, which is used as spinner item. public class City { private String cityId; private String cityName; public String getCityId() { return cityId; } public void setCityId(String cityId) { this.cityId = cityId; } public String getCityName() { return cityName; } public void setCityName(String cityName

Dynamic Spinner Using SQLite Database

谁说我不能喝 提交于 2020-01-06 18:31:29
问题 I've been able to successfully link two spinners to a database using a SimpleCursorAdapter. But, I need to make the second spinner selection dependant on the first spinner selection. Here is how I linked the data: public class epa_estimates_button extends Activity { @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.epa_estimates); final Cursor cYear; final Cursor cMake; final Spinner mMakeSpinner; final Spinner

How to get spinner value without tag

点点圈 提交于 2020-01-06 15:04:19
问题 I'm using the spinner, and I want to get the text selected for the user so I'm using String datacat = categorySpinner.getSelectedItem().toString() the problem is that this sentence also return the tag of the spinner in a String like this: {supplier=VITA} , but I need to get only the VITA value 回答1: Assuming selectedview is EditText. String datacat =((EditText) categorySpinner.getSelectedView()).getText().toString(); 回答2: try String datacat = categorySpinner.getSelectedView().getText()

Multiple Columns on a Spinner?

空扰寡人 提交于 2020-01-06 05:49:28
问题 I've been trying for ages and ages to get a custom spinner to work and basically nothing will work. I've been after something like this: http://www.f1-manager.co.uk/Misc/CustomSpinner.png Basically I want to display 3 items from a database, the first name, last name and some other bits of information on the Other Info bit and then of course a picture of said person. Is this even possible? I was told that using a custom spinner can achieve this but I can't find a good enough example to help me

Spinner black text color in dark theme AppCompat v23

社会主义新天地 提交于 2020-01-06 01:45:14
问题 My theme extends from Theme.AppCompat but the text color is black like the background with the light theme works perfect this problem is only in API 10 (2.3.6) with above version works perfect. i use a AppCompatSpinner and my activity extends from AppCompatActivity 来源: https://stackoverflow.com/questions/32661614/spinner-black-text-color-in-dark-theme-appcompat-v23

SelectedItem of Spinner always null

久未见 提交于 2020-01-05 08:49:09
问题 I created custom array adapter for my spinner control but when clicking an item from the list it's not selected. Here my code: public class CustomArrayAdapter : BaseAdapter { readonly LayoutInflater inflater; List<string> items; public CustomArrayAdapter(Context context, List<string> items) { this.inflater = LayoutInflater.FromContext(context); this.items = items; } public override int Count { get { return items.Count; } } public override Object GetItem(int position) { return null; } public

Make Dropdown Label smaller

会有一股神秘感。 提交于 2020-01-05 06:00:34
问题 I would like to figure out if it is possible to make Dropdown (Arrow) Logo of a Spinner smaller. See my two screenshots please: The first Screenshot shows that Dropdown label is pretty big. The second shows what I really want to accomplish. It is not about the Dropdown, I want to have the ability to have more text when a item is already selected. This is what I use as code: <android.support.v7.widget.AppCompatSpinner android:id="@+id/heroSpinner" android:layout_width="match_parent" android