From b0e0f9cf5f5f41d0ac545e985e5fb4cc71bb9721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E4=B9=BE=E5=B3=B0?= Date: Wed, 28 Jul 2021 17:55:45 +0800 Subject: [PATCH] update app typeface style --- .../gateway/adapter/IntroduceCoreAdapter.java | 4 +- .../himindspore/ui/main/LessonsActivity.java | 22 ++- .../himindspore/ui/main/MainActivity.java | 10 +- .../himindspore/ui/me/PersonalFragment.java | 154 +++++++++++++++++- .../ui/me/PersonalFragmentPresenter.java | 89 ++++++++++ .../himindspore/ui/me/SetActivity.java | 3 +- .../src/main/res/layout/adapter_core_item.xml | 51 +++--- .../adapter_lessons_catalogue_list_item.xml | 2 +- .../adapter_lessons_introduction_item.xml | 2 +- .../src/main/res/layout/fragment_personal.xml | 4 +- .../main/res/layout/layout_more_service.xml | 4 +- .../res/layout/layout_personal_recommend.xml | 2 +- .../res/layout/layout_personal_user_name.xml | 15 +- .../main/res/layout/layout_task_personal.xml | 2 +- .../app/src/main/res/values-en/strings.xml | 2 +- .../app/src/main/res/values-zh/strings.xml | 2 +- .../app/src/main/res/values/strings.xml | 2 +- .../common/src/main/res/values/colors.xml | 1 + .../customview/ui/TopImageBottomTextView.java | 2 +- .../src/main/res/layout/text_style_layout.xml | 2 +- 20 files changed, 328 insertions(+), 47 deletions(-) create mode 100644 model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragmentPresenter.java diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java index 76f9f909f3..f42202f355 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/gateway/adapter/IntroduceCoreAdapter.java @@ -9,11 +9,13 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; +import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -122,7 +124,7 @@ public class IntroduceCoreAdapter extends DelegateAdapter.Adapter implements CourseContract.CourseDetailsView { +public class LessonsActivity extends BaseActivity implements CourseContract.CourseDetailsView,View.OnClickListener { StandardGSYVideoPlayer videoPlayer; private boolean isPlay; private boolean isPause; @@ -98,7 +100,12 @@ public class LessonsActivity extends BaseActivity implem smartRefreshLayout = findViewById(R.id.refreshLayout); multipleStatusView = findViewById(R.id.multipleStatusView); - + LinearLayout mBulletChat = findViewById(R.id.bullet_chat_layout); + LinearLayout mStoreLayout = findViewById(R.id.store_layout); + LinearLayout mForwardLayout = findViewById(R.id.forward_layout); + mBulletChat.setOnClickListener(LessonsActivity.this); + mStoreLayout.setOnClickListener(LessonsActivity.this); + mForwardLayout.setOnClickListener(LessonsActivity.this); presenter = new CourseDetailsPresenter(this); presenter.requestDetailsDetailsData(id); @@ -347,6 +354,17 @@ public class LessonsActivity extends BaseActivity implem } } + @Override + public void onClick(View view) { + switch (view.getId()){ + case R.id.bullet_chat_layout: + case R.id.store_layout: + case R.id.forward_layout: + MyToast.FunctionNoOpen(); + break; + } + } + private class VideoBean { View thumbnailView; String videoUrl; diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainActivity.java index abf3c62640..4f60b6e68c 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainActivity.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/main/MainActivity.java @@ -59,7 +59,7 @@ public class MainActivity extends BaseActivity implements private ProgressDialog progressDialog; private List mTabEntities; - + private int ProgressBar = 100; @Override protected void init() { presenter = new MainActivityPresenter(this); @@ -218,6 +218,8 @@ public class MainActivity extends BaseActivity implements updateDialog.setYesOnclickListener(() -> downFile()); updateDialog.setNoOnclickListener(() -> updateDialog.dismiss()); updateDialog.show(); + }else { + Toast.makeText(this, "当前已经是最新版本", Toast.LENGTH_SHORT).show(); } } @@ -226,9 +228,10 @@ public class MainActivity extends BaseActivity implements progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setTitle(getResources().getString(R.string.app_is_loading)); progressDialog.setMessage(getResources().getString(R.string.app_wait)); - // progressDialog.setProgressNumberFormat("%1d Mb/%2d Mb"); +// progressDialog.setProgressNumberFormat("%1d Mb/%2d Mb"); progressDialog.setProgress(0); progressDialog.show(); + progressDialog.setCancelable(false); presenter.downloadApk(getApkPath(), "MindSpore_inhand.apk", new FileDownLoadObserver() { @Override public void onDownLoadSuccess(File file) { @@ -244,6 +247,9 @@ public class MainActivity extends BaseActivity implements public void onProgress(final int progress, final long total) { runOnUiThread(() -> { progressDialog.setProgress(progress); + if (progress == ProgressBar ){ + progressDialog.dismiss(); + } }); } diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragment.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragment.java index 7088c46155..8305d585aa 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragment.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragment.java @@ -16,30 +16,50 @@ package com.mindspore.himindspore.ui.me; import android.app.Activity; +import android.app.AlertDialog; +import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.net.Uri; +import android.os.Build; import android.os.Bundle; +import android.os.Environment; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityOptionsCompat; +import androidx.core.content.FileProvider; import androidx.fragment.app.Fragment; +import com.mindspore.common.base.mvp.BaseFragment; import com.mindspore.common.config.MSLinkUtils; +import com.mindspore.common.net.FileDownLoadObserver; +import com.mindspore.common.netbean.response.UpdateInfoBean; import com.mindspore.common.utils.Utils; +import com.mindspore.customview.dialog.UpdateDialog; import com.mindspore.customview.ui.MyToast; import com.mindspore.himindspore.R; +import com.mindspore.himindspore.ui.main.MainActivity; +import com.mindspore.himindspore.ui.main.MainContract; import com.mindspore.himindspore.ui.webview.WebViewUtilsActivity; -public class PersonalFragment extends Fragment implements View.OnClickListener { +import java.io.File; +public class PersonalFragment extends BaseFragment implements MainContract.View,View.OnClickListener { + + private static final String TAG = PersonalFragment.class.getSimpleName(); private TextView versionText; + private ProgressDialog progressDialog; + private int now_version; + private int ProgressBar = 100; @Override public View onCreateView( @@ -52,6 +72,7 @@ public class PersonalFragment extends Fragment implements View.OnClickListener { @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); + presenter = new PersonalFragmentPresenter(this); versionText = view.findViewById(R.id.me_vision); view.findViewById(R.id.per_set_up).setOnClickListener(this); view.findViewById(R.id.per_cache_view).setOnClickListener(this); @@ -72,7 +93,9 @@ public class PersonalFragment extends Fragment implements View.OnClickListener { view.findViewById(R.id.per_title_quit).setOnClickListener(this); view.findViewById(R.id.per_task_title_include).setOnClickListener(this); view.findViewById(R.id.per_remaining_task_layout).setOnClickListener(this); + view.findViewById(R.id.rl_me_version).setOnClickListener(this); showPackageInfo(); + showPackaeInfo(); } private void showPackageInfo() { @@ -128,6 +151,9 @@ public class PersonalFragment extends Fragment implements View.OnClickListener { case R.id.per_official_view: startActivity(new Intent(getActivity(), WebViewUtilsActivity.class).putExtra(MSLinkUtils.INTENT_WEB_VIEW, MSLinkUtils.BASE_URL)); break; + case R.id.rl_me_version: + getUpdateInfo(); + break; default: break; } @@ -143,4 +169,130 @@ public class PersonalFragment extends Fragment implements View.OnClickListener { activity.overridePendingTransition(R.anim.anim_in, R.anim.anim_out); } } + + @Override + protected void lazyInit() { + + } + + private void getUpdateInfo() { + //todo + presenter.getUpdateInfo(); + } + + @Override + public void showUpdateResult(UpdateInfoBean bean) { + showUpdate(bean); + } + + private void showPackaeInfo() { + try { + PackageManager packageManager = getActivity().getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getActivity().getPackageName(), 0); + now_version = packageInfo.versionCode; + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + } + + public void showUpdate(final UpdateInfoBean updateInfo) { + Log.d(TAG,updateInfo.getVersionCode()+""); + if (now_version != updateInfo.getVersionCode()) { + UpdateDialog updateDialog = new UpdateDialog(getContext()); + updateDialog.setTitleString(getResources().getString(R.string.app_update_lastest) + updateInfo.getVersionName()); + updateDialog.setContentString(updateInfo.getMessage()); + updateDialog.setYesOnclickListener(new UpdateDialog.YesOnclickListener() { + @Override + public void onYesOnclick() { + updateDialog.dismiss(); + PersonalFragment.this.downFile(); + } + }); + updateDialog.setNoOnclickListener(() -> updateDialog.dismiss()); + updateDialog.show(); + }else { + Toast.makeText(getContext(), "当前已经是最新版本", Toast.LENGTH_SHORT).show(); + } + } + + public void downFile() { + progressDialog = new ProgressDialog(getContext()); + progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); + progressDialog.setTitle(getResources().getString(R.string.app_is_loading)); + progressDialog.setMessage(getResources().getString(R.string.app_wait)); + // progressDialog.setProgressNumberFormat("%1d Mb/%2d Mb"); + progressDialog.setProgress(0); + progressDialog.show(); + progressDialog.setCancelable(false); + presenter.downloadApk(getApkPath(), "MindSpore_inhand.apk", new FileDownLoadObserver() { + @Override + public void onDownLoadSuccess(File file) { + downSuccess(); + } + + @Override + public void onDownLoadFail(Throwable throwable) { + Toast.makeText(getContext(), getResources().getString(R.string.app_load_fail), Toast.LENGTH_LONG).show(); + } + + @Override + public void onProgress(final int progress, final long total) { + getActivity().runOnUiThread(() -> { + progressDialog.setProgress(progress); + if (progress == ProgressBar ){ + progressDialog.dismiss(); + } + + }); + + } + }); + Log.d(TAG, "downFile: "); + } + + public void downSuccess() { + if (progressDialog != null && progressDialog.isShowing()) { + progressDialog.dismiss(); + } + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setIcon(android.R.drawable.ic_dialog_info); + builder.setTitle(getResources().getString(R.string.app_download_success)); + builder.setMessage(getResources().getString(R.string.app_need_install)); + builder.setCancelable(false); + builder.setPositiveButton(getResources().getString(R.string.confirm), (dialog, which) -> { + Intent intent = new Intent(Intent.ACTION_VIEW); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + Uri contentUri = FileProvider.getUriForFile(getContext(), "com.mindspore.himindspore.fileprovider", + new File(getApkPath(), "MindSpore_inhand.apk")); + intent.setDataAndType(contentUri, "application/vnd.android.package-archive"); + } else { + intent.setDataAndType(Uri.fromFile(new File(getApkPath(), "MindSpore_inhand.apk")), "application/vnd.android.package-archive"); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + } + startActivity(intent); + }); + builder.setNegativeButton(getResources().getString(R.string.cancel), (dialog, which) -> { + }); + builder.create().show(); + } + + @Override + public void showFail(String s) { + + } + + public String getApkPath() { + String directoryPath = ""; + if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) { + directoryPath = getActivity().getExternalFilesDir("apk").getAbsolutePath(); + } else { + directoryPath = getActivity().getFilesDir() + File.separator + "apk"; + } + File file = new File(directoryPath); + if (!file.exists()) { + file.mkdirs(); + } + return directoryPath; + } } diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragmentPresenter.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragmentPresenter.java new file mode 100644 index 0000000000..8215c3aaab --- /dev/null +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/PersonalFragmentPresenter.java @@ -0,0 +1,89 @@ +package com.mindspore.himindspore.ui.me; + +import android.content.res.TypedArray; + +import com.flyco.tablayout.listener.CustomTabEntity; +import com.mindspore.common.base.mvp.BaseFragmentPresenter; +import com.mindspore.common.http.HttpClient; +import com.mindspore.common.net.FileDownLoadObserver; +import com.mindspore.common.netbean.response.UpdateInfoBean; +import com.mindspore.common.utils.Utils; +import com.mindspore.himindspore.R; +import com.mindspore.himindspore.bean.TabEntity; +import com.mindspore.himindspore.ui.main.MainActivity; +import com.mindspore.himindspore.ui.main.MainContract; + +import org.jetbrains.annotations.NotNull; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import io.reactivex.Observer; +import io.reactivex.android.schedulers.AndroidSchedulers; +import io.reactivex.disposables.Disposable; +import io.reactivex.schedulers.Schedulers; + +public class PersonalFragmentPresenter extends BaseFragmentPresenter implements MainContract.Presenter { + + private static final String TAG = "PersonalFragmentPresenter"; + + private MainContract.View mView; + + public PersonalFragmentPresenter(MainContract.View mView) { + this.mView = mView; + } + + @Override + public List getTabEntity() { + ArrayList mTabEntities = new ArrayList<>(); + TypedArray mIconUnSelectIds = Utils.getApp().getResources().obtainTypedArray(R.array.main_tab_un_select); + TypedArray mIconSelectIds = Utils.getApp().getResources().obtainTypedArray(R.array.main_tab_select); + String[] mainTitles = Utils.getApp().getResources().getStringArray(R.array.main_tab_title); + for (int i = 0; i < mainTitles.length; i++) { + int unSelectId = mIconUnSelectIds.getResourceId(i, R.drawable.gateway_uncheck); + int selectId = mIconSelectIds.getResourceId(i, R.drawable.gateway_checked); + mTabEntities.add(new TabEntity(mainTitles[i], selectId, unSelectId)); + } + mIconUnSelectIds.recycle(); + mIconSelectIds.recycle(); + return mTabEntities; + } + + @Override + public void getUpdateInfo() { + HttpClient.Builder.getAPPService().getUpdateInfo().subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer() { + @Override + public void onSubscribe(@NotNull Disposable d) { + + } + + @Override + public void onNext(@NotNull UpdateInfoBean updateInfoBean) { + mView.showUpdateResult(updateInfoBean); + } + + @Override + public void onError(@NotNull Throwable e) { + mView.showFail(e.toString()); + } + + @Override + public void onComplete() { + + } + }); + } + + @Override + public void downloadApk(String destDir, String fileName, FileDownLoadObserver fileDownLoadObserver) { + HttpClient.Builder.getAPPService().downloadApk() + .subscribeOn(Schedulers.io()) + .observeOn(Schedulers.io()) + .observeOn(Schedulers.computation()) + .map(responseBody -> fileDownLoadObserver.saveFile(responseBody, destDir, fileName)) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(fileDownLoadObserver); + } +} diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/SetActivity.java b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/SetActivity.java index dc3dde40a7..4056823344 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/SetActivity.java +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/java/com/mindspore/himindspore/ui/me/SetActivity.java @@ -80,9 +80,10 @@ public class SetActivity extends AppCompatActivity implements View.OnClickListen dialog.dismiss(); break; case R.id.account_number: - case R.id.sign_out_view: // startActivity(new Intent(SetActivity.this, AccountInfoActivity.class)); // break; + case R.id.sign_out_view: +// signOutDialog(); case R.id.dialog_confirm: MyToast.FunctionNoOpen(); break; diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_core_item.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_core_item.xml index 8cd9ad55d4..033b9a57eb 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_core_item.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_core_item.xml @@ -10,42 +10,51 @@ app:cardBackgroundColor="@color/component_card_view_gray_bg" app:cardCornerRadius="8dp"> - + android:layout_marginTop="0.6dp"> - + + + + + + - + \ No newline at end of file diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_catalogue_list_item.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_catalogue_list_item.xml index 513ecdbef0..eba750e2f5 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_catalogue_list_item.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_catalogue_list_item.xml @@ -14,7 +14,7 @@ android:layout_marginTop="10dp" android:layout_marginBottom="10dp" app:cardCornerRadius="10dp" - app:cardElevation="0dp" + app:cardElevation="2dp" app:layout_constraintBottom_toBottomOf="@+id/line" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_introduction_item.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_introduction_item.xml index 9b7a2c1603..baa4a5aff6 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_introduction_item.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/adapter_lessons_introduction_item.xml @@ -35,7 +35,7 @@ android:layout_marginStart="10dp" android:layout_marginTop="6dp" android:textColor="@color/text_light_gray" - android:textSize="11dp" + android:textSize="12dp" app:layout_constraintTop_toBottomOf="@+id/lessons_name_tv" tools:text="课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介 课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介课程简介 diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_personal.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_personal.xml index 41696e4ac8..4f046cd73e 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_personal.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/fragment_personal.xml @@ -36,13 +36,13 @@ layout="@layout/layout_personal_recommend" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="26dp" /> + android:layout_marginTop="30dp" /> + android:layout_marginTop="30dp" /> \ No newline at end of file diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_more_service.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_more_service.xml index cd98a1d73d..09a346282d 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_more_service.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_more_service.xml @@ -14,7 +14,7 @@ android:layout_marginStart="10dp" android:text="@string/per_more_service" android:textColor="@color/text_black" - android:textSize="13dp" + android:textSize="16dp" android:textStyle="bold" /> + android:textSize="14dp" /> diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_personal_user_name.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_personal_user_name.xml index ccd3b18a6e..0384ba50f9 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_personal_user_name.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_personal_user_name.xml @@ -29,7 +29,9 @@ android:layout_marginTop="5dp" android:text="@string/title_splash_welcome_name" android:textColor="@color/text_black" - android:textSize="14dp" + android:textSize="15dp" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/per_avatar" app:layout_constraintTop_toTopOf="@id/per_avatar" /> @@ -42,6 +44,7 @@ android:text="mindspore.com" android:textColor="@color/text_light_gray" android:textSize="10dp" + android:visibility="gone" app:layout_constraintStart_toEndOf="@id/per_avatar" app:layout_constraintTop_toBottomOf="@id/user_name" /> @@ -62,14 +65,14 @@ android:layout_marginTop="2dp" android:text="@string/per_space" android:textColor="@color/text_light_gray" - android:textSize="11dp" /> + android:textSize="12dp" /> @@ -130,7 +133,7 @@ android:paddingTop="3dp" android:text="@string/per_dynamic" android:textColor="@color/text_light_gray" - android:textSize="11dp" + android:textSize="14dp" app:layout_constraintEnd_toStartOf="@id/per_attention" app:layout_constraintHorizontal_weight="1" app:layout_constraintStart_toStartOf="parent" @@ -144,7 +147,7 @@ android:paddingTop="3dp" android:text="@string/per_follow" android:textColor="@color/text_light_gray" - android:textSize="11dp" + android:textSize="14dp" app:layout_constraintBottom_toBottomOf="@id/per_dynamic" app:layout_constraintEnd_toStartOf="@id/per_fans" app:layout_constraintHorizontal_weight="1" @@ -158,7 +161,7 @@ android:paddingTop="3dp" android:text="@string/per_fans" android:textColor="@color/text_light_gray" - android:textSize="11dp" + android:textSize="14dp" app:layout_constraintBottom_toBottomOf="@id/per_dynamic" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_weight="1" diff --git a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_task_personal.xml b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_task_personal.xml index 626a75ebdb..c73e817504 100644 --- a/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_task_personal.xml +++ b/model_zoo/official/lite/MindSpore_inhand/app/src/main/res/layout/layout_task_personal.xml @@ -38,7 +38,7 @@ android:layout_marginTop="5dp" android:text="领限定头像挂件,赢活动奖金" android:textColor="@color/text_light_gray" - android:textSize="10dp" + android:textSize="11dp" app:layout_constraintStart_toStartOf="@id/per_up" app:layout_constraintTop_toBottomOf="@id/per_up" /> 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 84411cc35f..094fb1b4a3 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 @@ -10,7 +10,7 @@ "downloading" "Please wait..." "download failed" - Upgrade to a new version + New version detected Save Picture Cancel Image Classification 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 bcb314aaad..c341702061 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 @@ -10,7 +10,7 @@ "正在下载" "请稍候..." "下载失败" - "请升级新版本" + "检测到新版本" 保存图片 取消 图像分类 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 de2ac63290..845ef77ac9 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 @@ -9,7 +9,7 @@ "正在下载" "请稍候..." "下载失败" - "请升级新版本" + "检测到新版本" 保存图片 取消 热门评论 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 6f928730de..41060c5b7e 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 @@ -41,4 +41,5 @@ #e4e4e4 #F0F0F0 #33999999 + #38000000 \ No newline at end of file diff --git a/model_zoo/official/lite/MindSpore_inhand/customView/src/main/java/com/mindspore/customview/ui/TopImageBottomTextView.java b/model_zoo/official/lite/MindSpore_inhand/customView/src/main/java/com/mindspore/customview/ui/TopImageBottomTextView.java index d493e33267..c3e33025e1 100644 --- a/model_zoo/official/lite/MindSpore_inhand/customView/src/main/java/com/mindspore/customview/ui/TopImageBottomTextView.java +++ b/model_zoo/official/lite/MindSpore_inhand/customView/src/main/java/com/mindspore/customview/ui/TopImageBottomTextView.java @@ -60,7 +60,7 @@ public class TopImageBottomTextView extends LinearLayout { imageMarginTop = typedArray.getDimension(R.styleable.TopImageBottomTextView_imageMarginTop, DisplayUtil.dp2px(context, 0)); imageMarginRight = typedArray.getDimension(R.styleable.TopImageBottomTextView_imageMarginRight, DisplayUtil.dp2px(context, 0)); imageMarginBottom = typedArray.getDimension(R.styleable.TopImageBottomTextView_imageMarginBottom, DisplayUtil.dp2px(context, 0)); - textSize = typedArray.getDimension(R.styleable.TopImageBottomTextView_textSize, 10); + textSize = typedArray.getDimension(R.styleable.TopImageBottomTextView_textSize, 13); typedArray.recycle(); } diff --git a/model_zoo/official/lite/MindSpore_inhand/customView/src/main/res/layout/text_style_layout.xml b/model_zoo/official/lite/MindSpore_inhand/customView/src/main/res/layout/text_style_layout.xml index 7228cbf8d0..134883ce7d 100644 --- a/model_zoo/official/lite/MindSpore_inhand/customView/src/main/res/layout/text_style_layout.xml +++ b/model_zoo/official/lite/MindSpore_inhand/customView/src/main/res/layout/text_style_layout.xml @@ -26,7 +26,7 @@ android:layout_toRightOf="@id/icon_image" android:text="@string/me_share_title" android:textColor="@color/text_black" - android:textSize="12dp" /> + android:textSize="15dp" />