!13137 [MS][LITE]android add poetry and authority

From: @sishuikang
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhanghaibo5
pull/13137/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit b730069942

@ -7,8 +7,8 @@ android {
applicationId "com.mindspore.himindspore" applicationId "com.mindspore.himindspore"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 10 versionCode 11
versionName "1.2.3" versionName "1.2.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions { javaCompileOptions {

@ -23,6 +23,9 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
tools:replace="android:label"> tools:replace="android:label">
<activity
android:name=".ui.main.PrivacyPolicyActivity"
android:screenOrientation="portrait"></activity>
<activity <activity
android:name=".ui.main.MainActivity" android:name=".ui.main.MainActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"

File diff suppressed because one or more lines are too long

@ -32,8 +32,6 @@ public class FragmentFactory {
private FragmentFactory() { private FragmentFactory() {
} }
public static FragmentFactory getInstance() { public static FragmentFactory getInstance() {
if (mInstance == null) { if (mInstance == null) {
synchronized (FragmentFactory.class) { synchronized (FragmentFactory.class) {
@ -45,7 +43,6 @@ public class FragmentFactory {
return mInstance; return mInstance;
} }
public ExperienceFragment getExperienceFragment() { public ExperienceFragment getExperienceFragment() {
if (mExperienceFragment == null) { if (mExperienceFragment == null) {
synchronized (FragmentFactory.class) { synchronized (FragmentFactory.class) {
@ -57,7 +54,6 @@ public class FragmentFactory {
return mExperienceFragment; return mExperienceFragment;
} }
public CollegeFragment getCollegeFragment() { public CollegeFragment getCollegeFragment() {
if (mCollegeFragment == null) { if (mCollegeFragment == null) {
synchronized (FragmentFactory.class) { synchronized (FragmentFactory.class) {

@ -1,3 +1,18 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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; package com.mindspore.himindspore.ui.college.adapter;
import android.content.SharedPreferences; import android.content.SharedPreferences;

@ -25,7 +25,6 @@ import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager; import androidx.viewpager.widget.ViewPager;
import com.google.android.material.tabs.TabLayout;
import com.mindspore.common.base.adapter.BasePagerAdapter; import com.mindspore.common.base.adapter.BasePagerAdapter;
import com.mindspore.himindspore.R; import com.mindspore.himindspore.R;
import com.mindspore.himindspore.comment.FragmentFactory; import com.mindspore.himindspore.comment.FragmentFactory;
@ -37,7 +36,6 @@ import java.util.List;
public class ExperienceFragment extends Fragment { public class ExperienceFragment extends Fragment {
private TabLayout tabLayout;
private ViewPager vpContent; private ViewPager vpContent;
@Override @Override
@ -54,7 +52,6 @@ public class ExperienceFragment extends Fragment {
@Override @Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
tabLayout = view.findViewById(R.id.tab_layout);
vpContent = view.findViewById(R.id.vp_content); 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)); BasePagerAdapter adapter = new BasePagerAdapter(getChildFragmentManager(), fragmentList, Arrays.asList(categoryName));
vpContent.setAdapter(adapter); vpContent.setAdapter(adapter);
tabLayout.setupWithViewPager(vpContent);
tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
vpContent.setOffscreenPageLimit(categoryName.length); vpContent.setOffscreenPageLimit(categoryName.length);
} }
} }

@ -27,6 +27,8 @@ import androidx.fragment.app.Fragment;
import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.mindspore.common.config.MSLinkUtils;
import com.mindspore.common.utils.Utils;
import com.mindspore.himindspore.R; 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).setOnClickListener(this); //onClickImage
view.findViewById(R.id.btn_image_garbage).setOnClickListener(this); //onClickGarbage view.findViewById(R.id.btn_image_garbage).setOnClickListener(this); //onClickGarbage
view.findViewById(R.id.btn_scene).setOnClickListener(this); //onClickSceneDetection 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") ARouter.getInstance().build("/imageobject/ImageCameraActivity")
.withInt("OPEN_TYPE", 3).navigation(); .withInt("OPEN_TYPE", 3).navigation();
break; break;
case R.id.btn_image_Intelligent_poetry:
Utils.openBrowser(getActivity(), MSLinkUtils.HELP_INTELLIGENT_POETRY);
break;
} }
} }

@ -17,20 +17,34 @@ package com.mindspore.himindspore.ui.guide;
import android.Manifest; import android.Manifest;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri; import android.net.Uri;
import android.os.Handler; import android.preference.PreferenceManager;
import android.provider.Settings; 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.KeyEvent;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.WindowManager;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; 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.customview.countdown.CountDownView;
import com.mindspore.himindspore.R; import com.mindspore.himindspore.R;
import com.mindspore.himindspore.base.BaseActivity; import com.mindspore.himindspore.base.BaseActivity;
import com.mindspore.himindspore.ui.main.MainActivity; import com.mindspore.himindspore.ui.main.MainActivity;
import com.mindspore.himindspore.ui.main.PrivacyPolicyActivity;
import java.util.List; import java.util.List;
@ -38,6 +52,7 @@ import pub.devrel.easypermissions.AfterPermissionGranted;
import pub.devrel.easypermissions.AppSettingsDialog; import pub.devrel.easypermissions.AppSettingsDialog;
import pub.devrel.easypermissions.EasyPermissions; import pub.devrel.easypermissions.EasyPermissions;
public class SplashActivity extends BaseActivity implements EasyPermissions.PermissionCallbacks { public class SplashActivity extends BaseActivity implements EasyPermissions.PermissionCallbacks {
private static final String TAG = "SplashActivity"; 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}; Manifest.permission.READ_PHONE_STATE, Manifest.permission.CAMERA};
private static final int REQUEST_PERMISSION = 1; private static final int REQUEST_PERMISSION = 1;
private SharedPreferences prefs;
private CountDownView cdvTime; private CountDownView cdvTime;
private boolean isCheckPrivacy = false;
private View mContentView;
private TextView mTv_protocol;
private PopupWindow mPopupW;
@Override @Override
protected void init() { protected void init() {
cdvTime = findViewById(R.id.cdv_time); cdvTime = findViewById(R.id.cdv_time);
prefs = PreferenceManager.getDefaultSharedPreferences(Utils.getApp());
initCountDownView(); initCountDownView();
} }
private void initCountDownView() { private void initCountDownView() {
cdvTime.setTime(3); cdvTime.setTime(3);
cdvTime.start(); cdvTime.start();
cdvTime.setOnLoadingFinishListener(() -> startPermissionsTask()); cdvTime.setOnLoadingFinishListener(() -> check());
cdvTime.setOnClickListener(view -> { cdvTime.setOnClickListener(view -> {
cdvTime.stop(); cdvTime.stop();
startPermissionsTask(); check();
}); });
} }
@ -149,6 +172,84 @@ public class SplashActivity extends BaseActivity implements EasyPermissions.Perm
finish(); 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 @Override
protected void onDestroy() { protected void onDestroy() {
@ -156,5 +257,9 @@ public class SplashActivity extends BaseActivity implements EasyPermissions.Perm
if (cdvTime != null && cdvTime.isShown()) { if (cdvTime != null && cdvTime.isShown()) {
cdvTime.stop(); cdvTime.stop();
} }
if (mPopupW != null && mPopupW.isShowing()) {
mPopupW.dismiss();
mPopupW = null;
}
} }
} }

@ -15,7 +15,6 @@
*/ */
package com.mindspore.himindspore.ui.main; package com.mindspore.himindspore.ui.main;
import com.mindspore.customview.tablayout.listener.CustomTabEntity; import com.mindspore.customview.tablayout.listener.CustomTabEntity;
import com.mindspore.himindspore.net.FileDownLoadObserver; import com.mindspore.himindspore.net.FileDownLoadObserver;
import com.mindspore.himindspore.net.UpdateInfoBean; import com.mindspore.himindspore.net.UpdateInfoBean;

@ -0,0 +1,56 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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();
}
}

@ -31,6 +31,7 @@ import androidx.fragment.app.Fragment;
import com.mindspore.common.config.MSLinkUtils; import com.mindspore.common.config.MSLinkUtils;
import com.mindspore.common.utils.Utils; import com.mindspore.common.utils.Utils;
import com.mindspore.himindspore.R; import com.mindspore.himindspore.R;
import com.mindspore.himindspore.ui.main.PrivacyPolicyActivity;
public class MeFragment extends Fragment implements View.OnClickListener { 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_official_code).setOnClickListener(this);
view.findViewById(R.id.rl_me_qa).setOnClickListener(this); view.findViewById(R.id.rl_me_qa).setOnClickListener(this);
view.findViewById(R.id.rl_me_version).setOnClickListener(this); view.findViewById(R.id.rl_me_version).setOnClickListener(this);
view.findViewById(R.id.me_user_protocol).setOnClickListener(this);
showPackageInfo(); showPackageInfo();
} }
@ -97,6 +99,9 @@ public class MeFragment extends Fragment implements View.OnClickListener {
case R.id.rl_me_qa: case R.id.rl_me_qa:
Utils.openBrowser(getActivity(), MSLinkUtils.ME_HELP_URL); Utils.openBrowser(getActivity(), MSLinkUtils.ME_HELP_URL);
break; break;
case R.id.me_user_protocol:
startActivity(new Intent(getContext(), PrivacyPolicyActivity.class));
break;
} }
} }
} }

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="16dp" />
<solid android:color="#6189ff" />
</shape>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#e1e1e1" />
<corners android:radius="16dp" />
<solid android:color="#ffffff" />
</shape>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#e1e1e1" />
<corners android:radius="6dp" />
<solid android:color="#ffffff" />
</shape>

