2017-02-18 3 views

答えて

1

何を求めていることは、あなたのGradle

dependencies { 

compile 'com.android.support:cardview-v7:23.3.+' 

}

この

<android.support.v7.widget.CardView 
    xmlns:card_view="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/card_view" 
    android:layout_gravity="center" 
    android:layout_width="250dp" 
    android:layout_height="250dp" 
    card_view:cardCornerRadius="4dp"> 

    <TextView 
     android:text="Hello Card" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 

</android.support.v7.widget.CardView> 

のようにコンテンツを配置して、このコードを貼り付けする必要があるライブラリを使用するには、カードビューでありますここにはtutorial と同じように見えるように画像のようにカスタムフォントを使用しようとする 私はこのように設定することができます

` TextView tx = (TextView)findViewById(R.id.textview1); 

Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/abc.ttf"); 

tx.setTypeface(custom_font);` 

詳細については、custom fontこちらをご覧ください。

関連する問題