Android Activity ImageView fullscreen settings

Source: Internet
Author: User

Beginning to touch Android also had more than January, watched a small part of the instructional video + just Brother's crazy handout. Always watch the video to do some demo, some dumb. Today try to finally get into the project and reinforce the knowledge points in the project.

Function 1 Project starts displaying the Welcome page and then jumps to the main page;

Problem point 1 Implementation imange full screen display:

Solution:

1. Set the image ScaleType property:

Android : scaletype= "Fitxy"

2. Set the Activity Theme property:

Android : Name= ". Initview" Android : Theme= " @android: Style/theme.holo.noactionbar " >

This only changes the display of an activity, so it only modifies the style of one activity. It is important to note that after modifying the properties of the activity's theme, it is necessary to modify the corresponding implementation class parent class to android.app.activity otherwise the runtime will error:

Java.lang.IllegalStateException:You need to use a theme.appcompat Theme (or descendant) with this activity.


The result looks like this:

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s1.51cto.com/wyfs02/m02/8b/49/wkiol1hjd3dq7wiiaadux6zqw20422.png-wh_500x0-wm_3-wmp_4-s_3019043113.png "title = "QQ picture 20161208154421.png" alt= "Wkiol1hjd3dq7wiiaadux6zqw20422.png-wh_50"/>









This article is from "The growth of Luo shan black tea" blog, please be sure to keep this source http://85608547.blog.51cto.com/2093443/1881054

Android Activity ImageView fullscreen settings

Related Article

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.