濮阳市网站怎么做宣传亚马逊关键词优化怎么做

张小明 2026/1/11 6:17:43
濮阳市网站怎么做宣传,亚马逊关键词优化怎么做,wordpress的前端怎么写,h5页面制作工具 软件1.Model层——User类的设计 同上一篇文章用户添加。 2. dao层——UserDao的设计 在UserDao中添加登陆方法的代码。 public boolean Login(User user){//根据用户信息执行查询操作#xff0c;查到返回true,没查到返回falseString strUserNameuser.getUsername();String str…1.Model层——User类的设计同上一篇文章用户添加。2. dao层——UserDao的设计在UserDao中添加登陆方法的代码。public boolean Login(User user){ //根据用户信息执行查询操作查到返回true,没查到返回false String strUserNameuser.getUsername(); String strPassworduser.getPassword(); Integer type user.getType(); Cursor cursordb.query(user_table,null,username? and password? and type?, new String[]{strUserName,strPassword,String.valueOf(type)},null,null,null ); if(cursor.moveToNext()){ return true; }else { return false; } }3. service层——UserService设计(1)接口UserService添加登陆方法声明。public boolean Login(User user);2实现类UserServiceImpl添加登陆方法的实现。public boolean Login(User user) { return userDao.Login(user); }4. View层——LoginActivity设计(1)布局文件activity_login.xml设计?xml version1.0 encodingutf-8? LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/android xmlns:apphttp://schemas.android.com/apk/res-auto xmlns:toolshttp://schemas.android.com/tools android:layout_widthmatch_parent android:layout_heightmatch_parent android:orientationvertical android:padding12dp android:gravitycenter android:backgroundcolor/colorBlue tools:context.LoginActivity LinearLayout android:layout_widthmatch_parent android:layout_height450dp android:backgrounddrawable/login_box_background android:orientationvertical TextView android:idid/textView android:layout_widthmatch_parent android:layout_heightwrap_content android:textSize40sp android:layout_marginBottom20dp android:gravitycenter android:textWelcome / EditText android:idid/etUserName android:layout_widthmatch_parent android:layout_heightwrap_content android:ems10 android:inputTypetextPersonName android:hint用户名 android:textSizedimen/fontSize android:drawableLeftdrawable/username / EditText android:idid/etPassword android:layout_widthmatch_parent android:layout_heightwrap_content android:ems10 android:inputTypetextPassword android:hint密码 android:textSizedimen/fontSize android:drawableLeftdrawable/password android:maxLength10 / LinearLayout android:layout_widthmatch_parent android:layout_heightwrap_content android:orientationhorizontal RadioGroup android:layout_widthmatch_parent android:layout_heightwrap_content android:orientationhorizontal RadioButton android:idid/radStudent android:layout_width0dp android:layout_weight1 android:layout_heightwrap_content android:checkedtrue android:textSizedimen/fontSize android:text学生 / RadioButton android:idid/radTeacher android:layout_width0dp android:layout_weight1 android:layout_heightwrap_content android:textSizedimen/fontSize android:text教师 / /RadioGroup /LinearLayout Button android:idid/btLogin android:layout_widthmatch_parent android:layout_heightwrap_content android:layout_marginTop20dp android:backgrounddrawable/new_btn_background android:textColorcolor/colorWhite android:layout_marginLeft20dp android:layout_marginRight20dp android:textSizedimen/fontSize android:textLogin / LinearLayout android:layout_widthmatch_parent android:layout_heightwrap_content android:layout_marginTop20dp android:orientationhorizontal CheckBox android:idid/chkAutoLogin android:layout_width0dp android:layout_heightwrap_content android:layout_weight2 android:textSizedimen/fontSize android:text自动登陆 / CheckBox android:idid/chkSavePass android:layout_width0dp android:layout_heightwrap_content android:layout_weight3 android:checkedtrue android:text记住密码 android:textSizedimen/fontSize / /LinearLayout LinearLayout android:layout_widthmatch_parent android:layout_heightwrap_content android:layout_marginTop20dp android:orientationhorizontal TextView android:idid/tvReg android:layout_width0dp android:layout_heightwrap_content android:layout_weight3 android:textSizedimen/fontSize android:textColorcolor/colorBlue android:layout_marginLeft30dp android:text用户注册 android:textStylebold / TextView android:idid/tvForgetPass android:layout_width0dp android:layout_heightwrap_content android:layout_weight2 android:textSizedimen/fontSize android:textColorcolor/colorBlue android:layout_marginLeft50dp android:textStylebold android:text忘记密码 / /LinearLayout /LinearLayout /LinearLayout(2)主类LoginActivity设计package com.example.myactivitydemo; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; import android.widget.RadioButton; import android.widget.TextView; import android.widget.Toast; import com.example.myactivitydemo.entity.User; import com.example.myactivitydemo.service.UserService; import com.example.myactivitydemo.service.impl.UserServiceImpl; import com.example.myactivitydemo.util.DbHelper; import com.example.myactivitydemo.util.MD5Util; public class LoginActivity extends AppCompatActivity { private EditText etUserName; private EditText etPassword; private Button btLogin; private CheckBox chkSavePass; private CheckBox chkAutoLogin; private TextView tvReg; private RadioButton radStudent; private RadioButton radTeacher; //定义两个成员变量 private SharedPreferences sp; private SharedPreferences.Editor editor; private UserService userService; private int type; Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); initView(); //实例化 spgetSharedPreferences(user,0); editorsp.edit(); //读取用户信息 String strUserNamesp.getString(username,); String strPasswordsp.getString(password,); etUserName.setText(strUserName); etPassword.setText(strPassword); tvReg.setOnClickListener(new View.OnClickListener() { Override public void onClick(View v) { Intent intentnew Intent(LoginActivity.this,RegisterActivity.class); startActivity(intent); } }); btLogin.setOnClickListener(new View.OnClickListener() { Override public void onClick(View v) { String strUserNameetUserName.getText().toString().trim(); String strPasswordetPassword.getText().toString().trim(); if(radStudent.isChecked()){ type1; }else{ type2; } //身份验证 userServicenew UserServiceImpl(LoginActivity.this); User usernew User(); user.setUsername(strUserName); user.setPassword(strPassword); user.setType(type); if(userService.Login(user)){ if(chkSavePass.isChecked()){ //执行记住密码的操作 editor.putString(username,strUserName); editor.putString(password,etPassword.getText().toString()); editor.commit();//提交 } Intent intentnew Intent(LoginActivity.this,InfoActivity.class); startActivity(intent); }else{ Toast.makeText(LoginActivity.this, 用户名或密码错误,Toast.LENGTH_LONG).show(); } } }); } public void initView(){ etUserNamefindViewById(R.id.etUserName); etPasswordfindViewById(R.id.etPassword); btLoginfindViewById(R.id.btLogin); chkAutoLoginfindViewById(R.id.chkAutoLogin); chkSavePassfindViewById(R.id.chkSavePass); tvRegfindViewById(R.id.tvReg); radStudentfindViewById(R.id.radStudent); radTeacherfindViewById(R.id.radTeacher); } }最后是实现效果
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

建博会广州网站欧 美 做 爱 视频网站

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 使用快马平台快速开发一个Linux命令速查Web应用。功能要求:1) 按类别(文件操作、系统管理、网络等)组织常见命令 2) 支持关键词搜索 3) 每个命令有详细说明和示例 4) 用…

