日々精進

新しく学んだことを書き留めていきます

2015-03-28から1日間の記事一覧

一つのlayout xmlを複数includeした時にViewへの参照を取得する方法

parent.xmlにchild.xmlを複数回includeした場合、同じidのViewが複数できるがそれらへの参照をどうやって取得するか。例は以下。 parent.xml <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> </scrollview>