2016-04-29 6 views
5

での使用色配列私は多くの記事を見てきたようにXMLから文字列配列を取得し、RecyclerViewまたはスピナーのような他のコントロールに直接結合する方法があります。 app:entries="@{@stringArray/fi}like:アンドロイド:XML

<?xml version="1.0" encoding="utf-8"?> 
<layout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto"> 
    <android.support.v7.widget.RecyclerView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     app:entries="@{@stringArray/fi}" 
     app:layoutManager="android.support.v7.widget.LinearLayoutManager"/> 
</layout> 

を使用してRecylerViewと結合文字列配列色配列のためにそれを行うにはどのような方法があります

特にAndroid Databindingに?

答えて

関連する問題