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