From f50fd1ac61ef201840c88147d246107e2f17435b Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Thu, 13 Nov 2014 01:52:15 +0000 Subject: [PATCH] Added SQLite, added languages --- android/project.properties | 3 +- android/res/drawable/transparent_button.xml | 9 ++ .../res/drawable/transparent_highlighted.xml | 8 + .../res/layout/button_hview_list_element.xml | 8 +- android/res/layout/drawer_list_element.xml | 8 +- android/res/layout/fragment_news_page.xml | 22 +++ .../res/layout/fragment_news_record_page.xml | 38 +++++ android/res/layout/main_page_list_header.xml | 7 +- android/res/layout/news_page_list_element.xml | 33 ++++ android/res/layout/news_page_list_header.xml | 21 +++ android/res/menu/main.xml | 4 - android/res/values-ru/strings.xml | 41 +++++ android/res/values-zh-rCN/strings.xml | 38 +++++ android/res/values/colors.xml | 5 + android/res/values/strings.xml | 47 +++--- .../fishrungames/bashgid/MainActivity.java | 111 ++++++++++--- .../bashgid/MainPageFragment.java | 33 +++- .../bashgid/MainPageHListViewAdapters.java | 4 - .../bashgid/NavigationDrawerFragment.java | 42 +++-- .../bashgid/NewsListFragment.java | 151 ++++++++++++++++++ .../bashgid/NewsRecordFragment.java | 42 +++++ .../bashgid/core/DownloadManager.java | 17 +- .../bashgid/core/ImageManager.java | 70 ++++++++ .../bashgid/core/NewsManager.java | 64 +++++++- .../fishrungames/bashgid/core/RssReader.java | 7 + .../bashgid/core/db/BashgidSqliteHelper.java | 50 ++++++ .../bashgid/core/db/NewsDataSource.java | 88 ++++++++++ .../bashgid/core/db/NewsDbRecord.java | 9 ++ 28 files changed, 877 insertions(+), 103 deletions(-) create mode 100644 android/res/drawable/transparent_button.xml create mode 100644 android/res/drawable/transparent_highlighted.xml create mode 100644 android/res/layout/fragment_news_page.xml create mode 100644 android/res/layout/fragment_news_record_page.xml create mode 100644 android/res/layout/news_page_list_element.xml create mode 100644 android/res/layout/news_page_list_header.xml create mode 100644 android/res/values-ru/strings.xml create mode 100644 android/res/values-zh-rCN/strings.xml create mode 100644 android/src/fishrungames/bashgid/NewsListFragment.java create mode 100644 android/src/fishrungames/bashgid/NewsRecordFragment.java create mode 100644 android/src/fishrungames/bashgid/core/db/BashgidSqliteHelper.java create mode 100644 android/src/fishrungames/bashgid/core/db/NewsDataSource.java create mode 100644 android/src/fishrungames/bashgid/core/db/NewsDbRecord.java diff --git a/android/project.properties b/android/project.properties index 173817e..1865458 100644 --- a/android/project.properties +++ b/android/project.properties @@ -12,5 +12,4 @@ # Project target. target=android-21 -android.library.reference.1=..\\appcompat_v7 -android.library.reference.2=../HorizontalListViewLibrary +android.library.reference.1=..\\HorizontalListViewLibrary diff --git a/android/res/drawable/transparent_button.xml b/android/res/drawable/transparent_button.xml new file mode 100644 index 0000000..54885d4 --- /dev/null +++ b/android/res/drawable/transparent_button.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/res/drawable/transparent_highlighted.xml b/android/res/drawable/transparent_highlighted.xml new file mode 100644 index 0000000..4abf642 --- /dev/null +++ b/android/res/drawable/transparent_highlighted.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/android/res/layout/button_hview_list_element.xml b/android/res/layout/button_hview_list_element.xml index bd57d10..6996e4e 100644 --- a/android/res/layout/button_hview_list_element.xml +++ b/android/res/layout/button_hview_list_element.xml @@ -12,13 +12,13 @@ android:id="@+id/imageButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" /> + android:layout_gravity="center_horizontal" + android:contentDescription="@string/related_image" /> + android:layout_gravity="center_vertical" /> diff --git a/android/res/layout/drawer_list_element.xml b/android/res/layout/drawer_list_element.xml index 3938449..d6d4ebd 100644 --- a/android/res/layout/drawer_list_element.xml +++ b/android/res/layout/drawer_list_element.xml @@ -9,11 +9,11 @@ + android:contentDescription="@string/icon" /> diff --git a/android/res/layout/fragment_news_page.xml b/android/res/layout/fragment_news_page.xml new file mode 100644 index 0000000..6508282 --- /dev/null +++ b/android/res/layout/fragment_news_page.xml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/android/res/layout/fragment_news_record_page.xml b/android/res/layout/fragment_news_record_page.xml new file mode 100644 index 0000000..2da8fe4 --- /dev/null +++ b/android/res/layout/fragment_news_record_page.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/android/res/layout/main_page_list_header.xml b/android/res/layout/main_page_list_header.xml index 0b20900..aa34768 100644 --- a/android/res/layout/main_page_list_header.xml +++ b/android/res/layout/main_page_list_header.xml @@ -29,7 +29,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:contentDescription="@string/news_content_description_1" /> + android:contentDescription="@string/news_content_description" /> + android:contentDescription="@string/news_content_description" /> + android:contentDescription="@string/news_content_description" /> + diff --git a/android/res/layout/news_page_list_element.xml b/android/res/layout/news_page_list_element.xml new file mode 100644 index 0000000..7d50f41 --- /dev/null +++ b/android/res/layout/news_page_list_element.xml @@ -0,0 +1,33 @@ + + + + + +