diff --git a/example/android/app/src/main/java/com/finogeeks/mop_example/CustomLoadingPage.java b/example/android/app/src/main/java/com/finogeeks/mop_example/CustomLoadingPage.java
index 7b549c7..3ce5f7f 100644
--- a/example/android/app/src/main/java/com/finogeeks/mop_example/CustomLoadingPage.java
+++ b/example/android/app/src/main/java/com/finogeeks/mop_example/CustomLoadingPage.java
@@ -1,6 +1,7 @@
package com.finogeeks.mop_example;
import android.content.Context;
+import android.widget.TextView;
import com.finogeeks.lib.applet.modules.appletloadinglayout.IFinAppletLoadingPage;
@@ -13,26 +14,27 @@ public class CustomLoadingPage extends IFinAppletLoadingPage {
@Override
public int getFailureLayoutRes() {
- return 0;
+ return R.layout.layout_custom_loading_page_failure;
}
@Override
public int getLoadingLayoutRes() {
- return 0;
+ return R.layout.layout_custom_loading_page;
}
@Override
public void onLoadingFailure(@NonNull String s) {
-
+ ((TextView)getFailureLayout().findViewById(R.id.failMsg)).setText(s);
}
@Override
public void onLoadingFailure(@NonNull String s, @NonNull String s1) {
-
+ ((TextView)getFailureLayout().findViewById(R.id.failTitle)).setText(s);
+ ((TextView)getFailureLayout().findViewById(R.id.failMsg)).setText(s1);
}
@Override
public void onUpdate(@NonNull String s, @NonNull String s1) {
-
+ ((TextView)getLoadingLayout().findViewById(R.id.loadingTitle)).setText(s);
}
}
diff --git a/example/android/app/src/main/res/layout/layout_custom_loading_page.xml b/example/android/app/src/main/res/layout/layout_custom_loading_page.xml
new file mode 100644
index 0000000..d25e23b
--- /dev/null
+++ b/example/android/app/src/main/res/layout/layout_custom_loading_page.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/example/android/app/src/main/res/layout/layout_custom_loading_page_failure.xml b/example/android/app/src/main/res/layout/layout_custom_loading_page_failure.xml
new file mode 100644
index 0000000..6722426
--- /dev/null
+++ b/example/android/app/src/main/res/layout/layout_custom_loading_page_failure.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 87196cc..a9e85a1 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -55,7 +55,7 @@ class _MyAppState extends State {
// capsuleConfig.capsuleRightMargin = 25;
uiconfig.capsuleConfig = capsuleConfig;
uiconfig.appletText = "applet";
- uiconfig.loadingLayoutCls = "LoadingView";
+ uiconfig.loadingLayoutCls = "com.finogeeks.mop_example.CustomLoadingPage";
// if (Platform.isIOS) {
// final res = await Mop.instance.initialize(