Skip to content

Commit

Permalink
Fixed dropdown icon (#2201)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 authored and lognaturel committed May 18, 2018
1 parent cbf0bc1 commit 7c872bf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v7.content.res.AppCompatResources;
import android.text.InputFilter;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -93,7 +94,9 @@ public void addAggregatePreferences() {

urlDropdownSetup();

serverUrlPreference.getEditText().setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_drop_down, 0);
// TODO: use just 'serverUrlPreference.getEditText().setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_drop_down, 0);' once minSdkVersion is >= 21
serverUrlPreference.getEditText().setCompoundDrawablesWithIntrinsicBounds(null, null,
AppCompatResources.getDrawable(getActivity(), R.drawable.ic_arrow_drop_down), null);
serverUrlPreference.getEditText().setOnTouchListener(this);
serverUrlPreference.setOnPreferenceChangeListener(createChangeListener());
serverUrlPreference.setSummary(serverUrlPreference.getText());
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions collect_app/src/main/res/drawable/ic_arrow_drop_down.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="36dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="36dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?iconColor" android:pathData="M7,10l5,5 5,-5z"/>
</vector>

0 comments on commit 7c872bf

Please sign in to comment.