Android-Agnostic Answer UI

Source: Internet
Author: User

Personally feel that the answer interface is very good-looking.

The first card in the middle is cardview.

Also, to hide the navigation bar.

And then, how to achieve cardview how can half in the blue part?

The first is divided into two parts, the first part TextView, is used to display the problem, and then specify the CardView property below it.

Again with a textview of the same color, the height is half of the CardView, also under the first TextView, and in the back of the CardView.

Layout file:

<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "xmlns:tools=" Http://schemas.android.com/tools "android:layout_width=" Match_parent "android:layout_height = "Match_parent" tools:context= "com.example.administrator.cardviewtest.MainActivity" > <textview android: Layout_width= "Match_parent" android:layout_height= "wrap_content" android:background= "#3366cc" Android        : id= "@+id/title" android:paddingtop= "16DP" android:paddingbottom= "10DP" android:paddingleft= "18DP" android:paddingright= "18DP" android:text= "The answer interface so good-looking, in the end how to write, help?" "Android:textcolor=" #ffffff "android:textsize=" 20DP "/> <textview android:layout_wid Th= "Match_parent" android:layout_height= "50DP" android:background= "#3366cc" android:layout_below= "@+i D/title "/> <android.support.v7.widget.cardview android:layout_below= "@+id/title" android:layout_marginleft= "16DP" android:layout_marginright= "16DP" Android:            Layout_width= "Match_parent" android:layout_height= "100DP" android:id= "@+id/view" > <imagebutton Android:layout_width= "60DP" android:layout_height= "60DP" android:background= "@drawable/he Ad "android:layout_margintop=" 20DP "android:layout_marginleft=" 20DP "android:id=" @+id/hea D "/> <textview android:layout_width=" wrap_content "android:layout_height=" W Rap_content "android:text=" Wei Binbin "android:layout_marginleft=" 90DP "Android:layout_margi ntop= "30DP" android:textsize= "16DP"/> <textview android:layout_width= "Wrap_ Content "android:layout_height=" Wrap_content "android:text=" Android topic excellent paddling "android:layou     t_marginleft= "90DP"       android:layout_margintop= "55DP" android:textsize= "12DP"/> &LT;/ANDROID.SUPPORT.V7.WIDG Et.        cardview> <textview android:layout_width= "wrap_content" android:layout_height= "Wrap_content" android:text= "Thank you for your invitation. "Android:layout_below=" @+id/view "android:layout_alignleft=" @+id/view "android:layout_alignstart=" @+ Id/view "android:layout_margintop=" 23DP "android:id=" @+id/textview "/> <textview android:lay Out_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "above. "Android:layout_alignparentbottom=" true "android:layout_alignleft=" @+id/textview "Android:layout_ali Gnstart= "@+id/textview" android:layout_marginbottom= "41DP"/></relativelayout>

  

Android-Agnostic Answer UI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.