Move from ListView to LinearLayout temporarily
These need to go into t he recyclerview instead.
This commit is contained in:
parent
7061e47a8c
commit
30bcad963e
@ -295,8 +295,8 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
|||||||
return new ExpandableLinearLayoutViewHolder(view);
|
return new ExpandableLinearLayoutViewHolder(view);
|
||||||
} else if (viewType == VIEWTYPE_VERSIONS) {
|
} else if (viewType == VIEWTYPE_VERSIONS) {
|
||||||
View view = LayoutInflater.from(parent.getContext())
|
View view = LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.app_details2_versions, parent, false);
|
.inflate(R.layout.app_details2_links, parent, false);
|
||||||
return new VersionsViewHolder(view);
|
return new ExpandableLinearLayoutViewHolder(view);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -408,6 +408,7 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
|||||||
vh.textView.setText("WHATS NEW GOES HERE");
|
vh.textView.setText("WHATS NEW GOES HERE");
|
||||||
} else if (viewType == VIEWTYPE_DONATE) {
|
} else if (viewType == VIEWTYPE_DONATE) {
|
||||||
DonateViewHolder vh = (DonateViewHolder) holder;
|
DonateViewHolder vh = (DonateViewHolder) holder;
|
||||||
|
vh.contentView.removeAllViews();
|
||||||
|
|
||||||
// Donate button
|
// Donate button
|
||||||
if (uriIsSetAndCanBeOpened(mApp.donateURL)) {
|
if (uriIsSetAndCanBeOpened(mApp.donateURL)) {
|
||||||
@ -485,7 +486,7 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
|||||||
AppSecurityPermissions perms = new AppSecurityPermissions(mContext, appDiff.pkgInfo);
|
AppSecurityPermissions perms = new AppSecurityPermissions(mContext, appDiff.pkgInfo);
|
||||||
vh.contentView.addView(perms.getPermissionsView(AppSecurityPermissions.WHICH_ALL));
|
vh.contentView.addView(perms.getPermissionsView(AppSecurityPermissions.WHICH_ALL));
|
||||||
} else if (viewType == VIEWTYPE_VERSIONS) {
|
} else if (viewType == VIEWTYPE_VERSIONS) {
|
||||||
final VersionsViewHolder vh = (VersionsViewHolder) holder;
|
final ExpandableLinearLayoutViewHolder vh = (ExpandableLinearLayoutViewHolder) holder;
|
||||||
vh.itemView.setOnClickListener(new View.OnClickListener() {
|
vh.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -495,7 +496,11 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
|||||||
vh.itemView.requestLayout();
|
vh.itemView.requestLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vh.contentView.setAdapter(mApkListAdapter);
|
vh.contentView.removeAllViews();
|
||||||
|
for (int i = 0; i < mApkListAdapter.getCount(); i++) {
|
||||||
|
View view = mApkListAdapter.getView(i, null, vh.contentView);
|
||||||
|
vh.contentView.addView(view, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user