|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
package
com.u8.sdk;import
android.os.Bundle;import
android.app.Activity;import
android.content.Intent;import
android.view.LayoutInflater;import
android.view.animation.AlphaAnimation;import
android.view.animation.Animation;import
android.view.animation.Animation.AnimationListener;import
android.widget.ImageView;import
android.widget.RelativeLayout;/**** 闪屏界面**/public
class SplashActivity extends
Activity { @Override public
void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); int
layoutID = getResources().getIdentifier("u8_splash",
"layout", getPackageName()); setContentView(layoutID); this.appendAnimation(); } private
void appendAnimation(){ AlphaAnimation ani =
new AlphaAnimation(0.0f,
1.0f); ani.setRepeatMode(Animation.REVERSE); ani.setRepeatCount(0); ani.setDuration(2000);
//2s ImageView image = (ImageView)findViewById(getResources().getIdentifier("u8_splash_img",
"id", getPackageName())); if(image ==
null){ int
defaultID = getResources().getIdentifier("u8_splash_layout",
"id", getPackageName()); RelativeLayout layout = (RelativeLayout)LayoutInflater.from(this).inflate(defaultID,
null); image = (ImageView)layout.getChildAt(0); } image.setAnimation(ani); ani.setAnimationListener(new
AnimationListener() { @Override public
void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } @Override public
void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public
void onAnimationEnd(Animation animation) { SplashActivity.this.startGameActivity(); } }); } private
void startGameActivity() { try
{ Class<?> mainClass = Class.forName("{U8SDK_Game_Activity}"); Intent intent =
new Intent(this, mainClass); startActivity(intent); finish(); return; }
catch(Exception e) { e.printStackTrace(); } }
} |
在channels目录下,对应的渠道号目录下面,建立文件夹,文件夹格式为[横屏竖屏][填充颜色(黑/白)]。
11 : 横屏白色
12 : 横屏黑色
21 : 竖屏白色
22 : 竖屏黑色
|
1
2
3
4
5
6
7
8
|
<channel> <param
name="id"
value="45"
/> <param
name="sdk"
value="dl"
/> <param
name="name"
value="dl"
/> <param
name="suffix"
value=".dl"
/> <param
name="splash"
value="11"
/> <param
name="splash_copy_to_unity"
value="0"
/></channel> |
|
1
2
3
4
5
6
7
8
|
<channel> <param
name="id"
value="45"
/> <param
name="sdk"
value="dl"
/> <param
name="name"
value="dl"
/> <param
name="suffix"
value=".dl"
/> <param
name="splash"
value="21"
/> <param
name="splash_copy_to_unity"
value="0"
/></channel> |
原文地址:http://blog.csdn.net/chenjie19891104/article/details/44992923