diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MyQRCodeActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MyQRCodeActivity.java
index 04026f6de85bd1250fcb64a75ee7dc90d3dab620..d884eb8a0a0cba2c9768ec5d441433d63728cce1 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MyQRCodeActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MyQRCodeActivity.java
@@ -24,6 +24,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mindspore.common.utils.AppTitleUtils;
import com.mindspore.himindspore.R;
@Route(path = "/app/MyQRCodeActivity")
@@ -35,6 +36,7 @@ public class MyQRCodeActivity extends AppCompatActivity {
private RelativeLayout mMy_layout;
private ImageView mQr_code_image;
+ private AppTitleUtils appTitle;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -44,26 +46,13 @@ public class MyQRCodeActivity extends AppCompatActivity {
}
private void init() {
- Toolbar mToolbar = findViewById(R.id.segmentation_toolbar);
- setSupportActionBar(mToolbar);
- mToolbar.setNavigationOnClickListener(view -> finish());
+ appTitle = findViewById(R.id.segmentation_toolbar);
+ appTitle.findViewById(R.id.title_black).setOnClickListener(view -> finish());
mMy_layout = (RelativeLayout) findViewById(R.id.my_relativelayout);
mQr_code_image = findViewById(R.id.img_origin);
-
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- Log.i(TAG, "onCreateOptionsMenu info");
- getMenuInflater().inflate(R.menu.menu_setting_qr, menu);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- findViewById(R.id.item_more_qr).setOnClickListener(new View.OnClickListener() {
+ appTitle.findViewById(R.id.icon_more).setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(View view) {
LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
save_and_cancels_image = layoutInflater.inflate(R.layout.save_qr_code_popupwindo, null);
DisplayMetrics dm = new DisplayMetrics();
@@ -96,8 +85,6 @@ public class MyQRCodeActivity extends AppCompatActivity {
});
}
});
-
- return super.onOptionsItemSelected(item);
}
public void backgroundAlpha(float bgAlpha) {
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/webview/WebViewUtilsActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/webview/WebViewUtilsActivity.java
index 4c8765f7664115b796a3032ea95645a0bc998d19..8994c4f96245d1653c5d5c1888b9deeb0f6f0a5e 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/webview/WebViewUtilsActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/webview/WebViewUtilsActivity.java
@@ -23,20 +23,23 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
+import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.mindspore.common.config.MSLinkUtils;
+import com.mindspore.common.utils.AppTitleUtils;
import com.mindspore.himindspore.R;
public class WebViewUtilsActivity extends AppCompatActivity {
private WebView mWebView;
private ProgressBar progressBar;
- private Toolbar mToolbar;
+ private AppTitleUtils appTitle;
private String mWebViewUrl;
private int ProgressBar = 100;
+ private TextView titleName;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -48,10 +51,10 @@ public class WebViewUtilsActivity extends AppCompatActivity {
private void initView() {
progressBar = findViewById(R.id.progress);
- mToolbar = findViewById(R.id.mWebView_toolbar);
- mToolbar.setNavigationOnClickListener(view -> finish());
+ appTitle = findViewById(R.id.mWebView_toolbar);
+ appTitle.findViewById(R.id.title_black).setOnClickListener(view -> finish());
+ titleName = appTitle.findViewById(R.id.title_name);
mWebView = findViewById(R.id.mWebView);
-// mWebView.setWebViewClient(new WebViewClient());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.setWebChromeClient(new WebChromeClient() {
@@ -76,46 +79,46 @@ public class WebViewUtilsActivity extends AppCompatActivity {
private void showWebViewTitle(String mWebViewUrl) {
switch (mWebViewUrl) {
case MSLinkUtils.ME_STAR_URL:
- mToolbar.setTitle(R.string.me_up_title);
+ titleName.setText(R.string.me_up_title);
break;
case MSLinkUtils.BASE_URL:
- mToolbar.setTitle(R.string.me_official_title);
+ titleName.setText(R.string.me_official_title);
break;
case MSLinkUtils.ME_CODE_URL:
- mToolbar.setTitle(R.string.me_official_code_title);
+ titleName.setText(R.string.me_official_code_title);
break;
case MSLinkUtils.ME_HELP_URL:
- mToolbar.setTitle(R.string.me_qa_title);
+ titleName.setText(R.string.me_qa_title);
break;
case MSLinkUtils.COLLEGE_QUICK_APP:
- mToolbar.setTitle(R.string.title_college_broken_side);
+ titleName.setText(R.string.title_college_broken_side);
break;
case MSLinkUtils.COLLEGE_MAIN_FAQ:
- mToolbar.setTitle(R.string.title_college_faq);
+ titleName.setText(R.string.title_college_faq);
break;
case MSLinkUtils.COLLEGE_MAIN_ASK:
- mToolbar.setTitle(R.string.title_college_forum);
+ titleName.setText(R.string.title_college_forum);
break;
case MSLinkUtils.COLLEGE_MAIN_GATE:
- mToolbar.setTitle(R.string.college_quick_title);
+ titleName.setText(R.string.college_quick_title);
break;
case MSLinkUtils.COLLEGE_MAIN_CLOUD:
- mToolbar.setTitle(R.string.title_college_one_hour);
+ titleName.setText(R.string.title_college_one_hour);
break;
case MSLinkUtils.COLLEGE_QUICK_EXECUTE:
- mToolbar.setTitle(R.string.title_college_perform);
+ titleName.setText(R.string.title_college_perform);
break;
case MSLinkUtils.COLLEGE_QUICK_VIDEO:
- mToolbar.setTitle(R.string.title_college_video);
+ titleName.setText(R.string.title_college_video);
break;
case MSLinkUtils.COLLEGE_QUICK_TRAIN:
- mToolbar.setTitle(R.string.title_college_training);
+ titleName.setText(R.string.title_college_training);
break;
case MSLinkUtils.USER_PRIVACY_RULES:
- mToolbar.setTitle(R.string.me_user_agreements);
+ titleName.setText(R.string.me_user_agreements);
break;
default:
- mToolbar.setTitle(R.string.me_official_title);
+ titleName.setText(R.string.me_official_title);
break;
}
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/guide_pages.png b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/guide_pages.png
index ff46ec2f70d8b5b4e830535a0992954de94c14d5..f6ac25c7198e7d3d929ff53c5f9a839a7eb08c18 100644
Binary files a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/guide_pages.png and b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/guide_pages.png differ
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/mind_spore.png b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/mind_spore.png
new file mode 100644
index 0000000000000000000000000000000000000000..cba37ed57de970b43139b11f91eae7cff1ea33df
Binary files /dev/null and b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-hdpi/mind_spore.png differ
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/logo_splash.png b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/logo_splash.png
index 8d5603b3cbc4db6945811dfe6fdc122792c38b21..26daef9dcedde8cea212a6f0c36011b390faa6cc 100644
Binary files a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/logo_splash.png and b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/logo_splash.png differ
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_my_qr_code.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_my_qr_code.xml
index 092684e0293962487194163d28ac66f28444695c..fbfd44d8cbbc23913707237bce084c4f705269ef 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_my_qr_code.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_my_qr_code.xml
@@ -1,31 +1,22 @@
+ tools:context=".ui.me.MyQRCodeActivity"
+ tools:ignore="ResAuto">
-
-
-
+ android:layout_height="wrap_content"
+ title:iconLeftBlack="@drawable/icon_back"
+ title:iconMore="@drawable/icon_more"
+ title:nameTitle="@string/me_official_title" />
-
@@ -40,10 +36,10 @@
+ tools:context=".ui.webview.WebViewUtilsActivity"
+ tools:ignore="ResAuto">
-
-
-
+ android:layout_height="wrap_content"
+ title:iconLeftBlack="@drawable/icon_back" />
-
-
-
-
+ android:layout_height="52dp"
+ android:gravity="center_vertical">
+
+
+
+
-
+
-
+
-
+
-
+
-
+
+
+
+
-
\ No newline at end of file
+
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/attrs.xml b/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/attrs.xml
index 17488fff9d999cc26ee7055121028ccad9b735ad..eb3a98403117cca1d05796ab1431d011a8594301 100644
--- a/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/attrs.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/attrs.xml
@@ -1,11 +1,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/colors.xml b/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/colors.xml
index 801ede1d51b38448031f7d2215fc34d9e0f7fb4e..358c0613a39b807399285be45b0e2acd95038123 100644
--- a/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/colors.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/values/colors.xml
@@ -39,6 +39,6 @@
#666666
#e4e4e4
-
+ #F0F0F0
#33999999
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/gesturerecognition/StillHandGestureAnalyseActivity.java b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/gesturerecognition/StillHandGestureAnalyseActivity.java
index 33d484766e012d6a13b6a7a2730bbad4412f5836..2dbc1fbc6596d9dc0f058c193e913e6d81200447 100644
--- a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/gesturerecognition/StillHandGestureAnalyseActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/gesturerecognition/StillHandGestureAnalyseActivity.java
@@ -43,6 +43,7 @@ import com.huawei.hms.mlsdk.gesture.MLGesture;
import com.huawei.hms.mlsdk.gesture.MLGestureAnalyzer;
import com.huawei.hms.mlsdk.gesture.MLGestureAnalyzerFactory;
import com.huawei.hms.mlsdk.gesture.MLGestureAnalyzerSetting;
+import com.mindspore.common.utils.AppTitleUtils;
import com.mindspore.hms.BitmapUtils;
import com.mindspore.hms.R;
import com.mindspore.hms.camera.GraphicOverlay;
@@ -73,6 +74,7 @@ public class StillHandGestureAnalyseActivity extends AppCompatActivity {
private boolean isLandScape;
private MLGestureAnalyzer mAnalyzer;
private MLFrame frame;
+ private AppTitleUtils appTitle;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -85,9 +87,8 @@ public class StillHandGestureAnalyseActivity extends AppCompatActivity {
mGraphicOverlay = findViewById(R.id.skeleton_previewOverlay);
imgPreview = findViewById(R.id.img_origin);
textOriginImage = findViewById(R.id.tv_image);
- Toolbar mToolbar = findViewById(R.id.activity_toolbar);
- setSupportActionBar(mToolbar);
- mToolbar.setNavigationOnClickListener(view -> finish());
+ appTitle = findViewById(R.id.activity_toolbar);
+ appTitle.findViewById(R.id.title_black).setOnClickListener(view -> finish());
}
public void onClickPhoto(View view) {
diff --git a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/textrecognition/TextRecognitionActivity.java b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/textrecognition/TextRecognitionActivity.java
index 8efab294281259afd7a63b1f0f994cd207973098..f5c634fe5be18437daf17fbb6bc236b813906396 100644
--- a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/textrecognition/TextRecognitionActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/textrecognition/TextRecognitionActivity.java
@@ -48,6 +48,7 @@ import com.huawei.hms.mlsdk.common.MLFrame;
import com.huawei.hms.mlsdk.text.MLLocalTextSetting;
import com.huawei.hms.mlsdk.text.MLText;
import com.huawei.hms.mlsdk.text.MLTextAnalyzer;
+import com.mindspore.common.utils.AppTitleUtils;
import com.mindspore.hms.BitmapUtils;
import com.mindspore.hms.R;
@@ -78,6 +79,7 @@ public class TextRecognitionActivity extends AppCompatActivity {
private Integer maxWidthOfImage;
private Integer maxHeightOfImage;
private boolean isLandScape;
+ private AppTitleUtils appTitle;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -97,8 +99,8 @@ public class TextRecognitionActivity extends AppCompatActivity {
analyzer = MLAnalyzerFactory.getInstance().getLocalTextAnalyzer(setting);
imgPreview = findViewById(R.id.img_origin);
textOriginImage = findViewById(R.id.tv_image);
- Toolbar mToolbar = findViewById(R.id.segmentation_toolbar);
- mToolbar.setNavigationOnClickListener(view -> finish());
+ appTitle = findViewById(R.id.segmentation_toolbar);
+ appTitle.findViewById(R.id.title_black).setOnClickListener(view -> finish());
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/texttranslation/TextTranslationActivity.java b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/texttranslation/TextTranslationActivity.java
index 205e555567f4156b2237534ea0ad98349cc30c8c..2cefd415e4abd8f1f98b20236dcaf8d95532df99 100644
--- a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/texttranslation/TextTranslationActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/java/com/mindspore/hms/texttranslation/TextTranslationActivity.java
@@ -55,6 +55,7 @@ import com.huawei.hms.mlsdk.translate.MLTranslatorFactory;
import com.huawei.hms.mlsdk.translate.cloud.MLRemoteTranslateSetting;
import com.huawei.hms.mlsdk.translate.cloud.MLRemoteTranslator;
import com.mindspore.common.sp.Preferences;
+import com.mindspore.common.utils.AppTitleUtils;
import com.mindspore.common.utils.StringUtils;
import com.mindspore.hms.BitmapUtils;
import com.mindspore.hms.R;
@@ -101,8 +102,8 @@ public class TextTranslationActivity extends AppCompatActivity {
}
private void init() {
- Toolbar mToolbar = findViewById(R.id.text_online_activity_toolbar);
- mToolbar.setNavigationOnClickListener(view -> finish());
+ AppTitleUtils appTitle = findViewById(R.id.text_online_activity_toolbar);
+ appTitle.findViewById(R.id.title_black).setOnClickListener(view -> finish());
mEditText = findViewById(R.id.text_edit);
mEditText.setMovementMethod(ScrollingMovementMethod.getInstance());
mTextView = findViewById(R.id.text_view);
diff --git a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/res/layout/activity_gesture_recognition.xml b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/res/layout/activity_gesture_recognition.xml
index 2cc3fc1f259df9b1b79ea461f7f842bdd2f54f08..11c9e814268770e393210451e7aa20aa73486cfb 100644
--- a/model_zoo/official/lite/MindSpore_inhand/hms/src/main/res/layout/activity_gesture_recognition.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/hms/src/main/res/layout/activity_gesture_recognition.xml
@@ -1,33 +1,23 @@
+ tools:context=".gesturerecognition.StillHandGestureAnalyseActivity"
+ tools:ignore="ResAuto">
-
+ />
-
-
-
+ android:layout_margin="50dp" />
+ android:textSize="16sp"
+ app:drawableTopCompat="@drawable/icon_style" />