张小明 2026/1/10 16:23:27 网站建设

广州网站制作开发公司哪家好上海教育网站官网

还在为每天重复的京东签到任务而烦恼吗?lxk0301开发的京东自动化脚本项目为你提供了一站式解决方案,让你告别手动操作,实现京豆、积分、活动的全自动管理。 【免费下载链接】jd_scripts-lxk0301 长期活动,自用为主 | 低调使用&…

张小明 2026/1/10 16:23:28 网站建设

截取网站流量门户网站还能建设么

Sonic模型推理速度测试:不同GPU显卡性能对比 在虚拟内容创作需求井喷的今天,数字人技术正从实验室走向千行百业。无论是电商直播间的24小时带货主播,还是在线课程里娓娓道来的AI讲师,背后都离不开一个关键能力——语音驱动口型同步…

张小明 2026/1/10 16:23:31 网站建设

天河区做网站的公司如何把代码wordpress

作为一名深度阅读爱好者,你是否曾经在微信读书中留下了无数精彩的高亮和想法,却在需要整理时发现它们散落在不同的书籍和章节中?😅 这种碎片化的笔记体验,正是Weread同步插件想要彻底解决的痛点。 【免费下载链接】obs…

张小明 2026/1/10 16:23:30 网站建设

福州建设招聘信息网站网站平台建设费用

HTML前端展示AI预测结果:Miniconda后端计算无缝对接 在高校实验室、初创公司或企业内部创新项目中,一个常见的场景是:算法工程师训练好了一个图像分类模型,想要快速让非技术人员体验其效果。最直接的方式不是写文档,而…

张小明 2026/1/10 17:42:27 网站建设

慈溪公司做网站网页设计基础是什么

AdisInsight是由Springer Nature集团旗下Adis出版社开发一款研发信息数据库,AdisInsight药物研发信息数据库包含关于药物开发、临床试验、药物不良反应事件、交易和专利的信息,其搜索范围涵盖数千种期刊、会议论文集、公司网站和其他已发表的资料&#x…

张小明 2026/1/10 16:23:32 网站建设