diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/adapter/NotebookAdapter.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/adapter/NotebookAdapter.java index 55aa5f1..6f99d3a 100644 --- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/adapter/NotebookAdapter.java +++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/adapter/NotebookAdapter.java @@ -1,9 +1,6 @@ package com.example.administrator.myapplication.adapter; import android.app.Activity; -import android.graphics.Color; -import android.graphics.drawable.ColorDrawable; -import android.provider.CalendarContract; import android.text.Html; import android.view.View; import android.view.ViewGroup; @@ -91,7 +88,6 @@ public class NotebookAdapter extends BaseAdapter implements HTQDragGridView.Drag datas.get(position).setIid(position); NotebookData data = datas.get(position); - ViewHolder holder = null; if (v == null) { holder = new ViewHolder(); v = View.inflate(aty, R.layout.item_notebook, null); @@ -108,7 +104,7 @@ public class NotebookAdapter extends BaseAdapter implements HTQDragGridView.Drag LayoutParams params = (LayoutParams) holder.content .getLayoutParams(); params.width = width; - params.height = (params.width - height); + params.height = params.width - height; holder.content.setLayoutParams(params); holder.titleBar