I have this spinner and want to know how I can put border around this
Spinner dropdown = (Spinner)findViewById(R.id.spinnerUpdateContactMethod);
String[] items = new String[]{"1", "2", "three"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);
dropdown.setPrompt("Please select ");
dropdown.setAdapter(adapter);
the prompt doesn't actually come up on the screen. Please could someone help me with this.
for custom border you can create an xml file inside drawable folder
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white_overlay_8x" />
<corners android:radius="6dip" />
<stroke
android:color="@color/white"
android:width="@dimen/dot" />
</shape>
and set
android:background=@drawable/file;
in your spinner(xml file of activity)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With