小改
This commit is contained in:
parent
884dc5c396
commit
30a466968e
@ -162,12 +162,6 @@ class BookInformationActivity : AppCompatActivity() {
|
||||
bookinfo_addBook.setOnClickListener {
|
||||
addBookToBookshelf()
|
||||
}
|
||||
//TODO:BookIntroActivity要删
|
||||
bookinfo_img.setOnClickListener {
|
||||
val intent = Intent(this, BookIntroActivity::class.java)
|
||||
intent.putExtra("Book_name", bookName)
|
||||
startActivity(intent)
|
||||
}
|
||||
toBookshelf.setOnClickListener {
|
||||
val intent = Intent(this, BookShelfActivity::class.java)
|
||||
startActivity(intent)
|
||||
|
@ -1,49 +0,0 @@
|
||||
package edu.whut.jianshu.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import cn.bmob.v3.Bmob
|
||||
import cn.bmob.v3.BmobQuery
|
||||
import cn.bmob.v3.exception.BmobException
|
||||
import cn.bmob.v3.listener.FindListener
|
||||
import edu.whut.jianshu.Data.entity.Book_info_bmob
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_bookintro.*
|
||||
import kotlinx.android.synthetic.main.expandable3.*
|
||||
import kotlinx.android.synthetic.main.expandable4.*
|
||||
|
||||
class BookIntroActivity:AppCompatActivity() {
|
||||
private lateinit var Bookname: String
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_bookintro)
|
||||
supportActionBar?.hide()
|
||||
Bookname = intent.getStringExtra("Book_name").toString()
|
||||
Log.d("zy123","yes")
|
||||
inits()
|
||||
intro_titleback.setOnClickListener {
|
||||
val intent = Intent(this, BookInformationActivity::class.java)
|
||||
intent.putExtra("Book_name", Bookname)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
private fun inits(){
|
||||
val query = BmobQuery<Book_info_bmob>()
|
||||
query.addWhereEqualTo("name", Bookname)
|
||||
query.findObjects(object : FindListener<Book_info_bmob>() {
|
||||
override fun done(list: List<Book_info_bmob>, e: BmobException?) {
|
||||
if (e == null) {
|
||||
for (i in list) {
|
||||
expandable3.text = i.introduce
|
||||
expandable4.text = i.evaluate
|
||||
thebkname.text=Bookname
|
||||
}
|
||||
} else {
|
||||
Log.d("error", "error")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
@ -69,7 +69,6 @@ class HotBookActivity: AppCompatActivity() {
|
||||
}
|
||||
})
|
||||
}
|
||||
//TODO:未来添加一个返回到上个页面指定位置的功能
|
||||
private fun returnTOCity() {
|
||||
bookrank_return.setOnClickListener {
|
||||
// val intent = Intent(this, MainActivity::class.java)
|
||||
|
@ -16,7 +16,6 @@ import edu.whut.jianshu.NavigationHelper
|
||||
import edu.whut.jianshu.R
|
||||
import kotlinx.android.synthetic.main.activity_perception.*
|
||||
import kotlinx.android.synthetic.main.layout_bottom_navigation.*
|
||||
|
||||
class PerceptionActivity : AppCompatActivity() {
|
||||
private val PerceptionList = ArrayList<Perception>()
|
||||
private lateinit var adapter: PerceptionAdapter
|
||||
|
@ -8,14 +8,10 @@ class Book_info_bmob:BmobObject(){
|
||||
var picture: BmobFile= BmobFile()
|
||||
var introduce: String=""
|
||||
var author_name: String=""
|
||||
var author_introduce: String=""
|
||||
var evaluate: String=""
|
||||
var authorpic:BmobFile=BmobFile()
|
||||
var yiban:Int=0
|
||||
var tuijian:Int=0
|
||||
var buxing:Int=0
|
||||
var countOfReaders:Int=0
|
||||
var authorid:String=""
|
||||
fun settuijian(tuijian1: Int){
|
||||
this.tuijian=tuijian1
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable/collect.png
Normal file
BIN
app/src/main/res/drawable/collect.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 843 B |
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/intro_titleback"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/return1"
|
||||
android:text="Back"
|
||||
android:textColor="#fff"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/thebkname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:text="TextView" />
|
||||
|
||||
</LinearLayout>
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/textView14"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
android:textSize="20dp"
|
||||
android:text="简介" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/brief"-->
|
||||
<!-- android:background="@drawable/mybookinfback"-->
|
||||
<!-- android:layout_margin="10dp"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="TextView" />-->
|
||||
<include layout="@layout/expandable3"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/color_lightpurple"
|
||||
android:layout_height="1dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textStyle="italic"
|
||||
android:textSize="20dp"
|
||||
android:text="推荐语" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/myevaluate"-->
|
||||
<!-- android:background="@drawable/mybookinfback"-->
|
||||
<!-- android:layout_margin="10dp"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="TextView" />-->
|
||||
<include layout="@layout/expandable4"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
@ -109,7 +109,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/iv_xiangce"
|
||||
android:text="我的发布"
|
||||
android:text="我的随笔"
|
||||
android:textColor="#353535"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@ -153,7 +153,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/iv_shoucang"
|
||||
android:text="我的评论"
|
||||
android:text="我的消息"
|
||||
android:textColor="#353535"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@ -182,7 +182,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:src="@drawable/account" />
|
||||
android:src="@drawable/collect" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -190,7 +190,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/iv_money_bag"
|
||||
android:text="账号管理"
|
||||
android:text="我的收藏"
|
||||
android:textColor="#353535"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
@ -146,13 +146,13 @@
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/comment1" />
|
||||
android:src="@drawable/collect" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="50dp"
|
||||
android:text="评论数" />
|
||||
android:text="收藏数" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user