+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/comment/FragmentFactory.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/comment/FragmentFactory.java
index 4cbf7e5b84..7bfe1f8e11 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/comment/FragmentFactory.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/comment/FragmentFactory.java
@@ -32,8 +32,6 @@ public class FragmentFactory {
private FragmentFactory() {
}
-
-
public static FragmentFactory getInstance() {
if (mInstance == null) {
synchronized (FragmentFactory.class) {
@@ -45,7 +43,6 @@ public class FragmentFactory {
return mInstance;
}
-
public ExperienceFragment getExperienceFragment() {
if (mExperienceFragment == null) {
synchronized (FragmentFactory.class) {
@@ -57,7 +54,6 @@ public class FragmentFactory {
return mExperienceFragment;
}
-
public CollegeFragment getCollegeFragment() {
if (mCollegeFragment == null) {
synchronized (FragmentFactory.class) {
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/college/adapter/CollegeItemAdapter.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/college/adapter/CollegeItemAdapter.java
index 2ea36d9b22..1bb91ab89d 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/college/adapter/CollegeItemAdapter.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/college/adapter/CollegeItemAdapter.java
@@ -1,3 +1,18 @@
+/**
+ * Copyright 2021 Huawei Technologies Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.mindspore.himindspore.ui.college.adapter;
import android.content.SharedPreferences;
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/ExperienceFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/ExperienceFragment.java
index ef5ad228bf..c321ce24ea 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/ExperienceFragment.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/ExperienceFragment.java
@@ -25,7 +25,6 @@ import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
-import com.google.android.material.tabs.TabLayout;
import com.mindspore.common.base.adapter.BasePagerAdapter;
import com.mindspore.himindspore.R;
import com.mindspore.himindspore.comment.FragmentFactory;
@@ -37,7 +36,6 @@ import java.util.List;
public class ExperienceFragment extends Fragment {
- private TabLayout tabLayout;
private ViewPager vpContent;
@Override
@@ -54,7 +52,6 @@ public class ExperienceFragment extends Fragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
- tabLayout = view.findViewById(R.id.tab_layout);
vpContent = view.findViewById(R.id.vp_content);
}
@@ -72,8 +69,6 @@ public class ExperienceFragment extends Fragment {
BasePagerAdapter adapter = new BasePagerAdapter(getChildFragmentManager(), fragmentList, Arrays.asList(categoryName));
vpContent.setAdapter(adapter);
- tabLayout.setupWithViewPager(vpContent);
- tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
vpContent.setOffscreenPageLimit(categoryName.length);
}
}
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/VisionFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/VisionFragment.java
index b2074e3d60..4a807f2c20 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/VisionFragment.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/experience/VisionFragment.java
@@ -27,6 +27,8 @@ import androidx.fragment.app.Fragment;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
+import com.mindspore.common.config.MSLinkUtils;
+import com.mindspore.common.utils.Utils;
import com.mindspore.himindspore.R;
/**
@@ -70,6 +72,7 @@ public class VisionFragment extends Fragment implements View.OnClickListener {
view.findViewById(R.id.btn_image).setOnClickListener(this); //onClickImage
view.findViewById(R.id.btn_image_garbage).setOnClickListener(this); //onClickGarbage
view.findViewById(R.id.btn_scene).setOnClickListener(this); //onClickSceneDetection
+ view.findViewById(R.id.btn_image_Intelligent_poetry).setOnClickListener(this); //onClickIntelligentPoetry
}
@@ -104,6 +107,9 @@ public class VisionFragment extends Fragment implements View.OnClickListener {
ARouter.getInstance().build("/imageobject/ImageCameraActivity")
.withInt("OPEN_TYPE", 3).navigation();
break;
+ case R.id.btn_image_Intelligent_poetry:
+ Utils.openBrowser(getActivity(), MSLinkUtils.HELP_INTELLIGENT_POETRY);
+ break;
}
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/guide/SplashActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/guide/SplashActivity.java
index 3e038b0a27..924fc8db64 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/guide/SplashActivity.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/guide/SplashActivity.java
@@ -17,20 +17,34 @@ package com.mindspore.himindspore.ui.guide;
import android.Manifest;
import android.content.Intent;
+import android.content.SharedPreferences;
+import android.graphics.Color;
import android.net.Uri;
-import android.os.Handler;
+import android.preference.PreferenceManager;
import android.provider.Settings;
-import android.util.Log;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.TextPaint;
+import android.text.method.LinkMovementMethod;
+import android.text.style.ClickableSpan;
+import android.view.Gravity;
import android.view.KeyEvent;
+import android.view.LayoutInflater;
import android.view.View;
+import android.view.WindowManager;
+import android.widget.PopupWindow;
+import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
+import com.mindspore.common.sp.Preferences;
+import com.mindspore.common.utils.Utils;
import com.mindspore.customview.countdown.CountDownView;
import com.mindspore.himindspore.R;
import com.mindspore.himindspore.base.BaseActivity;
import com.mindspore.himindspore.ui.main.MainActivity;
+import com.mindspore.himindspore.ui.main.PrivacyPolicyActivity;
import java.util.List;
@@ -38,6 +52,7 @@ import pub.devrel.easypermissions.AfterPermissionGranted;
import pub.devrel.easypermissions.AppSettingsDialog;
import pub.devrel.easypermissions.EasyPermissions;
+
public class SplashActivity extends BaseActivity implements EasyPermissions.PermissionCallbacks {
private static final String TAG = "SplashActivity";
@@ -46,21 +61,29 @@ public class SplashActivity extends BaseActivity implements EasyPermissions.Perm
Manifest.permission.READ_PHONE_STATE, Manifest.permission.CAMERA};
private static final int REQUEST_PERMISSION = 1;
+ private SharedPreferences prefs;
+
private CountDownView cdvTime;
+ private boolean isCheckPrivacy = false;
+ private View mContentView;
+ private TextView mTv_protocol;
+ private PopupWindow mPopupW;
+
@Override
protected void init() {
cdvTime = findViewById(R.id.cdv_time);
+ prefs = PreferenceManager.getDefaultSharedPreferences(Utils.getApp());
initCountDownView();
}
private void initCountDownView() {
cdvTime.setTime(3);
cdvTime.start();
- cdvTime.setOnLoadingFinishListener(() -> startPermissionsTask());
+ cdvTime.setOnLoadingFinishListener(() -> check());
cdvTime.setOnClickListener(view -> {
cdvTime.stop();
- startPermissionsTask();
+ check();
});
}
@@ -149,6 +172,84 @@ public class SplashActivity extends BaseActivity implements EasyPermissions.Perm
finish();
}
+ private void check() {
+ isCheckPrivacy = prefs.getBoolean(Preferences.KEY_PRIVACY, false);
+ if (!isCheckPrivacy) {
+ showPrivacy();
+ } else {
+ startPermissionsTask();
+ }
+ }
+
+ /**
+ * 显示用户协议和隐私政策
+ */
+ private void showPrivacy() {
+ mContentView = LayoutInflater.from(SplashActivity.this).inflate(R.layout.popup_user,
+ null, false);
+ mPopupW = new PopupWindow(mContentView, WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT, false);
+ mPopupW.showAtLocation(getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+ mPopupW.setContentView(mContentView);
+ mPopupW.setTouchable(true);
+ mPopupW.setOutsideTouchable(false);
+ mPopupW.showAsDropDown(mContentView, 0, 0);
+ backgroundAlpha(0.4f);
+ mTv_protocol = mContentView.findViewById(R.id.tv_protocol);
+ mTv_protocol.setText(getClickableSpan());
+ mTv_protocol.setMovementMethod(LinkMovementMethod.getInstance());
+ mTv_protocol.setHighlightColor(Color.TRANSPARENT);
+ mContentView.findViewById(R.id.pop_agree).setOnClickListener(v -> {
+ prefs.edit().putBoolean(Preferences.KEY_PRIVACY, true).apply();
+ mPopupW.dismiss();
+ startPermissionsTask();
+ });
+ mContentView.findViewById(R.id.pop_Disagree).setOnClickListener(v -> {
+ prefs.edit().putBoolean(Preferences.KEY_PRIVACY, false).apply();
+ System.exit(0);
+ });
+ }
+
+ private void backgroundAlpha(float f) {
+ WindowManager.LayoutParams lp = getWindow().getAttributes();
+ lp.alpha = f;
+ getWindow().setAttributes(lp);
+ }
+
+ private CharSequence getClickableSpan() {
+ View.OnClickListener l = v -> {
+ startActivity(new Intent(SplashActivity.this, PrivacyPolicyActivity.class));
+ };
+ String User_Agreement = getResources().getString(R.string.me_privacy);
+ SpannableString spanableInfo = new SpannableString(User_Agreement);
+ String protocol = getResources().getString(R.string.me_user_agreement);
+ int start = User_Agreement.indexOf(protocol);
+ int end = start + protocol.length();
+ spanableInfo.setSpan(new Clickable(l), start, end, Spanned.SPAN_MARK_MARK);
+ return spanableInfo;
+ }
+
+ class Clickable extends ClickableSpan implements View.OnClickListener {
+ private final View.OnClickListener mListener;
+
+ public Clickable(View.OnClickListener l) {
+ mListener = l;
+ }
+
+
+ @Override
+ public void onClick(View v) {
+ mListener.onClick(v);
+ }
+
+
+ @Override
+ public void updateDrawState(TextPaint ds) {
+ super.updateDrawState(ds);
+ ds.setColor(getResources().getColor(R.color.main_tab_text_checked));
+ ds.setUnderlineText(false);
+ }
+
+ }
@Override
protected void onDestroy() {
@@ -156,5 +257,9 @@ public class SplashActivity extends BaseActivity implements EasyPermissions.Perm
if (cdvTime != null && cdvTime.isShown()) {
cdvTime.stop();
}
+ if (mPopupW != null && mPopupW.isShowing()) {
+ mPopupW.dismiss();
+ mPopupW = null;
+ }
}
}
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainContract.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainContract.java
index 89bdc0dc51..e45f0e49bd 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainContract.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainContract.java
@@ -15,7 +15,6 @@
*/
package com.mindspore.himindspore.ui.main;
-
import com.mindspore.customview.tablayout.listener.CustomTabEntity;
import com.mindspore.himindspore.net.FileDownLoadObserver;
import com.mindspore.himindspore.net.UpdateInfoBean;
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/PrivacyPolicyActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/PrivacyPolicyActivity.java
new file mode 100644
index 0000000000..efa5ec0d91
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/PrivacyPolicyActivity.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright 2021 Huawei Technologies Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.mindspore.himindspore.ui.main;
+
+import android.os.Bundle;
+import android.view.View;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.mindspore.common.config.MSLinkUtils;
+import com.mindspore.himindspore.R;
+
+public class PrivacyPolicyActivity extends AppCompatActivity {
+
+ private static final String TAG = PrivacyPolicyActivity.class.getSimpleName();
+
+ private WebView mWebView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_privacy_policy);
+ initView();
+ }
+
+ private void initView() {
+ findViewById(R.id.w_back).setOnClickListener(v -> finish());
+ mWebView = findViewById(R.id.mWebView);
+ WebSettings wSet = mWebView.getSettings();
+ wSet.setJavaScriptEnabled(true);
+ mWebView.loadUrl(MSLinkUtils.USER_PRIVACY_RULES);
+
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ mWebView.removeAllViews();
+ mWebView.destroy();
+ }
+}
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MeFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MeFragment.java
index 6089224851..011cee02e5 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MeFragment.java
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/MeFragment.java
@@ -31,6 +31,7 @@ import androidx.fragment.app.Fragment;
import com.mindspore.common.config.MSLinkUtils;
import com.mindspore.common.utils.Utils;
import com.mindspore.himindspore.R;
+import com.mindspore.himindspore.ui.main.PrivacyPolicyActivity;
public class MeFragment extends Fragment implements View.OnClickListener {
@@ -55,6 +56,7 @@ public class MeFragment extends Fragment implements View.OnClickListener {
view.findViewById(R.id.rl_me_official_code).setOnClickListener(this);
view.findViewById(R.id.rl_me_qa).setOnClickListener(this);
view.findViewById(R.id.rl_me_version).setOnClickListener(this);
+ view.findViewById(R.id.me_user_protocol).setOnClickListener(this);
showPackageInfo();
}
@@ -97,6 +99,9 @@ public class MeFragment extends Fragment implements View.OnClickListener {
case R.id.rl_me_qa:
Utils.openBrowser(getActivity(), MSLinkUtils.ME_HELP_URL);
break;
+ case R.id.me_user_protocol:
+ startActivity(new Intent(getContext(), PrivacyPolicyActivity.class));
+ break;
}
}
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/view/LeftImageRightTextButton.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/view/LeftImageRightTextButton.java
new file mode 100644
index 0000000000..d1c83d96f7
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/view/LeftImageRightTextButton.java
@@ -0,0 +1,22 @@
+package com.mindspore.himindspore.ui.view;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.RelativeLayout;
+import androidx.annotation.Nullable;
+
+import com.mindspore.himindspore.R;
+
+public class LeftImageRightTextButton extends RelativeLayout {
+
+ public LeftImageRightTextButton(Context context)
+ {
+ super(context, null);
+ }
+
+ public LeftImageRightTextButton(Context context, @Nullable AttributeSet attrs) {
+ super(context, attrs);
+ LayoutInflater.from(context).inflate(R.layout.btn_left_iamge_right_text, this,true);
+ }
+}
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/back.png b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable-xxhdpi/back.png
new file mode 100644
index 0000000000000000000000000000000000000000..83a55c8ea020eb2bd3c498acd22e7d5cb833cab7
GIT binary patch
literal 325
zcmV-L0lNN)P)-ru?RoO8RmN~I!WsZAGc4K%2o7fJsR(J_J
z*uz@7*bL8MA15K#-&S}6hq%Hbei}C$@hDDli+OzizcR&TT;MUJ@zt!5JO*%y56t4V
z8H6H^(19sDwSwu%Z|KHQ45oMiHst^$$41NDRXZs(23p~ejs+N
z4P)u5h+n(atb!$0ja9=&t5*98YFR%b_%#@W*0l_F`4Z?KcbE*!3=BATvcX#uDh9clYU;=O%$N(M;)tL|iUk?T54TJ#4fa!MoJ_cq1lX(jv
z97I^QgO33t5C;4MSY5K7I{-om2Tn?PXQ(H)`W(^h^OB0qdodr|fNf>^GL};3MD^5DAPx8FqPAXU@1wLWl`&U-1wi
zrHn!u_ED9Um8@8?f|{BdUcY|L&Ye4Z%zp0dSZi#Tt+8sYv6l-W=Gfc$^f@jK(Dd0?
z(hv6oV5$3;G&o2pX90JB@f8&nq^73Q+}v#AgM)*6zCL#0BH0?FJv1oSVnbgM^iCX^
z`{4k>UF?4=NGX$mzXBhWm6ef|l|_4dyN&nv_h-wNEj^om8)R%D_8Xo^j30QwM=wYz
z_W&yZ_UzfizJ2?8@gql$#AGrN5fK5304eso5aLI`XduAFDYQa}aG(RI(=09M{uEdX
zj0B>9QC7p_cfJ`
zVlWs0DuD!`&d%Q&;P*IAU03+h7uXN@J0X7sJO}=3{d;!+XH$TDV9o$`E+M7-6R@zo
zy`7w#94aa*dhr^KhK(CH_6YDC_!K(gP{`~m>t-vfH#3LzXUo#)znUr#`
z8!?9gAGw_qgb*%EODUzhL(kc#R8$lrMvUO<)vIJ>Wzo{o;$S~%(j<&VBYu8WOvbt_t}*1=w{*RyNaE=G?Y&DpbO*}QqPYO#4mgrJ}x_U_$FKtKRDZrq@_
zxR|?l@6y`ZicY8F=+UE;mX>n(@L>P~0|O~6EM(lcaa_E3k=)!|RpaYhHmiaS8#WLS
z5Ws~C7i{(ak|j%6v}h5&zP_wlwTgN3=AqN+7&B%JCX)%hUeERG*Hsq)yf6|XBO@^w
z3|K4{wr$%+Y-}vMckjl}&kulw3m39@@nVvalIZH{qOh=#h=>So-MU3~c6P7zf?800
zB*ezX0&wQc87vkH>(;Ha2>>vD{CMWhol8eY2L%NM#Kpz&^yyP_a&oX(ENX`bcu|C^
zswzT4LU{c6F$oC?*uT~rHEI-N$BxBdFwoT0M0$EU4Gj$rzEVPfcQ&Xw0uV>}Tm4Gs0Tn6i-glj*Y
zJOR}bqgJc6UD$~eC+O_##A30Kn3za(bTr40AE&6Oh|bPV3JMB{j*jNRg9j8B7poPL
zOQzdEvl;15BSjoxHp}rcRv-z|EUC*|ces)5ViFpqdEJpFc;h*Ao&F
z!poO0iHV6}+O%oRoH>)gz(7C|<@D*(6c-nx*XucX@+1Ij)~vy7HuvY=qfkwRs;VmD
zTQ13guCW2ZeuP5L&5!5PqJpr$YpjOH2
z2@K~1yeL9fR~G;s9UcAhfUUwDtdF6>Ya$#xc#xKs7LFV_;*_tbsGzQ{j=H)!&Ye3q
zBp*YC*WNZ46%|obROFI3o6Rg(u;8tH3>CvUfngDVVG)2~5dhC8#y3FofL7|lX}?8(
z@U#ejmr^=yr}Gws5SIsg%4R0+>O~C5q=_snCXVy4^dj;-Zk2RXd%QN
zH*BW>ZN9)Iz|fanwgZEe`^@@r2fuaGPEGs{_#;YZ+h~+_-oEGrEGRcEPqVb3TL=6C
zm<_D4GyMKd+kXn~md}(xMO7hba>>15ATNqXafEAj
z8bIwuxDI^N$9U?p9ZYh;0T`u}ZmIo_Z~)~-*`u32-L5tfO4id2%tuKo&rsTU(}8cT
z^W2{M7Wg%=Ri)rP0x9KFl;1*JL3wK22Np;v&)D1j52nMjcmGS0hyVZp07*qoM6N<$
Ef;~svI{*Lx
literal 0
HcmV?d00001
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_blue.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_blue.xml
new file mode 100644
index 0000000000..fe4dff94b8
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_blue.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_no.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_no.xml
new file mode 100644
index 0000000000..1c65c74001
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_no.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_white.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_white.xml
new file mode 100644
index 0000000000..8c815c1661
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/drawable/user_protocol_white.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_main.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_main.xml
index 15f853bae7..972a4294a2 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_main.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_main.xml
@@ -1,23 +1,13 @@
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_privacy_policy.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_privacy_policy.xml
new file mode 100644
index 0000000000..04e18167d7
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/activity_privacy_policy.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/btn_left_iamge_right_text.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/btn_left_iamge_right_text.xml
new file mode 100644
index 0000000000..10d9ab3e23
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/btn_left_iamge_right_text.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_experience.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_experience.xml
index c8f560b267..0c8605b0b9 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_experience.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_experience.xml
@@ -1,6 +1,5 @@
-
+ android:textSize="18sp"
+ android:visibility="gone" />
-
-
-
-
+ android:layout_height="match_parent">
+ android:textSize="17sp"
+ android:textStyle="bold" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
-
-
+ android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_vision.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_vision.xml
index cc45f112de..1cf12b1dd3 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_vision.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_vision.xml
@@ -9,21 +9,48 @@
+ tools:ignore="MissingConstraints">
+
+
+
+
+
@@ -180,6 +208,55 @@
app:layout_constraintEnd_toEndOf="@+id/btn_image"
app:layout_constraintWidth_percent="0.44" />
+
+
+
+
+
+
+
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/popup_user.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/popup_user.xml
new file mode 100644
index 0000000000..6c783abffa
--- /dev/null
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/popup_user.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-en/strings.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-en/strings.xml
index 8b2a11963f..442fdd54bf 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-en/strings.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-en/strings.xml
@@ -13,6 +13,8 @@
Upgrade to a new versionImage ClassificationGarbage Classification
+ Intelligent poetry
+ NEWPhoto DetectionCamera DetectionPoseNet
@@ -32,6 +34,7 @@
MeComputer Vision
+ Speech Semantic TechnologyExperience CenterInvite you to explore a new generation of ALL-Scenario AI Computing Framework
@@ -41,12 +44,20 @@
ShareLikeFeedback
+ agree
+ Disagree and Exit
+ User Agreement and Privacy Policy
+ User Agreement and Privacy Policy: MindSpore_inhand APP respects and protects the personal privacy of all users.
+ In order to provide you with more accurate and personalized services, we will use and disclose your personal information in accordance with
+ the "User Agreement and Privacy Policy". Besides, we will treat this information with a high degree of diligence and prudence. Except as
+ otherwise provided in this privacy policy, we will not disclose or provide this information to third parties without your permissions.
+ We will update this privacy policy from time to time. When you agree to our service use agreement, you are deemed to have agreed to
+ the entire content of this privacy policy. This privacy policy is an integral part of our service use agreement.VersionOfficial WebsiteOfficial CodeA one-stop platform of collaborative learning, demonstrating, and experiencing for AI users.
-
MindSpore SummaryA One-Hour Trip to MindSporeQuick Start
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-zh/strings.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-zh/strings.xml
index 3b2b7817ec..f5f647a5a9 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-zh/strings.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values-zh/strings.xml
@@ -13,6 +13,8 @@
"请升级新版本"图像分类垃圾分类
+ 智能写诗
+ NEW照片检测视频检测 骨骼检测
@@ -31,6 +33,7 @@
我的视觉图像技术
+ 语音语义技术体验中心新一代全场景AI计算框架,邀您马上体验
@@ -43,6 +46,14 @@
版本号官方网站官方代码仓
+ 同意
+ 不同意并退出
+ 《用户协议和隐私政策》
+ 用户协议和隐私政策
+ MindSpore 掌中宝尊重并保护所有使用服务用户的个人隐私权。为了给你提供更准确、更有个性化的服务,我们会按照
+ 《用户协议和隐私政策》规定使用和披露您的个人信息。但我们将以高度的勤勉、审慎义务对待这些信息。除本隐私政策另有规定外,在未征得您实
+ 现许可的情况下,我们不会将这些信息对外披露或向第三方提供。我们会不时更新本隐私政策。您在同意我们服务使用协议之时,即视为您
+ 已经同意本隐私政策全部内容。本隐私政策属于我们服务使用协议不可分割的一部分。AI爱好者的一站式协同学习、演示、体验平台MindSpore简介
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/colors.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/colors.xml
index bc87cd107c..61393f51d7 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/colors.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/colors.xml
@@ -15,11 +15,13 @@
#Eff3ff#333333
+ #999999#666666#6DA7FF#F8E71C#FF844D#66B50A
+ #e60012#dbdbdb#6189ff
diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/strings.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/strings.xml
index e2b975307b..f0fb1c3dac 100644
--- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/strings.xml
+++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/values/strings.xml
@@ -12,6 +12,8 @@
"请升级新版本"Image ClassificationGarbage Classification
+ Intelligent poetry
+ NEWPhoto DetectionCamera DetectionPoseNet
@@ -26,7 +28,6 @@
ShareMindSpore掌中宝:AI爱好者的一站式协同学习、演示、体验平台\tAI爱好者的一站式协同学习、演示、体验平台
-
秒体验
@@ -34,6 +35,7 @@
我的视觉图像技术
+ 语音语义技术体验中心新一代全场景AI计算框架,邀您马上体验
@@ -47,7 +49,14 @@
官方代码仓问题反馈版本号
-
+ 同意
+ 不同意并退出
+ 《用户协议和隐私政策》
+ 用户协议和隐私政策
+ MindSpore 掌中宝尊重并保护所有使用服务用户的个人隐私权。为了给你提供更准确、更有个
+ 性化的服务,我们会按照《用户协议和隐私政策》规定使用和披露您的个人信息。但我们将以高度的勤勉、审慎义务对待这些信息。除本隐私
+ 政策另有规定外,在未征得您实现许可的情况下,我们不会将这些信息对外披露或向第三方提供。我们会不时更新本隐私政策。您在同意我们
+ 服务使用协议之时,即视为您已经同意本隐私政策全部内容。本隐私政策属于我们服务使用协议不可分割的一部分。MindSpore简介1小时体验端云协同全流程开发快速入门
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/config/MSLinkUtils.java b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/config/MSLinkUtils.java
index efaff18dbf..038cab655a 100644
--- a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/config/MSLinkUtils.java
+++ b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/config/MSLinkUtils.java
@@ -11,7 +11,8 @@ public class MSLinkUtils {
public static final String HELP_STYLE_TRANSFER = BASE_DOC_URL + "/style_transfer_lite.html";
public static final String HELP_IMAGE_SEGMENTATION = BASE_DOC_URL + "/image_segmentation_lite.html";
public static final String HELP_SCENE_DETECTION = BASE_DOC_URL + "/scene_detection_lite.html";
-
+ public static final String HELP_INTELLIGENT_POETRY = BASE_URL + "/resources/tech/nlp/poetry";
+ public static final String USER_PRIVACY_RULES = "file:///android_asset/privacy.html";
public static final String COLLEGE_MAIN_CLOUD = BASE_URL + "/news/newschildren?id=354";
public static final String COLLEGE_QUICK_TRAIN = BASE_URL + "/tutorial/training/zh-CN/master/quick_start/quick_start.html";
public static final String COLLEGE_QUICK_EXECUTE = BASE_URL + "/tutorial/inference/zh-CN/master/multi_platform_inference.html";
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/sp/Preferences.java b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/sp/Preferences.java
index a8625347e0..d53500a70f 100644
--- a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/sp/Preferences.java
+++ b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/sp/Preferences.java
@@ -11,6 +11,6 @@ public final class Preferences {
public static final String KEY_COLLEGE_VIDEO = "preferences_college_video";
public static final String KEY_COLLEGE_FAQ = "preferences_college_faq";
public static final String KEY_COLLEGE_ASK = "preferences_college_ask";
-
+ public static final String KEY_PRIVACY = "preferences_privacy";
public static final String[] KEY_COLLEGE_QUICK_ARRAY = new String[]{KEY_COLLEGE_TRAIN,KEY_COLLEGE_EXECUTE,KEY_COLLEGE_APP,KEY_COLLEGE_VIDEO};
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/utils/Utils.java b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/utils/Utils.java
index 8a11fc0f93..23b0d1dbbd 100644
--- a/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/utils/Utils.java
+++ b/model_zoo/official/lite/MindSpore_inhand/common/src/main/java/com/mindspore/common/utils/Utils.java
@@ -1,3 +1,18 @@
+/**
+ * Copyright 2021 Huawei Technologies Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.mindspore.common.utils;
import android.annotation.SuppressLint;
@@ -63,28 +78,17 @@ public final class Utils {
throw new UnsupportedOperationException("u can't instantiate me...");
}
- /**
- * 初始化工具类
- *
- * @param app 应用
- */
public static void init(@NonNull final Application app) {
Utils.sApplication = app;
app.registerActivityLifecycleCallbacks(mCallbacks);
}
- /**
- * 获取 Application
- *
- * @return Application
- */
public static Application getApp() {
if (sApplication != null) return sApplication;
throw new NullPointerException("u should init first");
}
private static void setTopActivityWeakRef(final Activity activity) {
-// if (activity.getClass() == PermissionUtils.PermissionActivity.class) return;
if (sTopActivityWeakRef == null || !activity.equals(sTopActivityWeakRef.get())) {
sTopActivityWeakRef = new WeakReference<>(activity);
}
diff --git a/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/drawable-xxhdpi/icon_style.png b/model_zoo/official/lite/MindSpore_inhand/common/src/main/res/drawable-xxhdpi/icon_style.png
new file mode 100644
index 0000000000000000000000000000000000000000..f79e235714deeca744af2d557134417d8071f6c9
GIT binary patch
literal 2775
zcmZ{mdpy&N8^^yhL+<1nLn0!p4vJP;GK`qqV#sB=UqZ~C@8mF-Lx!l-rj+|-$K703
z=eTxgsl!TGC6`PlHpNND`RDih=bS&D=Xt%J&*$~|_w&wnu(y&BJs=7IfCR?c!g231
z_ohZfXm8`PTT%c(^ghPoymNf{>P%AoR4jaGeeoMyQhI7WARaoX3oCaOd7#x;Y-^JJ
z(b