合集
This commit is contained in:
@ -135,6 +135,7 @@ public class DownloadDialog {
|
||||
private TextView download_percentage;
|
||||
private LinearLayout linearLayout;
|
||||
private ViewPager viewPager;
|
||||
private LinearLayout llCollection;
|
||||
|
||||
private int row;
|
||||
private int column;
|
||||
@ -198,8 +199,22 @@ public class DownloadDialog {
|
||||
TextView textView = (TextView) contentView.findViewById(R.id.dialog_title);
|
||||
textView.setText(gameName);
|
||||
|
||||
int size = game.getApk().size();
|
||||
int vpHeight = 0;
|
||||
if (size<=3){
|
||||
vpHeight = 72;
|
||||
}else if (size<=6){
|
||||
vpHeight = 136;
|
||||
}else {
|
||||
vpHeight = 200;
|
||||
}
|
||||
|
||||
linearLayout = (LinearLayout) contentView.findViewById(R.id.dialog_ll_hint);
|
||||
viewPager = (ViewPager) contentView.findViewById(R.id.dialog_viewPager);
|
||||
llCollection = (LinearLayout) contentView.findViewById(R.id.dialog_collection);
|
||||
ViewGroup.LayoutParams layoutParams = viewPager.getLayoutParams();
|
||||
layoutParams.height = DisplayUtils.dip2px(context,vpHeight);
|
||||
viewPager.setLayoutParams(layoutParams);
|
||||
|
||||
isLoadPlatform = false;
|
||||
|
||||
@ -571,6 +586,7 @@ public class DownloadDialog {
|
||||
viewHolder.itemView.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
llCollection.setVisibility(View.VISIBLE);
|
||||
if (viewHolder.download_item_tv_status.getVisibility() == View.GONE) {
|
||||
//下载游戏
|
||||
addDownloadEntry(apkEntity, viewHolder.download_item_tv_status);
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
package com.gh.gamecenter.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by khy on 2016/8/31.
|
||||
*/
|
||||
public class GameCollectionEntity {
|
||||
|
||||
private String color;
|
||||
|
||||
private String icon;
|
||||
|
||||
private String name;
|
||||
|
||||
private List<String> packages;
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setPackage(List<String> packages) {
|
||||
this.packages = packages;
|
||||
}
|
||||
public List<String> getPackage() {
|
||||
return packages;
|
||||
}
|
||||
}
|
||||
@ -22,6 +22,8 @@ public class GameEntity {
|
||||
|
||||
private ArrayList<ApkEntity> apk;
|
||||
|
||||
private ArrayList<GameCollectionEntity> collection;
|
||||
|
||||
private String slide;
|
||||
|
||||
private TestEntity test;
|
||||
@ -98,6 +100,14 @@ public class GameEntity {
|
||||
this.apk = apk;
|
||||
}
|
||||
|
||||
public ArrayList<GameCollectionEntity> getCollection() {
|
||||
return collection;
|
||||
}
|
||||
|
||||
public void setCollection(ArrayList<GameCollectionEntity> collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public String getSlide() {
|
||||
return slide;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user