Android High imitation Baidu paste post page

Source: Internet
Author: User

This project is to do a forum, I modeled a bit Baidu posted post effect, the implementation of the interface as shown below, will be issued to share the source.

The main focus is to achieve two places:

1, click the input box, the page floating, the following upload image layout to the top.

2, enter the content of the post needs full-screen display;

For these two parts, here is a separate account:

1) in order to achieve the click on the input box, the page floating, the following upload image layout to the top. Here the content is partially nested with a scrollview scrolling module so that it can be topped up.

2) in order to achieve full-screen display post content. Here you need to add the following settings to the ScrollView:

Android:fillviewport= "true"

Enable internal support android:layout_height= "Match_parent"

Because this is a part of the project, did not do the demo alone, this does not come out ~ The core source code is all below.




Publish_note.xml

<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/    Android "Android:layout_width=" Match_parent "android:layout_height=" Match_parent "> <!--loading the title bar-- <include android:id= "@+id/publish_title_bar" layout= "@drawable/publish_title_bar"/> <lin Earlayout android:id= "@+id/publish_note_bottom_bar" android:layout_width= "Match_parent" Android:layout_heig     ht= "Wrap_content" android:layout_alignparentbottom= "true" android:orientation= "horizontal" ><!--load Bottom Bar-- <include layout= "@drawable/publish_note_bottom_bar"/></linearlayout> <!--post title--&lt ; EditText android:id= "@+id/et_note_title" android:layout_width= "Match_parent" android:layout_height= "W Rap_content "android:layout_below=" @id/publish_title_bar "android:hint=" @string/tip_note_title "/> < ScrollView android:id= "@+Id/sv_note_contain "android:layout_width=" match_parent "android:layout_height=" Match_parent "Android: Fillviewport= "true" android:layout_above= "@id/publish_note_bottom_bar" android:layout_below= "@id/et_note_tit         Le "><!--post content--><edittext android:id=" @+id/et_note_contain "android:layout_width=" Match_parent "        android:layout_height= "Match_parent" android:gravity= "Top" android:inputtype= "Textmultiline" Android:singleline= "false" android:hint= ""/></scrollview></relativelayout>
Publish_title_bar.xml
<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "android:orientation=" horizontal "android:layout_width=" Fill_parent "android:layout_height=" 48d P "android:background=" @color/index_title > <!--rewind-<imageview android:id= "@+id/im_back" a Ndroid:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_centervertical= "true" Android Oid:layout_alignparentleft= "true" android:contentdescription= "@string/desc_indexpic" android:src= "@drawable/ Browser_back "/> <!--topics--<textview android:id=" @+id/tv_publish "Android:layout_wi Dth= "Wrap_content" android:layout_height= "Wrap_content" android:layout_centerinparent= "true" Android : text= "@string/publish_topic" android:textcolor= "@color/black" android:textsize= "18pt"/> <!--placeholder- <textview android:id= "@+Id/tv_null "android:layout_width=" 10DP "android:layout_height=" wrap_content "android:layout_alignparentright=" Tru E "android:layout_centervertical=" true "android:text=" "/> <!--post--<textview android:id=" @+id/tv_publish_note "android:layout_width=" wrap_content "android:layout_height=" Wrap_content "Android:layout_toL eftof= "@id/tv_null" android:layout_centervertical= "true" android:textcolor= "@color/black" android:textsize= "18pt "Android:text=" @string/publish_note "/></relativelayout>
Publish_bottom_bar.xml

<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "    android:layout_width=" match_parent "    android:layout_height=" match_parent "     android:o rientation= "Horizontal" >    <imageview    android:id= "@+id/im_pictrue" android:layout_width= "Wrap_    Content "    android:layout_height=" wrap_content "    android:layout_centervertical=" true "    android:layout_ Alignparentleft= "true"     android:contentdescription= "@string/desc_indexpic"    android:src= "@drawable/btn _pb_add_n "/></linearlayout>


Android High imitation Baidu paste post page

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.