@ -1,23 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/vp_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_gray" />
<com.mindspore.customview.tablayout.CommonTabLayout <com.mindspore.customview.tablayout.CommonTabLayout
android:layout_alignParentBottom="true"
android:id="@+id/ctl_table" android:id="@+id/ctl_table"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
@ -32,4 +22,22 @@
app:tl_underline_color="#DDDDDD" app:tl_underline_color="#DDDDDD"
app:tl_underline_height="1dp" /> app:tl_underline_height="1dp" />
</LinearLayout> <View
android:id="@+id/lineView"
android:layout_above="@+id/ctl_table"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_gray" />
<androidx.viewpager.widget.ViewPager
android:layout_above="@+id/lineView"
android:id="@+id/vp_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white" />
</RelativeLayout>

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.main.PrivacyPolicyActivity">
<RelativeLayout
android:id="@+id/w_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal">
<ImageView
android:id="@+id/w_back"
android:layout_width="50dp"
android:layout_height="18dp"
android:layout_marginTop="16dp"
android:src="@drawable/back" />
<TextView
android:id="@+id/w_title"
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center"
android:text="@string/me_user_agreements"
android:textColor="@color/text_black"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout>
<View
android:id="@+id/w_view"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/w_linear"
android:background="@color/divider_gray" />
<WebView
android:id="@+id/mWebView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/w_view"
android:layout_marginBottom="5dp" />
</RelativeLayout>

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:src="@drawable/btn_intelligent_poetry" />
<TextView
android:id="@+id/text_poetry"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/btn"
android:gravity="center_vertical"
android:text="@string/title_intelligent_poetry"
android:textColor="@color/text_black"
android:textSize="12sp" />
<TextView
android:id="@+id/text_new"
android:layout_width="18dp"
android:layout_height="36dp"
android:layout_marginLeft="3dp"
android:layout_toRightOf="@id/text_poetry"
android:gravity="center_vertical"
android:text="@string/title_intelligent_poetry_new"
android:textColor="@color/text_red"
android:textSize="7sp"
android:textStyle="italic" />
</RelativeLayout>

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -9,7 +8,6 @@
android:theme="@style/ThemeOverlay.MindSpore.FullscreenContainer" android:theme="@style/ThemeOverlay.MindSpore.FullscreenContainer"
tools:context=".ui.experience.ExperienceFragment"> tools:context=".ui.experience.ExperienceFragment">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="160dp" android:layout_height="160dp"
@ -27,19 +25,18 @@
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:gravity="center"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="22dp" android:layout_marginTop="22dp"
android:gravity="center"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:text="@string/experience_head_subtitle" android:text="@string/experience_head_subtitle"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="13sp" /> android:textSize="13sp" />
<Button <Button
android:visibility="gone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@ -47,26 +44,10 @@
android:background="@drawable/btn_head_experience" android:background="@drawable/btn_head_experience"
android:text="@string/experience_head_button" android:text="@string/experience_head_button"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
app:tabBackground="@color/transparent"
app:tabGravity="fill"
app:tabIndicatorFullWidth="false"
app:tabMaxWidth="0dp"
app:tabIndicatorHeight="2dp"
app:tabIndicator="@color/black"
app:tabRippleColor="@color/transparent"
app:tabSelectedTextColor="@color/black"
app:tabIndicatorColor="@color/main_tab_text_checked"
app:tabTextColor="@color/black">
</com.google.android.material.tabs.TabLayout>
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/vp_content" android:id="@+id/vp_content"

