Android Studioにて、AndroidBootstrapを導入しました。
ProjectStructureでImport Existing ProjectよりAndroidBootstrap-master内のAndroidBootstrapフォルダをImport
→DependenciesよりModule DependenciesをクリックしAndroidBootstrapを選択。
app内にassetsフォルダを作成し「fontawesome-webfont.ttf」を配置
以上の方法で導入した後、activity_main.xmlのText編集画面上で
lang
1<LinearLayout 2 xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:bootstrap="http://schemas.android.com/apk/res-auto" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent" 6 android:orientation="vertical" > 7<com.beardedhen.androidbootstrap.BootstrapButton 8 android:layout_width="wrap_content" 9 android:layout_height="wrap_content" 10 android:layout_margin="10dp" 11 android:text="Success" 12 bootstrap:bb_icon_right="fa-android" 13 bootstrap:bb_type="success" 14 bootstrap:be_roundedCorners="true" 15 /> 16</LinearLayout>
を記述したところ、Design画面にて
Rendering Problems
The graphics preview in the layout editor may not be accurate:
Typeface.createFromAsset is not supported.
というエラーが表示され、fontawesomeのアイコンは表示されませんでした。
自分が欲している情報は、
1.現在の導入方法で、Design画面にてfontawesomeを表示する方法
2.導入方法に間違いがあれば、正しい手順に則った導入方法
です。
どうかよろしくお願いします。
あなたの回答
tips
プレビュー