Issue UI优化汇总完成

This commit is contained in:
khy
2016-09-08 16:37:32 +08:00
parent 1dd895ebef
commit 5c4a65d278
26 changed files with 92 additions and 74 deletions

View File

@ -75,7 +75,7 @@ public class ShareUtils {
contentView.setFocusableInTouchMode(true);
RecyclerView shareRecyclerView = new RecyclerView(context);
shareRecyclerView.setPadding(DisplayUtils.dip2px(context, 4), 0, DisplayUtils.dip2px(context, 4), 0);
shareRecyclerView.setPadding(DisplayUtils.dip2px(context, 4), DisplayUtils.dip2px(context, 4), DisplayUtils.dip2px(context, 4), 0);
shareRecyclerView.setBackgroundColor(Color.WHITE);
//RecyclerView禁止滑动
@ -90,7 +90,7 @@ public class ShareUtils {
shareRecyclerView.setAdapter(new ShareRecyclerViewAdapter());
RelativeLayout.LayoutParams rlParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
, maxHeight/3 - DisplayUtils.dip2px(context, 10));
, DisplayUtils.dip2px(context, 192));
rlParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
contentView.addView(shareRecyclerView,rlParams);
@ -125,13 +125,15 @@ public class ShareUtils {
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, maxHeight/6 - DisplayUtils.dip2px(context, 5)));
linearLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, DisplayUtils.dip2px(context, 96)));
linearLayout.setOrientation(LinearLayout.VERTICAL);
linearLayout.setGravity(Gravity.CENTER);
linearLayout.setGravity(Gravity.CENTER_HORIZONTAL);
linearLayout.setBackgroundResource(R.drawable.cardview_item_style);
ImageView shareLogo = new ImageView(context);
shareLogo.setLayoutParams(new ViewGroup.LayoutParams(DisplayUtils.dip2px(context,45), DisplayUtils.dip2px(context,45)));
LinearLayout.LayoutParams logoParams = new LinearLayout.LayoutParams(DisplayUtils.dip2px(context, 45), DisplayUtils.dip2px(context, 45));
logoParams.setMargins(0, DisplayUtils.dip2px(context, 10), 0, 0);
shareLogo.setLayoutParams(logoParams);
TextView shareLabel = new TextView(context);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);