spinner

How to select kivy old value for the spinner

痞子三分冷 提交于 2021-02-10 14:27:49
问题 Kivy documentation states that "Touching the spinner displays a dropdown menu with all the other available values from which the user can select a new one." Is there any workaround to tell if it is an old value a user selected in order to perform the same action? I am really stuck with this, please help me out. 回答1: Rather than using the on_text or on_select , you can use the Buttons that make up the DropDown to trigger whatever method you want to run. That way, it doesn't matter whether the

android spinner dialog popup background

孤街醉人 提交于 2021-02-10 14:10:52
问题 My android app already set popupbackground as drawable xml. However, the popup dialog still cannot show the color I set. How to settle this issue? <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="

Error spinner in popup window when I click

匆匆过客 提交于 2021-02-07 14:01:13
问题 My app if poulsas a button a pop-out which has two spinners, well then I get the pop-up there all right but when I get the error is when I click on the spinner. Here you have my below code and debug, because logcat I get everything right. public void añadirRegistro(View v){ showPopup(leer_registros.this); } private void showPopup(final Activity context) { Spinner eleccionIP,eleccionRegistro; borrar_datos BorrarDatos = new borrar_datos (); // Inflate the popup_layout.xml RelativeLayout

How to open a spinner with one click when another spinner is open

回眸只為那壹抹淺笑 提交于 2021-02-07 11:26:41
问题 I have few spinners on a form. When I click on any of them it opens and shows the options. When I click on any another spinner it closes the open spinner but then I need to click again on the desired spinner in order to open it. I would like to catch the first click on the 2nd spinner so that I can close the first open spinner and then open the clicked spinner. I saw posts about closing the spinner on any click outside, but that is not enough because I still do not know that the desired

I can't use API reflection on androidx.appcompat:appcompat:1.1.0

安稳与你 提交于 2021-02-05 12:04:00
问题 I have a problem with androidx.appcompat:appcompat:1.1.0. It's a new problem because on androidx.appcompat:appcompat:1.0.2 it does not exist. I have a code that uses reflection to get mPopup Field from the spinner and set its height. It works very well on appcompat:1.0.2 but not on androidx.appcomppat:appcompat:1.1.0. The code is private void setPopUp() { try { Field popup = getPopupField(); // Get private mPopup member variable and try cast to ListPopupWindow final android.widget

I can't use API reflection on androidx.appcompat:appcompat:1.1.0

拥有回忆 提交于 2021-02-05 12:03:04
问题 I have a problem with androidx.appcompat:appcompat:1.1.0. It's a new problem because on androidx.appcompat:appcompat:1.0.2 it does not exist. I have a code that uses reflection to get mPopup Field from the spinner and set its height. It works very well on appcompat:1.0.2 but not on androidx.appcomppat:appcompat:1.1.0. The code is private void setPopUp() { try { Field popup = getPopupField(); // Get private mPopup member variable and try cast to ListPopupWindow final android.widget

Spinner dropUP instead dropDOWN android

和自甴很熟 提交于 2021-02-05 05:00:34
问题 I have an Adapter which extends from ArrayAdapter in order to fill one Spinner with one collections of objects (City). Both all objects and adapter work correctly, at least what it that it seems. The problem is that when I display all collections of cities, it is displayed to UP instead to DOWN. Does anyone know what can be happen? This is my Adapter public class AdapterSpinnerListCities extends ArrayAdapter<City> { // My context private Context context; // Values for the spinner (City)

Spinner dropUP instead dropDOWN android

China☆狼群 提交于 2021-02-05 04:58:26
问题 I have an Adapter which extends from ArrayAdapter in order to fill one Spinner with one collections of objects (City). Both all objects and adapter work correctly, at least what it that it seems. The problem is that when I display all collections of cities, it is displayed to UP instead to DOWN. Does anyone know what can be happen? This is my Adapter public class AdapterSpinnerListCities extends ArrayAdapter<City> { // My context private Context context; // Values for the spinner (City)

Changing Spinner background generates dark colored border

↘锁芯ラ 提交于 2021-01-28 04:21:22
问题 Using a simple spinner. When I scroll the spinner the shadow around spinner dropdown starts growing darker in color . I managed to fix the issue but I will appreciate if someone could explain me why was this happening? <Spinner android:id="@id/drop_list_1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:background="@android:color/transparent" android:dropDownSelector="@android

Android Kotlin - How to set Spinner selected item

a 夏天 提交于 2021-01-27 22:15:42
问题 I have a spinner populated with array of strings from XML: <Spinner android:id="@+id/spinnerUnits" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:entries="@array/units" app:layout_constraintStart_toEndOf="@+id/barrier3" app:layout_constraintTop_toBottomOf="@+id/labelGeneric" /> When user selects something, I save it to SharedPreferences. How do I set the value back when the app is opened next time? I have only the value saved,