今日完成了app收藏页面的收藏转移与删除功能。收藏页面通过listview展示,点击后进入详情页面,在这里可转移与删除收藏。
package com.example.cloudlibrary;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.example.cloudlibrary.Data.AllData;
import com.example.cloudlibrary.Data.ListData;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class MovieLikeActivity extends AppCompatActivity implements View.OnClickListener{
TextView movie_title_like;
TextView movie_star_like;
TextView movie_director_like;
TextView movie_type_like;
TextView movie_area_like;
TextView movie_date_like;
TextView movie_summary_like;
TextView movie_score_like;
TextView movie_language_like;
ImageView movie_img_like;
TextView movie_scorenum_like;
TextView movie_timelen_like;
TextView Ten_score_like;
TextView Ten_vip_like;
TextView Ai_score_like;
TextView Ai_vip_like;
TextView So_score_like;
TextView So_vip_like;
TextView score_1905_like;
TextView vip_1905_like;
Button movie_want_like;
Button movie_on_like;
Button movie_have_like;
Button movie_remove;
ListData listData;
private AllData allData=new AllData();
private String userphone;
private String username;
private String url;
private String usertype;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_movie_like);
Intent intent=getIntent();
usertype=intent.getStringExtra("usertype");
movie_want_like=(Button)findViewById(R.id.movie_want_like);
movie_on_like=(Button)findViewById(R.id.movie_on_like);
movie_have_like=(Button)findViewById(R.id.movie_have_like);
if(usertype.equals("想看")){
movie_want_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_on_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_have_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_want_like.setTextColor(Color.parseColor("#ffffff"));
movie_on_like.setTextColor(Color.parseColor("#000000"));
movie_have_like.setTextColor(Color.parseColor("#000000"));
}
if(usertype.equals("在看")){
movie_want_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_on_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_have_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_want_like.setTextColor(Color.parseColor("#000000"));
movie_on_like.setTextColor(Color.parseColor("#ffffff"));
movie_have_like.setTextColor(Color.parseColor("#000000"));
}
if(usertype.equals("看过")){
movie_want_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_on_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_have_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_want_like.setTextColor(Color.parseColor("#000000"));
movie_on_like.setTextColor(Color.parseColor("#000000"));
movie_have_like.setTextColor(Color.parseColor("#ffffff"));
}
movie_remove=(Button)findViewById(R.id.movie_remove);
movie_title_like=(TextView)findViewById(R.id.movie_title_like);
movie_star_like=(TextView)findViewById(R.id.movie_star_like);
movie_director_like=(TextView)findViewById(R.id.movie_director_like);
movie_type_like=(TextView)findViewById(R.id.movie_type_like);
movie_area_like=(TextView)findViewById(R.id.movie_area_like);
movie_date_like=(TextView)findViewById(R.id.movie_date_like);
movie_summary_like=(TextView)findViewById(R.id.movie_summary_like);
movie_score_like=(TextView)findViewById(R.id.movie_score_like);
movie_language_like=(TextView)findViewById(R.id.movie_language_like);
movie_img_like=(ImageView)findViewById(R.id.movie_img_like);
movie_scorenum_like=(TextView)findViewById(R.id.movie_scorenum_like);
movie_timelen_like=(TextView)findViewById(R.id.movie_timelen_like);
Ten_score_like=(TextView)findViewById(R.id.Ten_score_like);
Ten_vip_like=(TextView)findViewById(R.id.Ten_vip_like);
Ai_score_like=(TextView)findViewById(R.id.Ai_score_like);
Ai_vip_like=(TextView)findViewById(R.id.Ai_vip_like);
So_score_like=(TextView)findViewById(R.id.So_score_like);
So_vip_like=(TextView)findViewById(R.id.So_vip_like);
score_1905_like=(TextView)findViewById(R.id.score_1905_like);
vip_1905_like=(TextView)findViewById(R.id.vip_1905_like);
movie_remove.setOnClickListener(this);
movie_want_like.setOnClickListener(this);
movie_on_like.setOnClickListener(this);
movie_have_like.setOnClickListener(this);
movie_remove.setOnClickListener(this);
movie_want_like.setOnClickListener(this);
movie_on_like.setOnClickListener(this);
movie_have_like.setOnClickListener(this);
String movie_title_str=intent.getStringExtra("title");
String movie_scorenum_str=intent.getStringExtra("scorenum");
set_movie(movie_title_str,movie_scorenum_str);
SharedPreferences sp=getSharedPreferences("userdata",MODE_PRIVATE);
userphone=(sp.getString("user_phone",""));
username=(sp.getString("user_name",""));
}
public void set_movie(String title,String scorenum){
RequestParams params = new RequestParams("http://"+allData.getUrl()+":5000/android_query");
//params.setMultipart(true);
params.addBodyParameter("title",title);
params.addBodyParameter("scorenum",scorenum);
//params.addBodyParameter("File",new File(Environment.getExternalStorageDirectory()+"/test_download/YLY.jpg"),null,"YLY.jpg");
x.http().get(params, new Callback.CacheCallback<String>() {
@Override
public boolean onCache(String result) {
return false;
}
@Override
public void onSuccess(String result) {
try {
JSONObject object=new JSONObject(result);
JSONArray array=object.optJSONArray("data");
movie_title_like.setText(array.getString(0));
movie_star_like.setText("主演:"+array.getString(1));
movie_director_like.setText("导演:"+array.getString(2));
movie_type_like.setText("类型:"+array.getString(3));
movie_area_like.setText("地区:"+array.getString(4));
movie_date_like.setText("上映时间:"+array.getString(5));
movie_summary_like.setText("简介:"+array.getString(6));
movie_score_like.setText(array.getString(7)+"分");
movie_language_like.setText("语言:"+array.getString(8));
movie_scorenum_like.setText("评价人数:"+array.getString(10));
movie_timelen_like.setText("时长:"+array.getString(11));
if(!array.getString(12).equals("0")){
Ten_score_like.setText(array.getString(12)+"分");
Ten_vip_like.setText(array.getString(13));
Log.e("TAG",array.getString(12));
}else{
Ten_score_like.setText("无此电影");
Ten_vip_like.setText("");
}
if(!array.getString(15).equals("0")){
Ai_score_like.setText(array.getString(15)+"分");
Ai_vip_like.setText(array.getString(16 ));
}else{
Ai_score_like.setText("无此电影");
Ai_vip_like.setText("");
}
if(!array.getString(18).equals("0")){
So_score_like.setText(array.getString(18)+"分");
So_vip_like.setText(array.getString(19 ));
}else{
So_score_like.setText("无此电影");
So_vip_like.setText("");
}
//1905电影网
if(!array.getString(18).equals("0")){
score_1905_like.setText(array.getString(18)+"分");
vip_1905_like.setText(array.getString(19 ));
}else{
score_1905_like.setText("无此电影");
vip_1905_like.setText("");
}
url=array.getString(9);
Bitmap bitmap = getHttpBitmap(url);
movie_img_like.setImageBitmap(bitmap);
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(Throwable ex, boolean isOnCallback) {
Log.e("TAG","onError=="+ex.toString());
}
@Override
public void onCancelled(CancelledException cex) {
Log.e("TAG","onCancelled=="+cex.toString());
}
@Override
public void onFinished() {
Log.e("TAG","onFinished");
}
});
}
public static Bitmap getHttpBitmap(String url){
URL myFileURL;
Bitmap bitmap=null;
try{
myFileURL = new URL(url);
//获得连接
HttpURLConnection conn=(HttpURLConnection)myFileURL.openConnection();
Log.e("TAG",conn.toString());
//设置超时时间为6000毫秒,conn.setConnectionTiem(0);表示没有时间限制
conn.setConnectTimeout(6000);
//连接设置获得数据流
conn.setDoInput(true);
//设置请求方式
conn.setRequestMethod("GET");
//不使用缓存
conn.setUseCaches(false);
//响应的状态码
int code = conn.getResponseCode();
//这句可有可无,没有影响
//conn.connect();
//得到数据流
InputStream is = conn.getInputStream();
//解析得到图片
bitmap = BitmapFactory.decodeStream(is);
//关闭数据流
is.close();
}catch(IOException e){
e.printStackTrace();
}
return bitmap;
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.movie_want_like:
movie_want_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_on_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_have_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_want_like.setTextColor(Color.parseColor("#ffffff"));
movie_on_like.setTextColor(Color.parseColor("#000000"));
movie_have_like.setTextColor(Color.parseColor("#000000"));
http_like_trans(userphone,movie_title_like.getText().toString(),usertype,movie_scorenum_like.getText().toString().substring(5),"想看");
break;
case R.id.movie_on_like:
movie_want_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_on_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_have_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_want_like.setTextColor(Color.parseColor("#000000"));
movie_on_like.setTextColor(Color.parseColor("#ffffff"));
movie_have_like.setTextColor(Color.parseColor("#000000"));
http_like_trans(userphone,movie_title_like.getText().toString(),usertype,movie_scorenum_like.getText().toString().substring(5),"在看");
break;
case R.id.movie_have_like:
movie_want_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_on_like.setBackgroundColor(Color.parseColor("#ffffff"));
movie_have_like.setBackgroundColor(Color.parseColor("#F8DDFF"));
movie_want_like.setTextColor(Color.parseColor("#000000"));
movie_on_like.setTextColor(Color.parseColor("#000000"));
movie_have_like.setTextColor(Color.parseColor("#ffffff"));
http_like_trans(userphone,movie_title_like.getText().toString(),usertype,movie_scorenum_like.getText().toString().substring(5),"看过");
break;
case R.id.movie_remove:
AlertDialog.Builder builder=new AlertDialog.Builder(this);
builder.setTitle("删除").setIcon(R.mipmap.ic_launcher).setMessage("确定要取消收藏吗");
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
MovieRemove(userphone,usertype,movie_title_like.getText().toString(),movie_scorenum_like.getText().toString().substring(5));
}
}).setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
AlertDialog ad=builder.create();
ad.show();
break;
}
}
public void http_like_trans(String userphone,String usermovie,String usertype,String scorenum,String usertype_new){
RequestParams params = new RequestParams("http://"+allData.getUrl()+":5000/android_user_like_trans");
//params.setMultipart(true);
params.addBodyParameter("userphone",userphone);
params.addBodyParameter("usermovie",usermovie);
params.addBodyParameter("usertype",usertype);
params.addBodyParameter("scorenum",scorenum);
params.addBodyParameter("usertype_new",usertype_new);
//params.addBodyParameter("File",new File(Environment.getExternalStorageDirectory()+"/test_download/YLY.jpg"),null,"YLY.jpg");
x.http().get(params, new Callback.CacheCallback<String>() {
@Override
public boolean onCache(String result) {
return false;
}
@Override
public void onSuccess(String result) {
try {
JSONObject object= null;
object = new JSONObject(result);
int Flag=object.optInt("data");
if(Flag==1){
Toast.makeText(MovieLikeActivity.this,"转移成功:"+usertype_new,Toast.LENGTH_LONG).show();
}
if(Flag==0){
Toast.makeText(MovieLikeActivity.this,"转移失败:"+usertype_new,Toast.LENGTH_LONG).show();
}
if(Flag==-1){
Toast.makeText(MovieLikeActivity.this,"已存在:"+usertype,Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(Throwable ex, boolean isOnCallback) {
Log.e("TAG","onError=="+ex.toString());
}
@Override
public void onCancelled(CancelledException cex) {
Log.e("TAG","onCancelled=="+cex.toString());
}
@Override
public void onFinished() {
Log.e("TAG","onFinished");
}
});
}
public void MovieRemove(String userphone,String usertype,String usermovie,String scorenum){
RequestParams params = new RequestParams("http://"+allData.getUrl()+":5000/android_delete");
//params.setMultipart(true);
params.addBodyParameter("userphone",userphone);
params.addBodyParameter("usermovie",usermovie);
params.addBodyParameter("usertype",usertype);
params.addBodyParameter("scorenum",scorenum);
//params.addBodyParameter("File",new File(Environment.getExternalStorageDirectory()+"/test_download/YLY.jpg"),null,"YLY.jpg");
x.http().get(params, new Callback.CacheCallback<String>() {
@Override
public boolean onCache(String result) {
return false;
}
@Override
public void onSuccess(String result) {
try {
JSONObject object= null;
object = new JSONObject(result);
int Flag=object.optInt("data");
if(Flag==1){
Toast.makeText(MovieLikeActivity.this,"删除成功",Toast.LENGTH_LONG).show();
}
if(Flag==0){
Toast.makeText(MovieLikeActivity.this,"删除失败",Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(Throwable ex, boolean isOnCallback) {
Log.e("TAG","onError=="+ex.toString());
}
@Override
public void onCancelled(CancelledException cex) {
Log.e("TAG","onCancelled=="+cex.toString());
}
@Override
public void onFinished() {
Log.e("TAG","onFinished");
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
tools:context=".MovieLikeActivity"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/movie_img_like"
android:layout_width="150dp"
android:layout_height="180dp"
android:src="@mipmap/head3">
</ImageView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/movie_title_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="百变小樱"
android:textSize="20dp"
android:textColor="#EEAAFF">
</TextView>
<TextView
android:id="@+id/movie_score_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="9.9分"
android:textColor="#EEAAFF"
android:textSize="20dp"></TextView>
<TextView android:id="@+id/movie_scorenum_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="评价人数:101245"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
<TextView android:id="@+id/movie_type_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="类型:喜剧 爱情"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
<TextView android:id="@+id/movie_area_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国家地区:中国大陆"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
<TextView android:id="@+id/movie_date_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上映时间:2021-01-01"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
<TextView android:id="@+id/movie_language_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="语言:日语"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
<TextView android:id="@+id/movie_timelen_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="时长:126分钟"
android:textSize="18dp"
android:layout_marginTop="5dp"></TextView>
</LinearLayout>
</LinearLayout>
<TextView android:id="@+id/movie_director_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="导演:大道世知世"
android:textSize="18dp">
</TextView>
<TextView android:id="@+id/movie_star_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主演:木之本樱 雪兔 小可 小狼 梅玲"
android:textSize="18dp">
</TextView>
<View
android:layout_width="match_parent"
android:layout_height="4px"
android:layout_above="@id/main_group"
android:background="#EEAAFF" />
<TextView android:id="@+id/movie_summary_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="简介:
孙悟空(周星驰)护送唐三藏(罗家英)去西天取经路上,与牛魔王合谋欲杀害唐三藏,并偷走了月光宝盒,此举使观音萌生将其铲除心思,经唐三藏请求,孙悟空被判五百年后重新投胎做人赎其罪孽。
五百年后孙悟空化身强盗头头至尊宝。当遇见预谋吃唐僧肉的妖怪姐妹蜘蛛精春三十娘(蓝洁瑛)和白骨精白晶晶(莫文蔚)时,因为五百年前孙悟空曾与白晶晶有过一段恋情,至尊宝与她一见钟情,但因菩提老祖将二人妖怪身份相告,至尊宝仍带领众强盗开始与二妖展开周旋,过程中,白晶晶为救至尊宝打伤春三十娘,自己也中毒受伤,为了救白晶晶,至尊宝去找春三十娘,遭白晶晶误会,绝望自杀,至尊宝开始用月光宝盒以期使时光倒流。
"
android:textSize="18dp"
android:layout_marginTop="10dp">
</TextView>
<View
android:id="@+id/div_tab_bar_like"
android:layout_width="match_parent"
android:layout_height="4px"
android:layout_above="@id/main_group"
android:background="#EEAAFF" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="在哪里看:"
android:textColor="#EEAAFF"
android:textSize="20dp"
android:layout_marginTop="20dp">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="腾讯视频:"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/Ten_score_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:text="9.5分"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/Ten_vip_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VIP"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="爱奇艺:"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/Ai_score_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:text="9.5分"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/Ai_vip_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VIP"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="搜狐视频:"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/So_score_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:text="9.5分"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/So_vip_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VIP"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1905电影网:"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/score_1905_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:text="9.5分"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
<TextView android:id="@+id/vip_1905_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VIP"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
</TextView>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="4px"
android:layout_above="@id/main_group"
android:background="#EEAAFF" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="转移到:"
android:textSize="20dp"
android:layout_marginTop="20dp"
android:textColor="#EEAAFF"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<Button android:id="@+id/movie_want_like"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="想看"
android:textSize="20dp"
android:layout_weight="1"
android:background="#ffffff"></Button>
<Button android:id="@+id/movie_on_like"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="在看"
android:textSize="20dp"
android:layout_weight="1"
android:background="#ffffff">
</Button>
<Button android:id="@+id/movie_have_like"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="看过"
android:textSize="20dp"
android:layout_weight="1"
android:background="#ffffff">
</Button>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="4px"
android:layout_above="@id/main_group"
android:background="#EEAAFF" />
<Button android:id="@+id/movie_remove"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="取消收藏"
android:textSize="20dp"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:background="#F8DDFF"
android:textColor="@color/white">
</Button>
</LinearLayout>
</ScrollView>