First launch of graceful beginner's Guide tip

Source: Internet
Author: User

In the development of commercial applications, the first time users enter the app, there is a feeling that we as developers to provide users with some guidelines,

These guidelines do not allow users to look abrupt, to be comfortable to display to the user, with the user happy to use our app.


How to make the user comfortable? We can't just pop up a alterdialog, which will scare your users away, so let's be gentle.

Let's have a fuss over the whole window.


We were able to implement this tip on the definition of our own theme theme, which is very soft for the user to accept, and here is not going to discuss the definition of theme, just to provide

A simple approach, the definition of theme in the back of the blog to study again.


Take a look at it first:



It looks really cool. Let me tell you what to do.

This tip is a window-level, unlike the button these window properties, can be changed according to the theme to change its style, using the Manifest.xml

The corresponding activity is modified in the


Detailed steps:


1, define a themes file in Valuse, set a custom theme Myapptheme, inherit the theme of Android system. Dialog themes

<resources>        <style name= "Myapptheme" parent= "@android: Style/theme.dialog" >          <item name= " Android:windowbackground "> @drawable/tip</item>          </style></resources>

2, in manifest. In XML, set the style to the corresponding activity, referencing the topic you define

  <activity            android:name= "com.example.themedemo.MainActivity"            android:label= "@string/app_name"             Android:theme= "@style/myapptheme" >

3. Virtualized backgrounds

The activity only needs to do the virtualization background, the others do not need to do

GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

Done

First launch of graceful beginner's Guide tip

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.