Browse Source

Upload spinners theme fix

pull/50/head
Apostolos Fanakis 6 years ago
parent
commit
e4e8204afe
  1. 12
      app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java
  2. 14
      app/src/main/res/layout/spinner_dropdown_item.xml
  3. 14
      app/src/main/res/layout/spinner_item.xml
  4. 1
      app/src/main/res/values-w820dp/dimens.xml
  5. 1
      app/src/main/res/values/dimens.xml

12
app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java

@ -335,8 +335,8 @@ public class UploadActivity extends BaseActivity {
}
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<>(BaseApplication.getInstance().getApplicationContext(),
android.R.layout.simple_spinner_dropdown_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
R.layout.spinner_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
rootCategorySpinner.setAdapter(spinnerArrayAdapter);
//Sets bundle selection
@ -491,8 +491,8 @@ public class UploadActivity extends BaseActivity {
}
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<>(getApplicationContext(),
android.R.layout.simple_spinner_dropdown_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
R.layout.spinner_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
AppCompatSpinnerWithoutDefault subSpinner = new AppCompatSpinnerWithoutDefault(categoriesSpinners.getContext());
subSpinner.setPromptId(R.string.upload_spinners_hint);
@ -591,8 +591,8 @@ public class UploadActivity extends BaseActivity {
}
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<>(BaseApplication.getInstance().getApplicationContext(),
android.R.layout.simple_spinner_dropdown_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
R.layout.spinner_item, tmpSpinnerArray);
spinnerArrayAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
rootCategorySpinner.setAdapter(spinnerArrayAdapter);
//Sets bundle selection

14
app/src/main/res/layout/spinner_dropdown_item.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:paddingBottom="6dp"
android:paddingEnd="7dp"
android:paddingStart="7dp"
android:paddingTop="6dp"
android:singleLine="true"
android:textColor="@color/primary_text"
android:textSize="@dimen/medium_text" />

14
app/src/main/res/layout/spinner_item.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:paddingBottom="6dp"
android:paddingEnd="7dp"
android:paddingStart="7dp"
android:paddingTop="6dp"
android:singleLine="true"
android:textColor="@color/primary_text"
android:textSize="@dimen/medium_text" />

1
app/src/main/res/values-w820dp/dimens.xml

@ -9,5 +9,6 @@
<dimen name="post_image_button">144dp</dimen>
<dimen name="fab_margins">64dp</dimen>
<dimen name="progress_bar_height">40dp</dimen>
<dimen name="medium_text">16sp</dimen>
<dimen name="big_text">24sp</dimen>
</resources>

1
app/src/main/res/values/dimens.xml

@ -7,5 +7,6 @@
<dimen name="post_image_button">36dp</dimen>
<dimen name="fab_margins">16dp</dimen>
<dimen name="progress_bar_height">10dp</dimen>
<dimen name="medium_text">16sp</dimen>
<dimen name="big_text">24sp</dimen>
</resources>

Loading…
Cancel
Save