0

I'm newbie, I don't know what is this called, So i cant google it.

I want to make an "article like layout" on my scroll view. How can i put like this on my scroll view?

1 Answers1

1

what you are asking is a card view to use the library you have to paste this code in your gradle

dependencies {

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

}

and place the content like this

<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>

here is a tutorial and to make it look exacty like the image try to use custom font you can set i like this

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

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

tx.setTypeface(custom_font);`

fore more about custom font hope this will help you.

Community
  • 1
  • 1
Neelay Srivastava
  • 1,041
  • 3
  • 15
  • 46