!13137 [MS][LITE]android add poetry and authority
From: @sishuikang Reviewed-by: @zhanghaibo5,@zhang_xue_tong Signed-off-by: @zhanghaibo5pull/13137/MERGE
commit
b730069942
File diff suppressed because one or more lines are too long
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 325 B |
After Width: | Height: | Size: 2.0 KiB |
@ -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>
|
@ -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>
|
File diff suppressed because it is too large
Load Diff
@ -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>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue