This commit is contained in:
renjianbo0118
2021-04-06 22:53:22 +08:00
18 changed files with 460 additions and 14 deletions

View File

@@ -121,6 +121,11 @@
android:theme="@style/myErrorDialogTheme"
android:screenOrientation="portrait"
/>
<activity
android:name="com.sl.house_property.WebActivitytwo"
android:screenOrientation="portrait"
android:theme="@style/TAppTheme"
/>
<activity
android:name="com.sl.house_property.MainTabActivity"
android:launchMode="standard"

View File

@@ -26,6 +26,8 @@ import tools.Config;
import http.ApiConfig;
import rx.Subscription;
import rx.functions.Action1;
import utils.DateUtils;
import utils.DateUtilss;
import utils.Md5;
import utils.SPUtils;
@@ -56,7 +58,18 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
mDataBinding.logintext.setOnClickListener(this);
mDataBinding.forgetpaw.setOnClickListener(this);
mDataBinding.gotoregister.setOnClickListener(this);
//获取当前日期
String gettimetwo = DateUtilss.gettimetwo();
Log.e("当前日期",gettimetwo);
if(gettimetwo.equals("2021年04月02日")||gettimetwo.equals("2021年04月03日")||gettimetwo.equals("2021年04月04日")||gettimetwo.equals("2021年04月05日")||gettimetwo.equals("2021年04月06日")){
mDataBinding.rlzhuce.setVisibility(View.GONE);
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
}else {
mDataBinding.rlzhuce.setVisibility(View.GONE);
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
}
}
@Override
@@ -90,6 +103,16 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
setToast(getString(R.string.me_input_password_tip));
return;
}
if (!mDataBinding.agreewhitemeg.isChecked()) {
setToast("请先同意注册协议");
return;
}
if (!mDataBinding.agreewhitemegy.isChecked()) {
setToast("请先同意隐私政策");
return;
}
Map<String, String> map = new HashMap<>();
map.put("phone", phone);
map.put("password", password);
@@ -223,6 +246,23 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
addSubscription(subscription);
}
/**
* 用户协议
*
* @param v v
*/
public void agreementEvent(View v) {
// Intent intent = new Intent(this, RegisterAgreementActivity.class);
// startActivity(intent);
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=1");
}
/**
* 隐私政策
*
* @param v v
*/
public void yinagreementEvent(View v) {
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
}
}

View File

@@ -120,6 +120,12 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> implements
startActivity(intent);
}
});
mDataBinding.ll5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
WebActivitytwo.runActivity(getActivity(), "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
}
});
//mDataBinding.myRecyView;
mDataBinding.userImage.setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -116,6 +116,12 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
return;
}
if (!mDataBinding.agreewhitemegy.isChecked()) {
setToast("请先同意隐私政策");
return;
}
register(view.getId());
break;
@@ -263,8 +269,16 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
* @param v v
*/
public void agreementEvent(View v) {
Intent intent = new Intent(this, RegisterAgreementActivity.class);
startActivity(intent);
// Intent intent = new Intent(this, RegisterAgreementActivity.class);
// startActivity(intent);
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=1");
}
/**
* 隐私政策
*
* @param v v
*/
public void yinagreementEvent(View v) {
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
}
}

View File

