Android Studio Third time job

Source: Internet
Author: User

The Work Experience

Image

1: Download three pictures The name is required in English or letters (not available in Chinese or Arabic numerals)

2: Picture required to save to res/drawable directory

Code

Be sure to note that when dragging a button:

The first linearlayout is horizontal, so choose vertical

Three ImageView are placed in the framelayout.

The second linearlayout is longitudinal, so choose horizontal

The second imageview is placed in a second linearlayout.

Then Framelayout and the second linearlayout are placed in the first LinearLayout

Java code

public void Inimageg1click (view view) {
View.setvisibility (view.invisible); INVISIBLE hidden Invisible (memory-occupied)
    Views.add (view);
}
This piece of code is to make the image shadow hidden
public void Onimageg2click (view view) {
View.setvisibility (view.gone); GONE disappears (does not account for memory)

Views.add (view);
}
This piece of code is to make the picture disappear
public void Onresetclick (view view) {
if (views! = null && views.size () >0) {
for (View v:views) {
V.setvisibility (view.visible); visible (be sure to be careful not to put this visible in the last face is not visible or you can not restore the display picture)

}
}
This piece of code is to make the disappearing picture appear again

Final effect

Android Studio Third time job

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.