This commit is contained in:
jinyuer
2021-04-20 14:47:30 +08:00
parent 6251049d92
commit 645b56e7e5
3 changed files with 41 additions and 5 deletions

View File

@@ -14,12 +14,14 @@ import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gyf.immersionbar.ImmersionBar;
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 ImageView mLayTopLeftTv;
private TextView mLayTopTitle;
private TextView mRight;
private ImageView mIvCode;
@@ -40,6 +42,11 @@ public class WebActivitytwo extends AppCompatActivity implements View.OnClickLis
setContentView(R.layout.activity_webtwo);
String url = getIntent().getStringExtra(URL);
String title = getIntent().getStringExtra(TITLE);
ImmersionBar.with(this)
.keyboardEnable(false) //解决软键盘与底部输入框冲突问题
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
.barColor(R.color.colorPrimary).init();
initView();
pb.setMax(100);
@@ -80,11 +87,11 @@ public class WebActivitytwo extends AppCompatActivity implements View.OnClickLis
webView = (WebView) findViewById(R.id.webView);
webView.setOnClickListener(this);
pb = (ProgressBar) findViewById(R.id.pb);
mLayTopLeftTv = (RelativeLayout) findViewById(R.id.layTop_left_tv);
mLayTopLeftTv = (ImageView) 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);
// 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("智慧豆豆");

View File

@@ -17,6 +17,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.google.gson.Gson;
import com.google.gson.internal.LinkedTreeMap;
import com.google.gson.reflect.TypeToken;
import com.gyf.immersionbar.ImmersionBar;
import com.sl.house_property.MainTabActivity;
import com.sl.house_property.R;
import com.sl.house_property.WebActivitytwo;
@@ -59,6 +60,7 @@ public class MessageFragment extends Fragment {
@Override
public void onViewCreated(@NonNull @NotNull View view, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
RecyclerView rv = view.findViewById(R.id.rv);
tvTitle = view.findViewById(R.id.tv_title);
adapter = new MessageAdapter();