For now,i want to also add RecyclerView and CardView
これらの2つのコントロールを使用するには、プロジェクトにXamarin.Android.Support.v7.RecyclerView
パッケージとXamarin.Android.Support.v7.CardView
をインストールする必要があります。 Nugetを使用してXamarin.Android.Support.v7.RecyclerView
パッケージをインストールすると、Xamarin.Android.Support.v4
パッケージが自動的にインストールされます。
そして、あなたはこのようなRecyclerView
使用することができます。
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:scrollbars="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
をそしてそうCardView
は次のとおりです。
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:scaleType="centerCrop" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#333333"
android:text="Caption"
android:id="@+id/textView"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="4dp" />
</LinearLayout>
</android.support.v7.widget.CardView>
あなたはXamarinでRecyclerView
を使用してカスタマイズするためのXamarinの公式文書RecyclerViewを参照することができます。 Androidアプリケーション
まだ問題がある場合は、最小限の再生可能なデモを提供してください。この問題を引き続き調査できますか?
android.app.Fragment'では、サポートライブラリは不要です –
サポートライブラリの他の機能はどうですか? –
Fragmentsを追加したいと言ったばかりです: –