@@ -25,7 +25,8 @@ public class RegisterAgreementActivity extends BaseActivity<ActivityRegisterAgre
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String url="https://wy.shiningsoft.top/articlemobile/index/detail?article_id=1";
// String url="https://wy.shiningsoft.top/articlemobile/index/detail?article_id=1";
String url="https://wy.dou1.net/articlemobile/index/detail?article_id=1";
String titile=getIntent().getStringExtra("titile");
setAbr("注册协议", new View.OnClickListener() {
@Override

View File

@@ -0,0 +1,105 @@
package com.sl.house_property;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class WebActivitytwo extends AppCompatActivity implements View.OnClickListener {
public final static String URL = "url";
public final static String TITLE = "title";
private WebView webView;
private ProgressBar pb;
private RelativeLayout mLayTopLeftTv;
private TextView mLayTopTitle;
private TextView mRight;
private ImageView mIvCode;
private ProgressBar mPb;
private WebView mWebView;
public static void runActivity(Context context, String title, String url) {
Intent intent = new Intent(context, WebActivitytwo.class);
intent.putExtra(URL, url);
intent.putExtra(TITLE, title);
context.startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_webtwo);
String url = getIntent().getStringExtra(URL);
String title = getIntent().getStringExtra(TITLE);
initView();
pb.setMax(100);
WebSettings webSettings = webView.getSettings();
webSettings.setDomStorageEnabled(true);//主要是这句
webSettings.setJavaScriptEnabled(true);//启用js
webSettings.setBlockNetworkImage(false);//解决图片不显示
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setLoadsImagesAutomatically(true);
webSettings.setAppCacheEnabled(true);
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
// webView.getSettings().setJavaScriptEnabled(true);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
pb.setProgress(newProgress);
if (newProgress >= 100) {
pb.setVisibility(View.GONE);
}
}
});
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
webView.loadUrl(url);
}
private void initView() {
webView = (WebView) findViewById(R.id.webView);
webView.setOnClickListener(this);
pb = (ProgressBar) findViewById(R.id.pb);
mLayTopLeftTv = (RelativeLayout) findViewById(R.id.layTop_left_tv);
mLayTopLeftTv.setOnClickListener(this);
mLayTopTitle = (TextView) findViewById(R.id.layTop_title);
mRight = (TextView) findViewById(R.id.right);
mIvCode = (ImageView) findViewById(R.id.iv_code);
mPb = (ProgressBar) findViewById(R.id.pb);
mWebView = (WebView) findViewById(R.id.webView);
mLayTopTitle.setText("智慧豆豆");
}
@Override
public void onClick(View v) {
switch (v.getId()) {
default:
break;
case R.id.webView:
break;
case R.id.layTop_left_tv:
finish();
break;
}
}
}

View File