@ -9,21 +9,48 @@
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
> tools:ignore="MissingConstraints">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="30dp" android:paddingTop="30dp"
android:layout_marginBottom="30dp" android:paddingBottom="30dp"
android:orientation="vertical"> android:orientation="vertical">
<View
android:id="@+id/title_vertical_line_one"
android:layout_width="3dp"
android:layout_height="12dp"
android:layout_gravity="center"
android:layout_marginStart="18dp"
android:layout_marginBottom="3dp"
android:background="@color/main_tab_text_checked"
app:layout_constraintBottom_toBottomOf="@id/title_vision"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintWidth_percent="0.44" />
<TextView
android:id="@+id/title_vision"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="28dp"
android:layout_marginTop="16dp"
android:gravity="center_vertical"
android:text="@string/tab_experience_one"
android:textColor="@color/text_black"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
tools:ignore="MissingConstraints" />
<Button <Button
android:id="@+id/btn_object" android:id="@+id/btn_object"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginStart="18dp" android:layout_marginStart="18dp"
android:layout_marginTop="17dp" android:layout_marginTop="13dp"
android:background="@drawable/btn_vision_item" android:background="@drawable/btn_vision_item"
android:drawableStart="@drawable/btn_test" android:drawableStart="@drawable/btn_test"
android:drawablePadding="5dp" android:drawablePadding="5dp"
@ -36,6 +63,7 @@
android:textColor="@color/text_black" android:textColor="@color/text_black"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title_vertical_line_one"
app:layout_constraintWidth_percent="0.44" app:layout_constraintWidth_percent="0.44"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
@ -180,6 +208,55 @@
app:layout_constraintEnd_toEndOf="@+id/btn_image" app:layout_constraintEnd_toEndOf="@+id/btn_image"
app:layout_constraintWidth_percent="0.44" /> app:layout_constraintWidth_percent="0.44" />
<View
android:id="@+id/title_vertical_line_two"
android:layout_width="3dp"
android:layout_height="12dp"
android:layout_gravity="center"
android:layout_marginStart="18dp"
android:layout_marginTop="23dp"
android:layout_marginEnd="14dp"
android:background="@color/main_tab_text_checked"
android:gravity="center_vertical"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_image_garbage"
app:layout_constraintWidth_percent="0.44" />
<TextView
android:id="@+id/title_voice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="28dp"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:text="@string/tab_speech_two"
android:textColor="@color/text_black"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_image_garbage"
app:layout_constraintWidth_percent="0.44" />
<com.mindspore.himindspore.ui.view.LeftImageRightTextButton
android:id="@+id/btn_image_Intelligent_poetry"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginTop="13dp"
android:background="@drawable/btn_vision_item"
android:maxLines="1"
android:onClick="onClickIntelligentPoetry"
android:paddingStart="4dp"
android:text="@string/title_intelligent_poetry"
android:textAllCaps="false"
android:textColor="@color/text_black"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@+id/title_vertical_line_two"
app:layout_constraintTop_toBottomOf="@+id/title_vertical_line_two"
app:layout_constraintWidth_percent="0.44" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="32dp"
android:layout_marginTop="85dp"
android:layout_marginRight="32dp"
android:layout_marginBottom="106dp"
android:background="@drawable/user_protocol_white"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="27dp"
android:gravity="center"
android:text="@string/me_user_agreements"
android:textColor="@color/text_black"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_protocol"
android:layout_width="252dp"
android:layout_height="wrap_content"
android:layout_below="@id/textView"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:lineSpacingExtra="10dp"
android:text="@string/me_privacy"
android:textColor="@color/text_gray"
android:textSize="12sp" />
<Button
android:id="@+id/pop_agree"
android:layout_width="255dp"
android:layout_height="33dp"
android:layout_below="@id/tv_protocol"
android:layout_centerHorizontal="true"
android:layout_marginTop="64dp"
android:background="@drawable/user_protocol_blue"
android:text="@string/me_agree"
android:textColor="@color/white"
android:textSize="13sp" />
<Button
android:id="@+id/pop_Disagree"
android:layout_width="255dp"
android:layout_height="33dp"
android:layout_below="@id/pop_agree"
android:layout_centerHorizontal="true"
android:layout_marginTop="13dp"
android:layout_marginBottom="34dp"
android:background="@drawable/user_protocol_no"
android:text="@string/me_disagree_and_exit"
android:textAllCaps="false"
android:textColor="@color/text_light_gray" />
</RelativeLayout>

@ -13,6 +13,8 @@
<string name="app_update_lastest">Upgrade to a new version</string> <string name="app_update_lastest">Upgrade to a new version</string>
<string name="title_image">Image Classification</string> <string name="title_image">Image Classification</string>
<string name="title_image_garbage">Garbage Classification</string> <string name="title_image_garbage">Garbage Classification</string>
<string name="title_intelligent_poetry">Intelligent poetry</string>
<string name="title_intelligent_poetry_new">NEW</string>
<string name="title_object">Photo Detection</string> <string name="title_object">Photo Detection</string>
<string name="title_object_camera">Camera Detection</string> <string name="title_object_camera">Camera Detection</string>
<string name="title_pose_net">PoseNet</string> <string name="title_pose_net">PoseNet</string>
@ -32,6 +34,7 @@
<string name="main_tab_title_three">Me</string> <string name="main_tab_title_three">Me</string>
<string name="tab_experience_one">Computer Vision</string> <string name="tab_experience_one">Computer Vision</string>
<string name="tab_speech_two">Speech Semantic Technology</string>
<string name="experience_head_title">Experience Center</string> <string name="experience_head_title">Experience Center</string>
<string name="experience_head_subtitle">Invite you to explore a new generation of ALL-Scenario AI Computing Framework</string> <string name="experience_head_subtitle">Invite you to explore a new generation of ALL-Scenario AI Computing Framework</string>
@ -41,12 +44,20 @@
<string name="me_share_title">Share</string> <string name="me_share_title">Share</string>
<string name="me_up_title">Like</string> <string name="me_up_title">Like</string>
<string name="me_qa_title">Feedback</string> <string name="me_qa_title">Feedback</string>
<string name="me_agree">agree</string>
<string name="me_disagree_and_exit">Disagree and Exit</string>
<string name="me_user_agreement">User Agreement and Privacy Policy</string>
<string name="me_privacy">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.</string>
<string name="me_version_title">Version</string> <string name="me_version_title">Version</string>
<string name="me_official_title">Official Website</string> <string name="me_official_title">Official Website</string>
<string name="me_official_code_title">Official Code</string> <string name="me_official_code_title">Official Code</string>
<string name="title_splash_welcome">A one-stop platform of collaborative learning, demonstrating, and experiencing for AI users.</string> <string name="title_splash_welcome">A one-stop platform of collaborative learning, demonstrating, and experiencing for AI users.</string>
<string name="college_summary_title">MindSpore Summary</string> <string name="college_summary_title">MindSpore Summary</string>
<string name="college_cloud_title">A One-Hour Trip to MindSpore</string> <string name="college_cloud_title">A One-Hour Trip to MindSpore</string>
<string name="college_quick_title">Quick Start</string> <string name="college_quick_title">Quick Start</string>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save