From 804ddf03f2fb04ae3a240006aca602952f500151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 5 Dec 2013 17:08:20 +0100 Subject: [PATCH] fix layout issue in store --- UI/Store.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/UI/Store.cpp b/UI/Store.cpp index 57148707d5..04ca6c3eb2 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -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(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 entries = FilterEntries(); for (size_t i = 0; i < entries.size(); i++) { scrollItemView->Add(new ProductItemView(entries_[i]))->OnClick.Handle(this, &StoreScreen::OnGameSelected);