Commit 3b7ed7dc authored by Luboš Horáček's avatar Luboš Horáček

#338 Opravy malého displeje

parent c0d3f3e5
......@@ -70,7 +70,7 @@
<cz.nic.tablexia.widget.StatisticsPointDetailBackground
android:layout_width="@dimen/screen_statistics_pointdetail_width"
android:layout_height="@dimen/screen_statistics_pointdetail_height"
android:layout_gravity="center"/>
android:layout_gravity="center" />
<LinearLayout
android:layout_width="match_parent"
......@@ -111,16 +111,16 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:textSize="@dimen/screen_statistics_chartdetail_textsize"
android:textColor="@android:color/black" />
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
<TextView
android:id="@+id/screen_statistics_chartdetail_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="@dimen/screen_statistics_chartdetail_textsize"
android:textColor="@android:color/black" />
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
......@@ -144,13 +144,18 @@
android:layout_weight="1"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/screen_statistics_gamelist"
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="21"
android:orientation="vertical" >
</LinearLayout>
android:layout_weight="21" >
<LinearLayout
android:id="@+id/screen_statistics_gamelist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="match_parent"
......
......@@ -19,14 +19,15 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:paddingBottom="@dimen/screen_statistics_list_padding"
android:paddingTop="@dimen/screen_statistics_list_padding" >
<cz.nic.tablexia.widget.TablexiaImageButton
<ImageView
android:id="@+id/screen_statistics_gamelist_item_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:background="@drawable/screen_statistics_gamelist_listitem_background1_inactive"
android:scaleType="fitCenter"
android:src="@drawable/screen_statistics_gamelist_listitem_background1_inactive" />
......@@ -34,13 +35,10 @@
android:id="@+id/screen_statistics_gamelist_item_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:gravity="center"
android:maxLines="1"
android:clickable="false"
android:textStyle="bold"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_gamelist_item_textsize"
android:textColor="@android:color/black" />
android:textStyle="bold" />
</FrameLayout>
</FrameLayout>
\ No newline at end of file
......@@ -72,6 +72,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:gravity="center"
android:singleLine="true"
android:text="@string/screen_statistics_displaytype_dailyaverage"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_displaytype_textsize"
......@@ -83,6 +84,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingRight="5dp" />
android:paddingRight="5dp"
android:paddingLeft="0dp" />
</LinearLayout>
\ No newline at end of file
......@@ -74,6 +74,7 @@
<dimen name="screen_gamemenu_titleimage_width">700dp</dimen>
<dimen name="screen_gamemenu_titleimage_maxheight">200dp</dimen>
<dimen name="screen_loader_versionname">8sp</dimen>
<dimen name="screen_statistics_list_padding">4dp</dimen>
<item name="tablexiadialog_button_scale" format="float" type="dimen">1.0</item>
......
......@@ -76,7 +76,7 @@
<dimen name="screen_statistics_pointdetail_height">112dp</dimen>
<dimen name="screen_halloffame_starcounter_textsize">32sp</dimen>
<dimen name="screen_statistics_list_padding">5dp</dimen>
<dimen name="gameloadingscreen_button_width">200dp</dimen>
<dimen name="gameloadingscreen_background_width">750dp</dimen>
<dimen name="gameloadingscreen_button_marginbottom">75dp</dimen>
......
......@@ -86,6 +86,8 @@
<dimen name="screen_halloffame_starcounter_padding">3dp</dimen>
<dimen name="screen_halloffame_starcounter_description_textSize">18sp</dimen>
<dimen name="screen_statistics_list_padding">2dp</dimen>
<dimen name="screen_encyklopedia_padding">50dp</dimen>
<dimen name="gameloadingscreen_button_width">160dp</dimen>
......
......@@ -131,7 +131,7 @@ public class Statistics extends AbstractMenuFragment {
GAMELIST_ACTIVEBACKGROUND_MAPPING.put(GamesDefinition.POTME, R.drawable.screen_statistics_gamelist_listitem_background1_active);
}
private Map<GamesDefinition, ImageButton> gameListItems;
private Map<GamesDefinition, ImageView> gameListItems;
private GameDifficulty selectedDifficulty;
private List<GameManager> selectedGameLogs;
private View detailInfoPanel;
......@@ -139,7 +139,7 @@ public class Statistics extends AbstractMenuFragment {
public Statistics() {
super(R.layout.screen_statistics, SpeechSounds.STATISTICS_INTRO);
difficultySeries = new HashMap<GameDifficulty, XYSeries>();
gameListItems = new HashMap<GamesDefinition, ImageButton>();
gameListItems = new HashMap<GamesDefinition, ImageView>();
selectedGameDefinition = INITIALLY_SELECTED_GAME;
}
......@@ -276,10 +276,10 @@ public class Statistics extends AbstractMenuFragment {
private void prepareGameListItem(View fragmentLayout, LayoutInflater inflater, final GamesDefinition gameDefinition) {
LinearLayout gameList = (LinearLayout) fragmentLayout.findViewById(R.id.screen_statistics_gamelist);
FrameLayout gameListItem = (FrameLayout) inflater.inflate(R.layout.screen_statistics_gamelist_item, null, false);
View gameListItem = inflater.inflate(R.layout.screen_statistics_gamelist_item, null, false);
gameList.addView(gameListItem);
final ImageButton gameListImageButton = (ImageButton) gameListItem.findViewById(R.id.screen_statistics_gamelist_item_background);
final ImageView gameListImageButton = (ImageView) gameListItem.findViewById(R.id.screen_statistics_gamelist_item_background);
gameListItems.put(gameDefinition, gameListImageButton);
gameListImageButton.setOnClickListener(new OnClickListener() {
......@@ -298,18 +298,16 @@ public class Statistics extends AbstractMenuFragment {
private void refreshGameListBackgroundState() {
for (GamesDefinition gameDefinition : GamesDefinition.getGames()) {
ImageButton gameListItem = gameListItems.get(gameDefinition);
ImageView gameListItem = gameListItems.get(gameDefinition);
if (gameListItem != null) {
if (gameDefinition == selectedGameDefinition) {
Integer selectedGameResourceId = GAMELIST_ACTIVEBACKGROUND_MAPPING.get(gameDefinition);
if (selectedGameResourceId != null) {
gameListItem.setBackgroundResource(selectedGameResourceId);
gameListItem.setImageResource(selectedGameResourceId);
}
} else {
Integer unselectGameResourceId = GAMELIST_INACTIVEBACKGROUND_MAPPING.get(gameDefinition);
if (unselectGameResourceId != null) {
gameListItem.setBackgroundResource(unselectGameResourceId);
gameListItem.setImageResource(unselectGameResourceId);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment