From 7193d8c0bde59b81ea4a9761e134c06754dfa4e9 Mon Sep 17 00:00:00 2001 From: zhangnaifu15 <1361423499@qq.com> Date: Thu, 29 Mar 2018 09:16:47 +0800 Subject: [PATCH] src\MyApplication\app\src\main\java\com\example\administrator\myapplication\adapter\NotebookAdapter.java --- .../myapplication/adapter/NotebookAdapter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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