@@ -30,7 +30,7 @@ public class HeaderAndFooterAdapter extends BaseQuickAdapter<CommentBeanData, Ba
TextView et_coneten = (TextView) helper.getView(R.id.et_coneten);
TextView et_coneten02 = (TextView) helper.getView(R.id.et_coneten02);
TextView tv_delete = (TextView) helper.getView(R.id.tv_delete);
et_coneten.setText("房屋号:"+item.getComment());
et_coneten.setText("房屋号:"+item.getComment()+" 密码:"+item.getPwd());
et_coneten02.setText("有效期:"+item.getType());
tv_delete.setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -57,6 +57,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
private List<CommentBeanData> statuses;
private RecyclerView mRecyclerView;
private HeaderAndFooterAdapter headerAndFooterAdapter;
private String address;
@Override
protected int getLayoutResId() {
@@ -90,9 +91,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
map.put("class", "GetMyAddress");
getGankList(ApiConfig.BASE_URL, map, "", 0);
user_home_id= getIntent().getStringExtra("id");
// String address = getIntent().getStringExtra("address");
address = getIntent().getStringExtra("address");
mDataBinding.tvAddress.setText(address);
mRecyclerView = (RecyclerView) findViewById(R.id.rv_list);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
List<CommentBeanData> commentBeanDatas1 = commentDao.queryInByCustom("isdelete","0");
@@ -155,6 +156,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
user_home_id = list.get(position).getUser_home_id();
if (list.size() > 0) {
mDataBinding.tvAddress.setText(list.get(position).getAddress());
address=list.get(position).getAddress();
}
}
@@ -227,9 +229,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
}.getType();
list = new Gson().fromJson(jsonArray.toString(), type);
if (list != null && !list.isEmpty()) {
mDataBinding.tvAddress.setText(list.get(0).getAddress());
fangchan=list.get(0).getAddress();
user_home_id = list.get(0).getUser_home_id();
// mDataBinding.tvAddress.setText(list.get(0).getAddress());
// fangchan=list.get(0).getAddress();
// user_home_id = list.get(0).getUser_home_id();
}
} catch (JSONException e) {
e.printStackTrace();
@@ -353,7 +355,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
}else {
CommentBeanData commentBeanData = new CommentBeanData();
commentBeanData.setId(new Random().nextInt(10000)+"");
commentBeanData.setComment(fangchan);
commentBeanData.setComment(address);
switch (timeday){
case 1:
@@ -394,7 +396,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
ShareCodeDialog shareCodeDialog = new ShareCodeDialog(ShareCodeActivity.this);
shareCodeDialog.setCode(code);
shareCodeDialog.setPwd(pwd,time,fangchan);
shareCodeDialog.setPwd(pwd,time,address);
new XPopup.Builder(ShareCodeActivity.this).asCustom(shareCodeDialog).show();
} catch (JSONException e) {

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 jeasonlzy(廖子尧)
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
http://www.apache.org/licenses/LICENSE-2.0
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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<gradient
android:angle="270"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:startColor="#ff9d9e9d"/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<gradient
android:angle="270"
android:centerColor="#a046801b"
android:centerY="0.75"
android:endColor="#a046c01b"
android:startColor="#a046c01b"/>
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<gradient
android:angle="270"
android:centerColor="#46bb1b"
android:centerY="0.75"
android:endColor="#46cc1b"
android:startColor="#46cc1b"/>
</shape>
</clip>
</item>
</layer-list>

View File

@@ -112,6 +112,8 @@
android:textSize="16sp" />
<RelativeLayout
android:id="@+id/rlzhuce"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
@@ -143,6 +145,67 @@
android:textSize="16sp"
android:text="@string/forgetpsw" />
</RelativeLayout>
<LinearLayout
android:id="@+id/lyfuwu"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemeg"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="false"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="agreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/lyyinsi"
android:layout_width="match_parent"
android:layout_height="40dp"
android:visibility="gone"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemegy"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="false"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="yinagreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@@ -3,6 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -244,6 +244,33 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemegy"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="true"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="yinagreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
<TextView

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_top" />
<ProgressBar
android:id="@+id/pb"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:minHeight="3dp"
android:progressDrawable="@drawable/progress_bar_states"/>
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>

View File

@@ -250,6 +250,47 @@
android:layout_height="1dp"
android:background="@color/light" />
<LinearLayout
android:id="@+id/ll_5"
android:background="@color/white"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="50dp">
<ImageView
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/fangchan"
/>
<TextView
android:layout_marginLeft="16dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:textSize="16sp"
android:textColor="#000"
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="隐私政策"
/>
<ImageView
android:layout_marginRight="16dp"
android:layout_gravity="center_vertical"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@mipmap/returnme"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/light" />
<LinearLayout

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="#ffffff"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="@+id/layTop_left_tv"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_centerInParent="true"
android:layout_marginLeft="12dp"
android:gravity="center">
<ImageView
android:layout_width="21dp"
android:layout_height="21dp"
android:background="@mipmap/icon_back"
android:textColor="#000000" />
</RelativeLayout>
<TextView
android:id="@+id/layTop_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=""
android:textColor="#000000"
android:textSize="17sp" />
<TextView
android:id="@+id/right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#ff333333"
android:textSize="14sp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:visibility="gone"
android:layout_marginRight="13dp"/>
<ImageView
android:id="@+id/iv_code"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="13dp"
android:visibility="gone"
android:src="@mipmap/clound_code"/>
</RelativeLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -57,6 +57,7 @@
<string name="getcode">获取验证码</string>
<string name="agreewhitemeg">我已同意以上条约</string>
<string name="agreewhitemeg1">我已同意《注册协议》</string>
<string name="agreewhitemeg2">我已同意《隐私政策》</string>
<string name="next">下一步</string>
<string name="getsagain">秒后重新获取</string>