add 自定义的loading页

master
wanghualei 2023-04-10 11:23:11 +08:00
parent 2b1691f26c
commit 512175fd51
5 changed files with 92 additions and 0 deletions

View File

@ -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) {
}
}

View File

@ -14,6 +14,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 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 */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -46,6 +47,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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; }; B691CF78BE1464D3451E07AF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -120,6 +123,8 @@
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */,
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */,
); );
path = Runner; path = Runner;
sourceTree = "<group>"; sourceTree = "<group>";
@ -272,6 +277,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;

View File

@ -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

View File

@ -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
// logologoloding
self.bottomImageView.hidden = YES;
}
@end

View File

@ -41,6 +41,7 @@ class _MyAppState extends State<MyApp> {
List<FinStoreConfig> storeConfigs = [storeConfigA]; List<FinStoreConfig> storeConfigs = [storeConfigA];
Config config = Config(storeConfigs); Config config = Config(storeConfigs);
config.language = LanguageType.English; config.language = LanguageType.English;
config.baseLoadingViewClass = "LoadingView";
UIConfig uiconfig = UIConfig(); UIConfig uiconfig = UIConfig();
uiconfig.isAlwaysShowBackInDefaultNavigationBar = false; uiconfig.isAlwaysShowBackInDefaultNavigationBar = false;
@ -54,6 +55,7 @@ class _MyAppState extends State<MyApp> {
// capsuleConfig.capsuleRightMargin = 25; // capsuleConfig.capsuleRightMargin = 25;
uiconfig.capsuleConfig = capsuleConfig; uiconfig.capsuleConfig = capsuleConfig;
uiconfig.appletText = "applet"; uiconfig.appletText = "applet";
uiconfig.loadingLayoutCls = "LoadingView";
// if (Platform.isIOS) { // if (Platform.isIOS) {
// final res = await Mop.instance.initialize( // final res = await Mop.instance.initialize(