mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 10:43:44 +01:00
fix layout issue in store
This commit is contained in:
1 parent
2e5f8e0743
commit
804ddf03f2
1 file changed
+5
-4
+5
-4
@@ -197,16 +197,17 @@ void StoreScreen::CreateViews() {
|
||||
|
||||
LinearLayout *content;
|
||||
if (connectionError_ || loading_) {
|
||||
content = new LinearLayout(ORIENT_VERTICAL);
|
||||
content = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
|
||||
content->Add(new TextView(loading_ ? "Loading.." : "Connection Error"));
|
||||
content->Add(new Button("Retry"))->OnClick.Handle(this, &StoreScreen::OnRetry);
|
||||
content->Add(new Button("Back"))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
} else {
|
||||
content = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
ScrollView *leftScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(0.5f));
|
||||
content = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
|
||||
ScrollView *leftScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f));
|
||||
content->Add(leftScroll);
|
||||
LinearLayout *scrollItemView = new LinearLayout(ORIENT_VERTICAL);
|
||||
LinearLayout *scrollItemView = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
leftScroll->Add(scrollItemView);
|
||||
|
||||
std::vector<StoreEntry> entries = FilterEntries();
|
||||
for (size_t i = 0; i < entries.size(); i++) {
|
||||
scrollItemView->Add(new ProductItemView(entries_[i]))->OnClick.Handle(this, &StoreScreen::OnGameSelected);
|
||||
|
||||
Reference in new issue
Block a user