<com.github.androidprogresslayout.ProgressLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:progressLayout="http://schemas.android.com/apk/res-auto" android:id="@+id/progressLayout" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="sp" android:layout_centerInParent="true" /> </com.github.androidprogresslayout.ProgressLayout>
package com.zzw.testandroidprogresslayout;
import com.github.androidprogresslayout.ProgressLayout;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.animation.Animation;
import android.widget.TextView;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final ProgressLayout progressLayout = (ProgressLayout) findViewById(R.id.progressLayout);
final TextView textView = (TextView) findViewById(R.id.textView);
Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
textView.setText("测试完成");
// 切换回正常显示页面
progressLayout.showContent();
}
};
// 开始加载... 假设从这里开始一个耗时的操作将开始启动,在此启动过程中,开发者希望用户稍事休息,等待。。。
progressLayout.showProgress();
// 假设有一个耗时的加载业务逻辑,需要秒完成。
handler.sendEmptyMessageDelayed(, );
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有