我的界面小改
This commit is contained in:
parent
c9aa79684f
commit
884dc5c396
@ -23,7 +23,6 @@ class Author_introductionActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_anthor_introduction)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
adapter = Book_authorAdapter(authorworkList,userId)
|
||||
val layoutManager =
|
||||
|
@ -49,7 +49,6 @@ class BookInformationActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_book_info)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
bookinfo_swipeRefresh.setOnRefreshListener {
|
||||
loadBookInfo() //下拉刷新
|
||||
}
|
||||
@ -154,17 +153,7 @@ class BookInformationActivity : AppCompatActivity() {
|
||||
intent.putExtra("book_name",bookName)
|
||||
startActivity(intent)
|
||||
}
|
||||
//TODO:不一定回到MainActivity::class,后面还要在跳转前保存上一个页面
|
||||
bookinfo_return.setOnClickListener {
|
||||
// if (sourceActivityClass != null) {
|
||||
// // 返回到上一个页面
|
||||
// val intent = Intent(this, sourceActivityClass!!)
|
||||
// startActivity(intent)
|
||||
// } else {
|
||||
// // 如果没有来源页面信息,则返回到 MainActivity
|
||||
// val intent = Intent(this, MainActivity::class.java)
|
||||
// startActivity(intent)
|
||||
// }
|
||||
finish()
|
||||
}
|
||||
addBook2.setOnClickListener {
|
||||
|
@ -19,7 +19,6 @@ class BookIntroActivity:AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_bookintro)
|
||||
supportActionBar?.hide()
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
Bookname = intent.getStringExtra("Book_name").toString()
|
||||
Log.d("zy123","yes")
|
||||
inits()
|
||||
|
@ -30,7 +30,6 @@ class BookShelfActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_bookshelf)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
loadBookshelf()
|
||||
val layoutManager=GridLayoutManager(this,3)
|
||||
|
@ -22,7 +22,6 @@ class FindpwdActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_findpwd)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
image_findpwd_backtoLogin.setOnClickListener {
|
||||
val intent = Intent(this, LoginActivity::class.java)
|
||||
startActivity(intent)
|
||||
|
@ -21,7 +21,6 @@ class GoodBookActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_bookrank)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
val userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString() //全局范围内userid,登录的时候存进来
|
||||
adapter= BookRankAdapter(this,goodbookList,false,userId)
|
||||
bookrank_recyclerView.layoutManager=
|
||||
|
@ -21,7 +21,6 @@ class HotBookActivity: AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_bookrank)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
val userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
adapter= BookRankAdapter(this,hotbookList,true,userId)
|
||||
bookrank_recyclerView.layoutManager=StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL)
|
||||
|
@ -29,7 +29,6 @@ class LiteratureActivity : AppCompatActivity() {
|
||||
setContentView(R.layout.activity_categorypage)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
val titleTextView = findViewById<TextView>(R.id.categoryPage_title)
|
||||
titleTextView.text = "文学"
|
||||
adapter = BookAdapter2(bookList,1)
|
||||
|
@ -38,10 +38,8 @@ class MainActivity : AppCompatActivity() {
|
||||
setContentView(R.layout.activity_main)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
adapter = BookAdapter(bookList)
|
||||
// val userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "") //全局范围内userid,登录的时候存进来
|
||||
// Log.d("LoginActivity", "User ID: $userId")
|
||||
recyclerView.layoutManager =
|
||||
StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL)
|
||||
recyclerView.adapter = adapter
|
||||
|
@ -28,7 +28,6 @@ class ManagementActivity:AppCompatActivity() {
|
||||
setContentView(R.layout.activity_categorypage)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
val titleTextView = findViewById<TextView>(R.id.categoryPage_title)
|
||||
titleTextView.text = "管理学"
|
||||
adapter = BookAdapter2(bookList,2)
|
||||
|
@ -10,9 +10,11 @@ import cn.bmob.v3.Bmob
|
||||
import cn.bmob.v3.BmobQuery
|
||||
import cn.bmob.v3.exception.BmobException
|
||||
import cn.bmob.v3.listener.FindListener
|
||||
import com.bumptech.glide.Glide
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.NavigationHelper
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_book_info.*
|
||||
import kotlinx.android.synthetic.main.activity_my.*
|
||||
import kotlinx.android.synthetic.main.layout_bottom_navigation.*
|
||||
import java.io.InputStream
|
||||
@ -20,15 +22,10 @@ import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
|
||||
class MyActivity : AppCompatActivity() {
|
||||
|
||||
//登录的用户名
|
||||
public val user_account="0509"
|
||||
lateinit var userId:String
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_my)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754") //连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
val query = BmobQuery<User_bmob>()
|
||||
query.addWhereEqualTo("objectId", userId)
|
||||
@ -39,23 +36,11 @@ class MyActivity : AppCompatActivity() {
|
||||
for (p in p0) {
|
||||
tUserName.text=p.nickName
|
||||
tUserSignature.text=p.signature
|
||||
object : Thread() {
|
||||
override fun run() {
|
||||
try {
|
||||
val url = URL(p!!.face.url)
|
||||
val connection: HttpURLConnection =
|
||||
url.openConnection() as HttpURLConnection
|
||||
connection.setRequestMethod("GET")
|
||||
connection.setConnectTimeout(5000)
|
||||
val `in`: InputStream = connection.getInputStream()
|
||||
val bitmap: Bitmap =
|
||||
BitmapFactory.decodeStream(`in`)
|
||||
iv_avatar.setImageBitmap(bitmap)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
Glide.with(this@MyActivity) // 传入 Context
|
||||
.load(p.face.url) // 加载图片的 URL
|
||||
.placeholder(R.drawable.pre_load) // 设置占位图
|
||||
.error(R.drawable.fail_load) // 设置加载失败时显示的图片
|
||||
.into(iv_avatar) // 将图片加载到指定的 ImageView 中
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -63,32 +48,22 @@ class MyActivity : AppCompatActivity() {
|
||||
})
|
||||
//个人信息修改
|
||||
re_myinfo.setOnClickListener {
|
||||
val extra_account=user_account
|
||||
val intent= Intent(this,ReMyinfoActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
// Log.d("helloSend","$signatureData")
|
||||
// Log.d("helloSend","$userData")
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
//我的发布
|
||||
myPost.setOnClickListener {
|
||||
val intent= Intent(this, edu.whut.jianshu.Activity.MyPostActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
//账号管理
|
||||
account_manager.setOnClickListener{
|
||||
val intent= Intent(this, edu.whut.jianshu.Activity.AccountManagerActivity::class.java)
|
||||
val userData=user_account
|
||||
intent.putExtra("extra_user_data",userData)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
||||
tuichu.setOnClickListener {
|
||||
val intent= Intent(this,LoginActivity::class.java)
|
||||
userId=""
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import cn.bmob.v3.Bmob
|
||||
import cn.bmob.v3.BmobQuery
|
||||
import cn.bmob.v3.exception.BmobException
|
||||
import cn.bmob.v3.listener.FindListener
|
||||
@ -17,43 +16,41 @@ import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_my_post.*
|
||||
|
||||
class MyPostActivity : AppCompatActivity() {
|
||||
private val PerceptionList = ArrayList<Perception>()
|
||||
lateinit var userId:String
|
||||
private val perceptionList = ArrayList<Perception>()
|
||||
private lateinit var userId: String
|
||||
private lateinit var adapter: PerceptionAdapter
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_my_post)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
inits()
|
||||
|
||||
val layoutManager=LinearLayoutManager(this)
|
||||
myPost_recyclerView.layoutManager = layoutManager
|
||||
val adapter = PerceptionAdapter(PerceptionList)
|
||||
|
||||
myPost_recyclerView.adapter = adapter
|
||||
|
||||
Log.d("myLog",myPost_recyclerView.adapter.toString())
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").orEmpty()
|
||||
initRecyclerView()
|
||||
loadPosts()
|
||||
mypost_back.setOnClickListener {
|
||||
val intent = Intent(this, MyActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
private fun inits() {
|
||||
|
||||
private fun initRecyclerView() {
|
||||
myPost_recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
adapter = PerceptionAdapter(perceptionList)
|
||||
myPost_recyclerView.adapter = adapter
|
||||
}
|
||||
|
||||
private fun loadPosts() {
|
||||
val bmobQuery = BmobQuery<Perception_bmob>()
|
||||
bmobQuery.findObjects(object : FindListener<Perception_bmob>() {
|
||||
override fun done(list: List<Perception_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
for (i in list){
|
||||
if(i.userid== userId) {
|
||||
PerceptionList.add(Perception(i.objectId))
|
||||
val adapter = PerceptionAdapter(PerceptionList)
|
||||
myPost_recyclerView.adapter = adapter
|
||||
for (item in list) {
|
||||
if (item.userid == userId) {
|
||||
perceptionList.add(Perception(item.objectId))
|
||||
}
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
Log.e("BmobQuery", "Error: ${e.message}", e)
|
||||
}
|
||||
else {
|
||||
Log.d("error","error")}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ class PerceptionActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_perception)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
val layoutManager=LinearLayoutManager(this)
|
||||
adapter =PerceptionAdapter(PerceptionList)
|
||||
perception_recyclerView.layoutManager = layoutManager
|
||||
|
@ -34,7 +34,6 @@ class Perception_informationActivity:AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_perception_infomation)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
perceptionid = intent.getStringExtra("PerceptionId").toString()
|
||||
Log.d("mytest",perceptionid)
|
||||
|
@ -29,7 +29,6 @@ class PhilosophyActivity:AppCompatActivity() {
|
||||
setContentView(R.layout.activity_categorypage)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
val titleTextView = findViewById<TextView>(R.id.categoryPage_title)
|
||||
titleTextView.text = "哲学"
|
||||
adapter = BookAdapter2(bookList,5)
|
||||
|
@ -29,7 +29,6 @@ class PsychologyActivity:AppCompatActivity() {
|
||||
R.layout.activity_categorypage)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
val titleTextView = findViewById<TextView>(R.id.categoryPage_title)
|
||||
titleTextView.text = "心理学"
|
||||
adapter = BookAdapter2(bookList,3)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
@ -12,32 +13,29 @@ import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_re_email.*
|
||||
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
class ReAddressActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_email)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754") //连接bmob
|
||||
|
||||
t_title.setText("修改地址")
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
t_title.text="修改地址"
|
||||
val extra_address = intent.getStringExtra("extra_address")
|
||||
cur_email.setHint(extra_address)
|
||||
|
||||
et_item.setHint(extra_address)
|
||||
back2my.setOnClickListener() {
|
||||
finish()
|
||||
}
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curAddress = cur_email.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curAddress = et_item.text.toString()
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
if (user_account.isEmpty()) {
|
||||
Toast.makeText(this, "账号不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
@ -65,8 +63,13 @@ class ReAddressActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@ReAddressActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,52 +1,44 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import cn.bmob.v3.Bmob
|
||||
import cn.bmob.v3.BmobQuery
|
||||
import cn.bmob.v3.exception.BmobException
|
||||
import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_re_email.*
|
||||
import kotlinx.android.synthetic.main.activity_re_email.back2my
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
|
||||
class ReEmailActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_email)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754") //连接bmob
|
||||
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
t_title.text="修改邮箱"
|
||||
val emailPatten="^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+\$".toRegex()
|
||||
// val matched=emailPatten.matches(input = "812872040@qq.com")
|
||||
// Log.d("myLog",matched.toString())
|
||||
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
val extra_email = intent.getStringExtra("extra_email")
|
||||
cur_email.setHint(extra_email)
|
||||
et_item.setHint(extra_email)
|
||||
back2my.setOnClickListener() {
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curEmail = cur_email.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curEmail = et_item.text.toString()
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
if (user_account.isEmpty()) {
|
||||
Toast.makeText(this, "账号不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
@ -81,6 +73,13 @@ class ReEmailActivity : AppCompatActivity() {
|
||||
,Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@ReEmailActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
if (flag != true)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
@ -14,102 +15,74 @@ import edu.whut.jianshu.R
|
||||
|
||||
|
||||
class ReMyinfoActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_myinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
//返回个人信息
|
||||
back.setOnClickListener(){
|
||||
val intent=Intent(this,MyActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
val extra_account=intent.getStringExtra("extra_account")
|
||||
// Log.d("helloReceive","$extraUserData")
|
||||
Log.d("myLog",extra_account.toString())
|
||||
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754") //连接bmob
|
||||
val query = BmobQuery<User_bmob>()
|
||||
// query.addWhereEqualTo("account",extra_account)
|
||||
query.addWhereEqualTo("objectId", userId)
|
||||
query.findObjects(object : FindListener<User_bmob>() {
|
||||
var flag:Boolean=false
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
for (i in list) {
|
||||
if (extra_account.equals(i.account)) {
|
||||
flag = true
|
||||
tCurrentName.setText(i.nickName)
|
||||
tCurrentSignature.setText(i.signature)
|
||||
tCurrentAddress.setText((i.address))
|
||||
tCurrentEmail.setText(i.email)
|
||||
tCurrentTel.setText(i.phone)
|
||||
tCurrentSex.setText(i.sex)
|
||||
}
|
||||
}
|
||||
if(flag==false){
|
||||
Log.d("myLog","can't find account")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
//跳转修改昵称
|
||||
re_name.setOnClickListener(){
|
||||
val extra_user_data=tCurrentName.text
|
||||
val intent=Intent(this,ReNameActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_user_data",extra_user_data)
|
||||
// startActivity(intent
|
||||
startActivityForResult(intent,1)
|
||||
finish()
|
||||
}
|
||||
//跳转修改个性签名
|
||||
re_signature.setOnClickListener(){
|
||||
val extra_signature=tCurrentSignature.text
|
||||
val intent=Intent(this,ReSignatureActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_signature",extra_signature)
|
||||
startActivityForResult(intent,1)
|
||||
finish()
|
||||
}
|
||||
//跳转修改性别
|
||||
re_sex.setOnClickListener(){
|
||||
val extra_sex=tCurrentSex.text
|
||||
val intent=Intent(this,ReSexActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_sex",extra_sex)
|
||||
startActivityForResult(intent,1)
|
||||
finish()
|
||||
}
|
||||
//跳转修改邮箱
|
||||
re_email.setOnClickListener(){
|
||||
val extra_email=tCurrentEmail.text
|
||||
val intent=Intent(this,ReEmailActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_email",extra_email)
|
||||
startActivityForResult(intent,1)
|
||||
finish()
|
||||
}
|
||||
//跳转修改手机号
|
||||
re_telephone.setOnClickListener(){
|
||||
val extra_tel=tCurrentTel.text
|
||||
val intent=Intent(this,RePhoneActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_tel",extra_tel)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
//跳转修改地址
|
||||
re_address.setOnClickListener(){
|
||||
val extra_address=tCurrentAddress.text
|
||||
val intent=Intent(this,ReAddressActivity::class.java)
|
||||
intent.putExtra("extra_account",extra_account)
|
||||
intent.putExtra("extra_address",extra_address)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
@ -11,36 +12,31 @@ import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_re_name.*
|
||||
import kotlinx.android.synthetic.main.activity_re_name.back2my
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
|
||||
class ReNameActivity : AppCompatActivity() {
|
||||
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_name)
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
back2my.setOnClickListener() {
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
val oldName = intent.getStringExtra("extra_user_data")
|
||||
et_rename.setHint(oldName)
|
||||
et_item.setHint(oldName)
|
||||
//读取输入
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curName: String = et_rename.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curName: String = et_item.text.toString()
|
||||
|
||||
val intent=Intent(this,MyActivity::class.java)
|
||||
if (user_account.isEmpty() || curName.isEmpty()) {
|
||||
Toast.makeText(this, "账号或昵称不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
@ -58,7 +54,6 @@ class ReNameActivity : AppCompatActivity() {
|
||||
"昵称修改成功!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
//跳转个人信息页面,但是跳转之后原来的信息消失,需要重新进才能刷新
|
||||
startActivity(intent)
|
||||
// startActivityForResult(intent,1)
|
||||
finish()
|
||||
@ -67,7 +62,13 @@ class ReNameActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@ReNameActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
@ -11,40 +12,33 @@ import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
|
||||
import kotlinx.android.synthetic.main.activity_re_phone.*
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
|
||||
class RePhoneActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_phone)
|
||||
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
t_title.text="修改手机号"
|
||||
back2my.setOnClickListener() {
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
val telPatten="^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}\$".toRegex()
|
||||
// Log.d("myLog",telPatten.matches(input = "19883120190").toString())
|
||||
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
val extra_tel = intent.getStringExtra("extra_tel")
|
||||
Log.d("myLog",extra_tel.toString())
|
||||
cur_tel.setHint(extra_tel.toString())
|
||||
et_item.setHint(extra_tel.toString())
|
||||
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curTel = cur_tel.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curTel = et_item.text.toString()
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
if (user_account.isEmpty()) {
|
||||
Toast.makeText(this, "账号不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
@ -79,6 +73,13 @@ class RePhoneActivity : AppCompatActivity() {
|
||||
, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@RePhoneActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
if (flag != true)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
@ -11,57 +12,44 @@ import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_re_sex.back2my
|
||||
import kotlinx.android.synthetic.main.activity_re_sex.btnOk
|
||||
import kotlinx.android.synthetic.main.activity_re_sex.et_account
|
||||
import kotlinx.android.synthetic.main.activity_re_sex.et_resex
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
|
||||
class ReSexActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_re_sex)
|
||||
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
t_title.text="修改性别"
|
||||
val extra_sex = intent.getStringExtra("extra_sex")
|
||||
val hint_text=extra_sex+' '+ et_resex.hint
|
||||
Log.d("myLog",hint_text)
|
||||
|
||||
et_resex.setHint(hint_text)
|
||||
|
||||
val hint_text=extra_sex+" "+"(0代表男,1代表女)"
|
||||
et_item.setHint(hint_text)
|
||||
back2my.setOnClickListener() {
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
||||
val sexChoice = arrayOf("男", "女", "未知")
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curSex = et_resex.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curSex = et_item.text.toString()
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
if (user_account.isEmpty()) {
|
||||
Toast.makeText(this, "账号不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
for (i in list) {
|
||||
if (user_account.equals(i.account)) {
|
||||
flag = true //找到
|
||||
Log.d("myLog", "find sucessflly")
|
||||
//-------更新数据库中的sex
|
||||
if (curSex.toInt() in sexChoice.indices) {
|
||||
if(curSex.toInt()==0)
|
||||
i.setsex("男")
|
||||
if(curSex.toInt()==1)
|
||||
else if(curSex.toInt()==1)
|
||||
i.setsex("女")
|
||||
if(curSex.toInt()==2)
|
||||
else
|
||||
i.setsex("未知")
|
||||
i.update(i.objectId, object : UpdateListener() {
|
||||
override fun done(p0: BmobException?) {
|
||||
@ -89,6 +77,13 @@ class ReSexActivity : AppCompatActivity() {
|
||||
).show()
|
||||
}
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@ReSexActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
if (flag != true)
|
||||
Toast.makeText(
|
||||
|
@ -1,49 +1,41 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import cn.bmob.v3.Bmob
|
||||
import cn.bmob.v3.BmobQuery
|
||||
import cn.bmob.v3.exception.BmobException
|
||||
import cn.bmob.v3.listener.FindListener
|
||||
import cn.bmob.v3.listener.UpdateListener
|
||||
import edu.whut.jianshu.Data.entity.User_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_re_name.*
|
||||
|
||||
import kotlinx.android.synthetic.main.activity_editinfo.*
|
||||
class ReSignatureActivity : AppCompatActivity() {
|
||||
lateinit var userId:String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754") //连接bmob
|
||||
|
||||
setContentView(R.layout.activity_re_name)
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
setContentView(R.layout.activity_editinfo)
|
||||
t_title.setText("修改个性签名")
|
||||
|
||||
val extra_account = intent.getStringExtra("extra_account")
|
||||
val extra_signature=intent.getStringExtra("extra_signature")
|
||||
et_rename.setHint(extra_signature)
|
||||
et_item.setHint(extra_signature)
|
||||
|
||||
back2my.setOnClickListener(){
|
||||
val intent = Intent(this, ReMyinfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
btnOk.setOnClickListener {
|
||||
var flag: Boolean = false
|
||||
val user_account: String = et_account.text.toString()
|
||||
var curSignature=et_rename.text.toString()
|
||||
//
|
||||
// val intent=Intent(this,ReMyinfoActivity::class.java)
|
||||
var curSignature=et_item.text.toString()
|
||||
val intent= Intent(this,ReMyinfoActivity::class.java)
|
||||
if (user_account.isEmpty() ) {
|
||||
Toast.makeText(this, "账号不能为空!", Toast.LENGTH_SHORT).show()
|
||||
Log.d("zy", user_account)
|
||||
} else {
|
||||
val bmobQuery = BmobQuery<User_bmob>()
|
||||
var tempPwd: String = ""
|
||||
bmobQuery.addWhereEqualTo("objectId", userId)
|
||||
bmobQuery.findObjects(object : FindListener<User_bmob>() {
|
||||
override fun done(list: List<User_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
@ -70,7 +62,13 @@ class ReSignatureActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
Toast.makeText(
|
||||
this@ReSignatureActivity,
|
||||
"请输入自己的账号!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ class RegisterActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_register)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
inits()
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,6 @@ class ScienceActivity:AppCompatActivity() {
|
||||
setContentView(R.layout.activity_categorypage)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.menu)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")
|
||||
val titleTextView = findViewById<TextView>(R.id.categoryPage_title)
|
||||
titleTextView.text = "科学"
|
||||
adapter = BookAdapter2(bookList,4)
|
||||
|
@ -22,7 +22,6 @@ class SendSpecificActivity: AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_sendspecific)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
sendspecific_content.requestFocus()
|
||||
// 弹出软键盘
|
||||
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
|
@ -32,7 +32,6 @@ class sendPerceptionActivity:AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_sendperception)
|
||||
Bmob.initialize(this, "8f9f1d1ea520b0ce4f84a6fa83a5f754")//连接bmob
|
||||
userId = getSharedPreferences("userinf", Context.MODE_PRIVATE).getString("user_id", "").toString()
|
||||
mycontent.requestFocus()
|
||||
// 弹出软键盘
|
||||
|
@ -38,17 +38,6 @@ inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val backgrounds = arrayOf(R.drawable.color_lightpurple, R.drawable.color_lightblue,R.drawable.color_lightgreen, R.drawable.color_flesh)
|
||||
holder.innerLinearLayout.setBackgroundResource(backgrounds[position % backgrounds.size])
|
||||
|
||||
// //添加金银铜奖牌
|
||||
// if (position == 0) { // 假设第一名使用金牌图片
|
||||
// holder.rankimg.setImageResource(R.drawable.gold)
|
||||
// } else if (position == 1) { // 第二名使用其他图片,以此类推
|
||||
// holder.rankimg.setImageResource(R.drawable.silver)
|
||||
// }
|
||||
// else if(position==2){
|
||||
// holder.rankimg.setImageResource(R.drawable.copper)
|
||||
// }
|
||||
// else holder.rankimg.setImageDrawable(null)
|
||||
|
||||
Glide.with(holder.itemView.context)
|
||||
.load(book.picUrl) // 确保你的Book对象有正确的图片URL
|
||||
.placeholder(R.drawable.pre_load) // 可以设置一个占位图
|
||||
|
@ -45,7 +45,7 @@
|
||||
android:textSize="22sp" />
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/et_rename"
|
||||
android:id="@+id/et_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
@ -59,7 +59,7 @@
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="请输入账号" />
|
||||
android:hint="请输入您的账号" />
|
||||
|
||||
|
||||
|
@ -228,7 +228,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:src="@drawable/comment1" />
|
||||
android:src="@drawable/exit" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -4,8 +4,7 @@
|
||||
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=".PerceptionActivity">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -15,14 +14,12 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<Button
|
||||
<ImageView
|
||||
android:id="@+id/mypost_back"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/return1"
|
||||
android:text="Back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/return1"
|
||||
android:textColor="#fff" />
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
|
@ -1,72 +0,0 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ebebeb"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back2my"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:src="@drawable/back_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_title"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="修改邮箱"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnOk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="340dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="确认"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/cur_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="123@qq.com" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="请输入账号" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -19,7 +19,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:src="@drawable/back_icon" />
|
||||
android:src="@drawable/return1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="200dp"
|
||||
|
@ -1,72 +0,0 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ebebeb"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back2my"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:src="@drawable/back_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_title"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="修改手机号"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnOk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="340dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="确认"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/cur_tel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="19883120190" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="请输入账号" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -1,78 +0,0 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ebebeb"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back2my"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:src="@drawable/back_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_title"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="修改性别"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnOk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="340dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="确认"
|
||||
android:textColor="#353535"
|
||||
android:textSize="22sp" />
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/et_resex"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="请输入性别:0-男,1-女,2-未知" />
|
||||
|
||||
<!-- <Spinner-->
|
||||
<!-- android:id="@+id/spinner"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:background="#DD4848"-->
|
||||
<!-- android:spinnerMode="dropdown"-->
|
||||
<!-- />-->
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="请输入账号" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user