add 自定义的loading页
parent
2b1691f26c
commit
512175fd51
|
@ -0,0 +1,38 @@
|
|||
package com.finogeeks.mop_example;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.finogeeks.lib.applet.modules.appletloadinglayout.IFinAppletLoadingPage;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public class CustomLoadingPage extends IFinAppletLoadingPage {
|
||||
public CustomLoadingPage(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFailureLayoutRes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLoadingLayoutRes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadingFailure(@NonNull String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadingFailure(@NonNull String s, @NonNull String s1) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(@NonNull String s, @NonNull String s1) {
|
||||
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -46,6 +47,8 @@
|
|||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; };
|
||||
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; };
|
||||
B691CF78BE1464D3451E07AF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -120,6 +123,8 @@
|
|||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */,
|
||||
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
|
@ -272,6 +277,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// LoadingView.h
|
||||
// Runner
|
||||
//
|
||||
// Created by Haley on 2023/4/9.
|
||||
//
|
||||
|
||||
#import <FinApplet/FinApplet.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LoadingView : FATBaseLoadingView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// LoadingView.m
|
||||
// Runner
|
||||
//
|
||||
// Created by Haley on 2023/4/9.
|
||||
//
|
||||
|
||||
#import "LoadingView.h"
|
||||
|
||||
@implementation LoadingView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if ([super initWithFrame:frame]) {
|
||||
self.loadingView.padding = 20;
|
||||
self.loadingView.dotView.backgroundColor = [UIColor blackColor];
|
||||
self.loadingView.animation.duration = 5;
|
||||
self.titleLabel.textColor = [UIColor redColor];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
|
||||
// 如果要改logo,必须在这里修改。
|
||||
// 修改小程序logo应该是从管理后台上传新的小程序图标,因为更多面板、关于页面也会展示小程序logo,只改这里只是loding页面生效
|
||||
self.bottomImageView.hidden = YES;
|
||||
}
|
||||
|
||||
@end
|
|
@ -41,6 +41,7 @@ class _MyAppState extends State<MyApp> {
|
|||
List<FinStoreConfig> storeConfigs = [storeConfigA];
|
||||
Config config = Config(storeConfigs);
|
||||
config.language = LanguageType.English;
|
||||
config.baseLoadingViewClass = "LoadingView";
|
||||
|
||||
UIConfig uiconfig = UIConfig();
|
||||
uiconfig.isAlwaysShowBackInDefaultNavigationBar = false;
|
||||
|
@ -54,6 +55,7 @@ class _MyAppState extends State<MyApp> {
|
|||
// capsuleConfig.capsuleRightMargin = 25;
|
||||
uiconfig.capsuleConfig = capsuleConfig;
|
||||
uiconfig.appletText = "applet";
|
||||
uiconfig.loadingLayoutCls = "LoadingView";
|
||||
|
||||
// if (Platform.isIOS) {
|
||||
// final res = await Mop.instance.initialize(
|
||||
|
|
Loading…
Reference in New Issue