2016-10-03 2 views
0
내가 스피너 표시하려면 다음 코드를 사용하고

:추가 분리기 회 전자 항목

ArrayAdapter<String> spinnerArrayAdapterFetching = new ArrayAdapter<String>(this,R.layout.spinner, new String[]{"Fetching..."}); 
RouteSpinner.setAdapter(spinnerArrayAdapterFetching); 

layout.xml

<Spinner 
    android:layout_marginTop="10dp" 
    android:id="@+id/Spinner_Routes" 
    android:typeface="monospace" 
    android:textStyle="bold" 
    android:textColor="#002361" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"/> 

이 spinner.xml

<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:maxLines="1" 
     android:layout_margin="10dp" 
     android:layout_width="match_parent" 
     android:textColor="#002361" 
     android:layout_height="wrap_content" 
     android:gravity="left" 
     android:textStyle="bold" 
     android:typeface="monospace" 
     android:paddingRight="10dp"/> 

어떻게 내가 얻을 수 있습니다 항목 사이의 구분선?

답변

0

시도 추가 spinner.xml

<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:maxLines="1" android:layout_margin="10dp" android:layout_width="match_parent" android:textColor="#002361" android:layout_height="wrap_content" android:gravity="left" android:textStyle="bold" android:typeface="monospace" android:paddingRight="10dp"/>

아래

<View android:layout_width="match_parent" android:layout_height="1dp"//change the size for thickness android:background="#000"/>//change accordingly for color

관련 문제