From ce6cace53b25d83981f98d913bb7b47168cab7e2 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Thu, 2 Jul 2015 22:36:06 +0000 Subject: [PATCH] Different screen sizes apply + clean up --- android/res/layout/article_album_element.xml | 10 +- .../res/layout/article_album_element_item.xml | 1 - android/res/layout/article_button_element.xml | 5 +- android/res/layout/article_geotag_element.xml | 21 ++- android/res/layout/article_phone_element.xml | 5 +- android/res/layout/article_photo_element.xml | 3 +- android/res/layout/article_text_element.xml | 1 - android/res/layout/drawer_list_element.xml | 14 +- android/res/layout/fragment_article_page.xml | 15 +- android/res/layout/fragment_catalog_page.xml | 12 +- android/res/layout/fragment_main_page.xml | 9 +- .../res/layout/fragment_navigation_drawer.xml | 6 +- android/res/layout/fragment_news_page.xml | 9 +- android/res/layout/fragment_osm_map_page.xml | 11 +- .../layout/fragment_photo_album_list_page.xml | 8 +- .../res/layout/fragment_photo_album_page.xml | 12 +- android/res/layout/fragment_photo_page.xml | 4 +- android/res/layout/fragment_search_page.xml | 7 +- android/res/layout/fragment_settings_page.xml | 73 ++++---- android/res/layout/fragment_video_page.xml | 10 +- .../res/layout/fragment_video_record_page.xml | 62 ++++--- android/res/layout/fragment_welcome.xml | 23 ++- android/res/layout/journal_element.xml | 16 +- android/res/layout/journal_page_header.xml | 10 +- android/res/layout/main_page_header.xml | 4 +- android/res/layout/main_page_list_element.xml | 51 +++--- android/res/layout/main_page_news.xml | 28 ++- android/res/layout/main_page_search.xml | 8 +- android/res/layout/news_page_list_element.xml | 42 ++--- android/res/layout/news_page_list_footer.xml | 6 +- android/res/layout/news_page_list_header.xml | 8 +- android/res/layout/osm_dialog.xml | 30 ++-- android/res/layout/photo_album_element.xml | 1 - .../res/layout/photo_album_list_element.xml | 1 - android/res/layout/photo_page_element.xml | 10 +- .../res/layout/search_page_list_header.xml | 5 +- .../res/layout/simple_hview_list_element.xml | 12 +- android/res/layout/spinner_dropdown_item.xml | 10 ++ .../res/layout/video_page_list_element.xml | 10 +- android/res/menu/global.xml | 6 +- android/res/values-large/dimens.xml | 73 ++++++++ android/res/values-large/integers.xml | 5 + android/res/values-normal/dimens.xml | 73 ++++++++ android/res/values-normal/integers.xml | 5 + android/res/values-ru/strings.xml | 6 +- android/res/values-small/dimens.xml | 70 ++++++++ android/res/values-small/integers.xml | 5 + android/res/values-xlarge/dimens.xml | 73 ++++++++ android/res/values-xlarge/integers.xml | 5 + android/res/values-zh-rCN/strings.xml | 7 +- android/res/values/dimens.xml | 68 +++++++- android/res/values/integers.xml | 1 + android/res/values/strings.xml | 6 +- .../fishrungames/bashgid/ArticleFragment.java | 6 +- .../fishrungames/bashgid/CatalogFragment.java | 11 +- .../fishrungames/bashgid/JournalFragment.java | 39 +++-- .../fishrungames/bashgid/MainActivity.java | 165 +++--------------- .../bashgid/MainPageFragment.java | 13 +- .../bashgid/MainPageHListViewAdapters.java | 24 +-- .../bashgid/NavigationDrawerFragment.java | 12 +- .../bashgid/NewsListFragment.java | 6 +- .../bashgid/OsmMapHolderFragment.java | 19 +- .../fishrungames/bashgid/SearchFragment.java | 58 +++++- .../bashgid/core/AlbumManager.java | 8 +- 64 files changed, 824 insertions(+), 513 deletions(-) create mode 100644 android/res/layout/spinner_dropdown_item.xml create mode 100644 android/res/values-large/dimens.xml create mode 100644 android/res/values-large/integers.xml create mode 100644 android/res/values-normal/dimens.xml create mode 100644 android/res/values-normal/integers.xml create mode 100644 android/res/values-small/dimens.xml create mode 100644 android/res/values-small/integers.xml create mode 100644 android/res/values-xlarge/dimens.xml create mode 100644 android/res/values-xlarge/integers.xml diff --git a/android/res/layout/article_album_element.xml b/android/res/layout/article_album_element.xml index 125ffd5..24a6c9b 100644 --- a/android/res/layout/article_album_element.xml +++ b/android/res/layout/article_album_element.xml @@ -2,26 +2,26 @@ + android:layout_margin="@dimen/medium_margin" + android:text="TextView" + android:textSize="@dimen/small_text_size" /> diff --git a/android/res/layout/article_button_element.xml b/android/res/layout/article_button_element.xml index 3633a0f..6a1250a 100644 --- a/android/res/layout/article_button_element.xml +++ b/android/res/layout/article_button_element.xml @@ -3,7 +3,6 @@ android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" android:background="@color/light_grey_1" android:orientation="vertical" android:showDividers="middle" > @@ -13,10 +12,10 @@ style="?android:attr/borderlessButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="8dp" + android:layout_margin="@dimen/medium_margin" android:background="@color/bkg2" android:drawableLeft="@drawable/ic_action_web_site" android:text="@string/go_to_website" - android:textSize="30sp" /> + android:textSize="@dimen/xlarge_text_size" /> diff --git a/android/res/layout/article_geotag_element.xml b/android/res/layout/article_geotag_element.xml index 76b457b..e6ec4c3 100644 --- a/android/res/layout/article_geotag_element.xml +++ b/android/res/layout/article_geotag_element.xml @@ -3,7 +3,6 @@ android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" android:background="@color/light_grey_1" android:orientation="vertical" android:showDividers="middle" > @@ -12,31 +11,35 @@ android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="8dp" + android:layout_margin="@dimen/medium_margin" android:text="@string/address_form" - android:textSize="24sp" + android:textSize="@dimen/large_text_size" android:textStyle="bold" /> + android:textSize="@dimen/large_text_size" + /> + android:text="@string/hold_address" + android:textSize="@dimen/small_text_size" + android:layout_marginBottom="@dimen/medium_margin" + android:layout_marginLeft="@dimen/medium_margin"/> diff --git a/android/res/layout/article_phone_element.xml b/android/res/layout/article_phone_element.xml index 2e396f1..e6403e2 100644 --- a/android/res/layout/article_phone_element.xml +++ b/android/res/layout/article_phone_element.xml @@ -3,7 +3,6 @@ android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" android:background="@color/light_grey_1" android:orientation="vertical" android:showDividers="middle" > @@ -13,10 +12,10 @@ style="?android:attr/borderlessButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="8dp" + android:layout_margin="@dimen/medium_margin" android:background="@color/bkg2" android:drawableLeft="@drawable/ic_action_call" android:gravity="left|center_vertical" - android:textSize="30sp" /> + android:textSize="@dimen/xlarge_text_size" /> diff --git a/android/res/layout/article_photo_element.xml b/android/res/layout/article_photo_element.xml index 955c158..ac3f1ce 100644 --- a/android/res/layout/article_photo_element.xml +++ b/android/res/layout/article_photo_element.xml @@ -3,7 +3,6 @@ android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" android:background="@color/light_grey_1" android:orientation="vertical" android:showDividers="middle" > @@ -23,7 +22,7 @@ android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="TextView" - android:textSize="18sp" + android:textSize="@dimen/medium_text_size" android:textStyle="bold" /> diff --git a/android/res/layout/article_text_element.xml b/android/res/layout/article_text_element.xml index 2cc7622..8ee75f2 100644 --- a/android/res/layout/article_text_element.xml +++ b/android/res/layout/article_text_element.xml @@ -3,7 +3,6 @@ android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" android:background="@color/light_grey_1" android:orientation="vertical" android:showDividers="middle" > diff --git a/android/res/layout/drawer_list_element.xml b/android/res/layout/drawer_list_element.xml index f780d33..1c8c602 100644 --- a/android/res/layout/drawer_list_element.xml +++ b/android/res/layout/drawer_list_element.xml @@ -9,10 +9,10 @@ + android:textSize="@dimen/medium_text_size" /> diff --git a/android/res/layout/fragment_article_page.xml b/android/res/layout/fragment_article_page.xml index cb37c70..db8317b 100644 --- a/android/res/layout/fragment_article_page.xml +++ b/android/res/layout/fragment_article_page.xml @@ -7,26 +7,23 @@ android:orientation="vertical" tools:context="fishrungames.bashgid.MainPageFragment" > - - - + android:dividerHeight="@dimen/large_divider_height" > diff --git a/android/res/layout/fragment_catalog_page.xml b/android/res/layout/fragment_catalog_page.xml index 64bfe3c..f71009a 100644 --- a/android/res/layout/fragment_catalog_page.xml +++ b/android/res/layout/fragment_catalog_page.xml @@ -10,8 +10,8 @@ @@ -19,11 +19,11 @@ android:id="@+id/listView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" + android:layout_marginBottom="@dimen/large_margin" + android:layout_marginLeft="@dimen/large_margin" + android:layout_marginRight="@dimen/large_margin" android:divider="@drawable/transparent" - android:dividerHeight="18dp" - android:paddingBottom="16dp" > + android:dividerHeight="@dimen/large_divider_height" > diff --git a/android/res/layout/fragment_main_page.xml b/android/res/layout/fragment_main_page.xml index 2a11301..156b111 100644 --- a/android/res/layout/fragment_main_page.xml +++ b/android/res/layout/fragment_main_page.xml @@ -11,11 +11,12 @@ android:id="@+id/listView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" + android:layout_marginBottom="@dimen/large_margin" + android:layout_marginLeft="@dimen/large_margin" + android:layout_marginRight="@dimen/large_margin" android:divider="@drawable/transparent" - android:dividerHeight="18dp" - android:paddingBottom="16dp" > + android:dividerHeight="@dimen/large_divider_height" > + diff --git a/android/res/layout/fragment_navigation_drawer.xml b/android/res/layout/fragment_navigation_drawer.xml index 33c81c3..1374b60 100644 --- a/android/res/layout/fragment_navigation_drawer.xml +++ b/android/res/layout/fragment_navigation_drawer.xml @@ -6,8 +6,8 @@ android:background="@color/drawer_color" android:choiceMode="singleChoice" android:divider="@color/drawer_divider_color" - android:dividerHeight="1dp" - android:paddingLeft="10dp" - android:paddingRight="10dp" + android:dividerHeight="@dimen/navigation_drawer_divider_height" + android:paddingLeft="@dimen/navigation_drawer_padding_left" + android:paddingRight="@dimen/navigation_drawer_padding_right" tools:context="fishrungames.bashgid.NavigationDrawerFragment" /> diff --git a/android/res/layout/fragment_news_page.xml b/android/res/layout/fragment_news_page.xml index 0c2b6bc..a0ffb6a 100644 --- a/android/res/layout/fragment_news_page.xml +++ b/android/res/layout/fragment_news_page.xml @@ -12,11 +12,12 @@ android:id="@+id/listView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" + android:layout_marginBottom="@dimen/large_margin" + android:layout_marginLeft="@dimen/large_margin" + android:layout_marginRight="@dimen/large_margin" android:divider="@color/bkg2" - android:dividerHeight="2dp" - android:paddingBottom="16dp" > + android:dividerHeight="@dimen/small_divider_height" + > diff --git a/android/res/layout/fragment_osm_map_page.xml b/android/res/layout/fragment_osm_map_page.xml index 52c21f6..53f5ed2 100644 --- a/android/res/layout/fragment_osm_map_page.xml +++ b/android/res/layout/fragment_osm_map_page.xml @@ -11,20 +11,21 @@ tools:context="fishrungames.bashgid.MapHolderFragment" > + android:layout_height="wrap_content" + android:layout_margin="@dimen/medium_margin" /> + android:dividerHeight="@dimen/small_divider_height" > diff --git a/android/res/layout/fragment_photo_album_page.xml b/android/res/layout/fragment_photo_album_page.xml index 73a1e7c..c939213 100644 --- a/android/res/layout/fragment_photo_album_page.xml +++ b/android/res/layout/fragment_photo_album_page.xml @@ -12,19 +12,19 @@ android:id="@+id/listView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" + android:layout_marginBottom="@dimen/large_margin" + android:layout_marginLeft="@dimen/large_margin" + android:layout_marginRight="@dimen/large_margin" android:divider="@color/bkg2" - android:dividerHeight="12dp" - android:paddingBottom="16dp" > + android:dividerHeight="@dimen/small_divider_height" > diff --git a/android/res/layout/fragment_photo_page.xml b/android/res/layout/fragment_photo_page.xml index ec5e6b2..eac95f9 100644 --- a/android/res/layout/fragment_photo_page.xml +++ b/android/res/layout/fragment_photo_page.xml @@ -7,8 +7,8 @@ diff --git a/android/res/layout/fragment_search_page.xml b/android/res/layout/fragment_search_page.xml index 263f855..083c04c 100644 --- a/android/res/layout/fragment_search_page.xml +++ b/android/res/layout/fragment_search_page.xml @@ -3,10 +3,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingBottom="@dimen/activity_vertical_margin" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin" - android:paddingTop="@dimen/activity_vertical_margin" + android:paddingBottom="@dimen/large_margin" + android:paddingLeft="@dimen/large_margin" + android:paddingRight="@dimen/large_margin" tools:context="fishrungames.bashgid.SearchFragment" > - + android:textSize="@dimen/large_text_size" /> + android:layout_marginBottom="@dimen/medium_margin" + android:baselineAligned="false" > + android:textSize="@dimen/language_text_size" /> + android:textSize="@dimen/language_text_size" /> + android:textSize="@dimen/language_text_size" /> + android:textSize="@dimen/small_text_size" /> + android:src="@drawable/kitap" + android:layout_marginBottom="@dimen/medium_margin" />