android sdk update国内mirrors
http://www.eoeandroid.com/thread-568548-1-1.html 本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/1631616
|
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
LoginActivity
package
com.xkhouse.erm.erm;
import
android.app.Activity;
import
android.os.Bundle;
import
android.view.Window;
/* public class LoginActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
//requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
} */
public class LoginActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/*
* 设置隐藏标题栏
*/
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_login);
}
}
/* public class SplashActivity extends Activity {
private final int SPLASH_DISPLAY_LENGHT = 1000; //延迟一秒
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.jiazai);
new Handler().postDelayed(new Runnable() {
// 为了减少代码使用匿名Handler创建一个延时的调用
public void run() {
Intent i = new Intent(SplashActivity.this, LoginActivity.class);
// 通过Intent打开最终真正的主界面Main这个Activity
SplashActivity.this.startActivity(i); // 启动Main界面
SplashActivity.this.finish(); // 关闭自己这个开场屏
}
}, SPLASH_DISPLAY_LENGHT);
}
} */
SplashActivity
package com.xkhouse.erm.erm;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;
/*public class SplashActivity extends Activity {
private final int SPLASH_DISPLAY_LENGHT = 6000; // 延迟六秒
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
new Handler().postDelayed(new Runnable() {
public void run() {
Intent mainIntent = new Intent(SplashActivity.this,
LoginActivity.class);
SplashActivity.this.startActivity(mainIntent);
SplashActivity.this.finish();
}
}, SPLASH_DISPLAY_LENGHT);
}
} */
public class SplashActivity extends Activity {
final private int SPLASH_TIME = 1000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/*
* 设置全屏
*/
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
/*
* 设置隐藏标题栏
*/
requestWindowFeature(Window.FEATURE_NO_TITLE);
/*
* 2秒后跳转到主界面
*/
new Handler().postDelayed(new Runnable() {
public void run() {
launchMainActivity();
}
}, SPLASH_TIME);
setContentView(R.layout.activity_splash);
}
/*
* 利用Intent切换到主Activity
*/
private void launchMainActivity() {
/*
* 创建一个intent,从当前Activity指向要跳转的Activity
*/
Intent intent = new Intent(this, LoginActivity.class);
/*
* 启动目标Activity
*/
startActivity(intent);
/*
* 启动画面只需要程序开始时显示一次,显示完后即可退出
*/
finish();
}
}
layout目录下
activity_splash.xml
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_height=
"fill_parent"
android:layout_width=
"fill_parent"
android:orientation=
"vertical"
>
<ImageView android:layout_height=
"fill_parent"
android:layout_width=
"fill_parent"
android:scaleType=
"fitCenter"
android:src=
"@drawable/splash"
></ImageView>
</LinearLayout>
AndroidMainfest.xml
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<manifest xmlns:android=
"http://schemas.android.com/apk/res/android"
package
=
"com.xkhouse.erm.erm"
>
<application
android:allowBackup=
"true"
android:icon=
"@drawable/logo"
android:label=
"@string/app_name"
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
>
<activity
android:name=
"com.xkhouse.erm.erm.SplashActivity"
android:label=
"@string/app_name"
>
<intent-filter>
<action android:name=
"android.intent.action.MAIN"
/>
<category android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity android:name=
".LoginActivity"
></activity>
</application>
</manifest>
|
微信关注我们
转载内容版权归作者及来源网站所有!
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。
Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。
Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。
Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。