fixing bugs and other stuff
This commit is contained in:
parent
482fb1edc4
commit
d977b27e9f
BIN
android/res/drawable/kitap.png
Normal file
BIN
android/res/drawable/kitap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |
@ -27,6 +27,12 @@
|
||||
android:background="@color/bkg2"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hintTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hold_address" />
|
||||
|
||||
<org.osmdroid.views.MapView
|
||||
android:id="@+id/mapview"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -9,57 +9,166 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="fishrungames.bashgid.SettingsFragment" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectLanguageTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_language"
|
||||
android:textSize="26sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/flag_view"
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_usa"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_english"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/united_states_icon_button"
|
||||
android:onClick="OnSelectEnglish" />
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_russia"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_russian"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/russia_icon_button"
|
||||
android:onClick="OnSelectRussian" />
|
||||
<TextView
|
||||
android:id="@+id/selectLanguageTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/select_language"
|
||||
android:textSize="26sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_china"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_chinese"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/china_icon_button"
|
||||
android:onClick="OnSelectChinese" />
|
||||
<LinearLayout
|
||||
android:id="@+id/flag_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp" >
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_english"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_usa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_english"
|
||||
android:onClick="OnSelectEnglish"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/united_states_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_russian"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_russia"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_russian"
|
||||
android:onClick="OnSelectRussian"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/russia_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView02"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_chinese"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_china"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_chinese"
|
||||
android:onClick="OnSelectChinese"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/china_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/credits"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/kitapImageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/kitap" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/callSupportButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/call_support" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/visitKitapButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/visit_kitap" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/visitDeveloperButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/visit_developer" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/visitTranslatorButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/visit_translator" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -24,46 +24,95 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="bottom" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_usa"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_english"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/united_states_icon_button"
|
||||
android:onClick="OnSelectEnglish" />
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_russia"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_russian"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/russia_icon_button"
|
||||
android:onClick="OnSelectRussian" />
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/lang_english"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_china"
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_usa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_english"
|
||||
android:onClick="OnSelectEnglish"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/united_states_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_chinese"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/china_icon_button"
|
||||
android:onClick="OnSelectChinese" />
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/lang_russian"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_russia"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_russian"
|
||||
android:onClick="OnSelectRussian"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/russia_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView02"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/lang_chinese"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/image_flag_china"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/lang_chinese"
|
||||
android:onClick="OnSelectChinese"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/china_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -32,20 +32,9 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/news1ImageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/news_content_description"
|
||||
android:maxWidth="40dp"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/news1Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
@ -63,20 +52,9 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/news2ImageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/news_content_description"
|
||||
android:maxWidth="40dp"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/news2Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
@ -94,20 +72,9 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/news3ImageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/transparent"
|
||||
android:contentDescription="@string/news_content_description"
|
||||
android:maxWidth="40dp"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/news3Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
|
32
android/res/layout/news_list_element.xml
Normal file
32
android/res/layout/news_list_element.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/LinearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@color/light_grey_1"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -33,6 +33,12 @@
|
||||
android:text="TextView"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hintTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hold_address" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
|
@ -74,5 +74,18 @@
|
||||
<string name="search_is_performing">Идет поиск, пожалуйста, подождите...</string>
|
||||
<string name="search_at_least_3_symbols">Чтобы начать поиск, введите как минимум 3 символа</string>
|
||||
|
||||
<string name="credits">Башгид (c) 2015\n\nВсе права принадлежат ГУП «Китап»\nТелефон: +73472238838\nhttp://kitap-ufa.ru/\n\nРазработчик - Владислав Хорев\nТелефон: +79260492730\nEmail: mephi1984@gmail.com\n\nПеревод на китайский язык сделан Лилией Лисицей\nТелефон: +8615756011926\n Email:lilialoo926@mail.ru</string>
|
||||
|
||||
<string name="call_support">У вас возникли трудности при работе с приложением? Нажмите сюда, чтобы позвонить в техподдержку.</string>
|
||||
|
||||
<string name="visit_kitap">Посетить сайт ГУП «Китап»</string>
|
||||
|
||||
<string name="visit_developer">Посетить сайт разработчика</string>
|
||||
|
||||
<string name="visit_translator">Посетить сайт переводчика</string>
|
||||
|
||||
<string name="hold_address">Чтобы скопировать адрес, нажмите и его удерживайте некоторое время.</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -67,5 +67,18 @@
|
||||
<string name="search_is_performing">正在搜索,请稍等…</string>
|
||||
<string name="search_at_least_3_symbols">输入关键字符,开始搜索</string>
|
||||
|
||||
<string name="credits">Bashguide (c) 2015\n\nApplication owner: ГУП «Китап»\nPhone: +73472238838\nhttp://kitap-ufa.ru/\n\nApplication is made by Vladislav Khorev\nPhone: +79260492730\nEmail: mephi1984@gmail.com\n\nTranslation to Chinese made by Little Fox Lilia\nPhone: +8615756011926\n Email:lilialoo926@mail.ru</string>
|
||||
|
||||
<string name="call_support">Having problems with application? Click here to call support.</string>
|
||||
|
||||
<string name="visit_kitap">Visit ГУП «Китап» website</string>
|
||||
|
||||
<string name="visit_developer">Visit developer\'s website</string>
|
||||
|
||||
<string name="visit_translator">Visit translator\'s website</string>
|
||||
|
||||
<string name="hold_address">Tap and hold address to copy it to clipboard.</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -75,6 +75,18 @@
|
||||
<string name="search_is_performing">Search is performing, please wait...</string>
|
||||
<string name="search_at_least_3_symbols">To start search, enter at least 3 symbols</string>
|
||||
|
||||
<string name="credits">Bashguide (c) 2015\n\nApplication owner: ГУП «Китап»\nPhone: +73472238838\nhttp://kitap-ufa.ru/\n\nApplication is made by Vladislav Khorev\nPhone: +79260492730\nEmail: mephi1984@gmail.com\n\nTranslation to Chinese made by Little Fox Lilia\nPhone: +8615756011926\n Email:lilialoo926@mail.ru</string>
|
||||
|
||||
<string name="call_support">Having problems with application? Click here to call support.</string>
|
||||
|
||||
<string name="visit_kitap">Visit ГУП «Китап» website</string>
|
||||
|
||||
<string name="visit_developer">Visit developer\'s website</string>
|
||||
|
||||
<string name="visit_translator">Visit translator\'s website</string>
|
||||
|
||||
<string name="hold_address">Tap and hold address to copy it to clipboard.</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -14,6 +14,7 @@ import org.osmdroid.views.MapView;
|
||||
|
||||
import fishrungames.bashgid.OsmMapHolderFragment.CustomItemizedOverlay;
|
||||
import fishrungames.bashgid.OsmMapHolderFragment.NoInteractionOverlay;
|
||||
import fishrungames.bashgid.core.ArticleManager;
|
||||
import fishrungames.bashgid.core.DatabaseGetAlbumTask;
|
||||
import fishrungames.bashgid.core.DatabaseGetArticleTask;
|
||||
import fishrungames.bashgid.core.LocationHolder;
|
||||
@ -339,7 +340,15 @@ public class ArticleFragment extends Fragment
|
||||
|
||||
textView.setText(articleLayout.get(position).value);
|
||||
|
||||
textView.setTextSize(64);
|
||||
if (article.type == ArticleManager.ARTICLE_TYPE_NEWS)
|
||||
{
|
||||
textView.setTextSize(32);
|
||||
}
|
||||
else
|
||||
{
|
||||
textView.setTextSize(64);
|
||||
}
|
||||
|
||||
textView.setTypeface(null, Typeface.BOLD);
|
||||
textView.setGravity(Gravity.CENTER_HORIZONTAL);
|
||||
|
||||
@ -372,12 +381,15 @@ public class ArticleFragment extends Fragment
|
||||
double geoLon = articleLayout.get(position).geoLon;
|
||||
|
||||
TextView addressTextView = (TextView) view.findViewById(R.id.addressTextView);
|
||||
TextView hintTextView = (TextView) view.findViewById(R.id.hintTextView);
|
||||
|
||||
if (article.address.length() > 0)
|
||||
{
|
||||
addressTextView.setText(article.address);
|
||||
addressTextView.setVisibility(View.VISIBLE);
|
||||
|
||||
hintTextView.setVisibility(View.VISIBLE);
|
||||
|
||||
final String copied_text = getResources().getString(R.string.copied_text);
|
||||
|
||||
addressTextView.setOnLongClickListener(new OnLongClickListener(){
|
||||
@ -410,6 +422,7 @@ public class ArticleFragment extends Fragment
|
||||
else
|
||||
{
|
||||
addressTextView.setVisibility(View.GONE);
|
||||
hintTextView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
MapView mapView = (MapView) view.findViewById(R.id.mapview);
|
||||
|
@ -97,14 +97,17 @@ public class JournalFragment extends Fragment
|
||||
}
|
||||
else
|
||||
{
|
||||
if (journalName.equals("news"))
|
||||
|
||||
/*if (journalName.equals("news"))
|
||||
{
|
||||
MainActivity.getInstance().OpenNewsRecordScreen(journal.articleArr.get(position-1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainActivity.getInstance().OpenArticleScreen(journal.articleArr.get(position-1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
}
|
||||
}*/
|
||||
MainActivity.getInstance().OpenArticleScreen(journal.articleArr.get(position-1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -165,9 +165,9 @@ public class MainPageFragment extends Fragment {
|
||||
|
||||
newsJournal = journal;
|
||||
|
||||
ImageButton news1ImageButton = (ImageButton) header.findViewById(R.id.news1ImageButton);
|
||||
ImageButton news2ImageButton = (ImageButton) header.findViewById(R.id.news2ImageButton);
|
||||
ImageButton news3ImageButton = (ImageButton) header.findViewById(R.id.news3ImageButton);
|
||||
//ImageButton news1ImageButton = (ImageButton) header.findViewById(R.id.news1ImageButton);
|
||||
//ImageButton news2ImageButton = (ImageButton) header.findViewById(R.id.news2ImageButton);
|
||||
//ImageButton news3ImageButton = (ImageButton) header.findViewById(R.id.news3ImageButton);
|
||||
|
||||
Button news1Button = (Button)header.findViewById(R.id.news1Button);
|
||||
Button news2Button = (Button)header.findViewById(R.id.news2Button);
|
||||
@ -175,47 +175,47 @@ public class MainPageFragment extends Fragment {
|
||||
|
||||
if (newsJournal.articleArr.size() > 0)
|
||||
{
|
||||
ImageManager.getInstance().ApplyImageToImageView(news1ImageButton, newsJournal.articleArr.get(0).previewImageUrl);
|
||||
//ImageManager.getInstance().ApplyImageToImageView(news1ImageButton, newsJournal.articleArr.get(0).previewImageUrl);
|
||||
news1Button.setText(newsJournal.articleArr.get(0).title);
|
||||
|
||||
news1ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(0).name));
|
||||
//news1ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(0).name));
|
||||
news1Button.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(0).name));
|
||||
}
|
||||
else
|
||||
{
|
||||
news1ImageButton.setImageResource(R.drawable.transparent);
|
||||
//news1ImageButton.setImageResource(R.drawable.transparent);
|
||||
news1Button.setText(R.string.news_record_not_available);
|
||||
news1ImageButton.setOnClickListener(null);
|
||||
//news1ImageButton.setOnClickListener(null);
|
||||
news1Button.setOnClickListener(null);
|
||||
}
|
||||
|
||||
if (newsJournal.articleArr.size() > 1)
|
||||
{
|
||||
ImageManager.getInstance().ApplyImageToImageView(news2ImageButton, newsJournal.articleArr.get(1).previewImageUrl);
|
||||
//ImageManager.getInstance().ApplyImageToImageView(news2ImageButton, newsJournal.articleArr.get(1).previewImageUrl);
|
||||
news2Button.setText(newsJournal.articleArr.get(1).title);
|
||||
news2ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(1).name));
|
||||
//news2ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(1).name));
|
||||
news2Button.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(1).name));
|
||||
}
|
||||
else
|
||||
{
|
||||
news2ImageButton.setImageResource(R.drawable.transparent);
|
||||
//news2ImageButton.setImageResource(R.drawable.transparent);
|
||||
news2Button.setText(R.string.news_record_not_available);
|
||||
news2ImageButton.setOnClickListener(null);
|
||||
//news2ImageButton.setOnClickListener(null);
|
||||
news2Button.setOnClickListener(null);
|
||||
}
|
||||
|
||||
if (newsJournal.articleArr.size() > 2)
|
||||
{
|
||||
ImageManager.getInstance().ApplyImageToImageView(news3ImageButton, newsJournal.articleArr.get(2).previewImageUrl);
|
||||
//ImageManager.getInstance().ApplyImageToImageView(news3ImageButton, newsJournal.articleArr.get(2).previewImageUrl);
|
||||
news3Button.setText(newsJournal.articleArr.get(2).title);
|
||||
news3ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(2).name));
|
||||
//news3ImageButton.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(2).name));
|
||||
news3Button.setOnClickListener(new NewsButtonOnClickListener(newsJournal.articleArr.get(2).name));
|
||||
}
|
||||
else
|
||||
{
|
||||
news3ImageButton.setImageResource(R.drawable.transparent);
|
||||
//news3ImageButton.setImageResource(R.drawable.transparent);
|
||||
news3Button.setText(R.string.news_record_not_available);
|
||||
news3ImageButton.setOnClickListener(null);
|
||||
//news3ImageButton.setOnClickListener(null);
|
||||
news3Button.setOnClickListener(null);
|
||||
}
|
||||
|
||||
@ -364,7 +364,10 @@ public class MainPageFragment extends Fragment {
|
||||
databaseGetJournalTask.cancel(false);
|
||||
databaseGetJournalTask = null;
|
||||
}
|
||||
MainActivity.getInstance().OpenNewsRecordScreen(articleName, MainActivity.TAG_FROM_MAINFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
//MainActivity.getInstance().OpenNewsRecordScreen(articleName, MainActivity.TAG_FROM_MAINFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
MainActivity.getInstance().OpenArticleScreen(articleName, MainActivity.TAG_TO_MAINFRAGMENT);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -90,8 +90,9 @@ public class NewsListFragment extends Fragment
|
||||
}
|
||||
else if (position > 0)
|
||||
{
|
||||
|
||||
MainActivity.getInstance().OpenNewsRecordScreen(journal.articleArr.get(position - 1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
MainActivity.getInstance().OpenArticleScreen(journal.articleArr.get(position-1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
|
||||
//MainActivity.getInstance().OpenNewsRecordScreen(journal.articleArr.get(position - 1).name, MainActivity.TAG_FROM_NEWSLISTFRAGMENT_TO_NEWSRECORDFRAGMENT);
|
||||
}
|
||||
|
||||
}
|
||||
@ -214,7 +215,7 @@ public class NewsListFragment extends Fragment
|
||||
View view;
|
||||
if (convertView == null) { // if it's not recycled, initialize some attributes
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.journal_element, null);
|
||||
view = inflater.inflate(R.layout.news_list_element, null);
|
||||
|
||||
|
||||
} else {
|
||||
@ -229,7 +230,7 @@ public class NewsListFragment extends Fragment
|
||||
|
||||
dateTextView.setText(journal.articleArr.get(position).dateTime.toString());
|
||||
|
||||
ImageView imageView = (ImageView) view.findViewById(R.id.imageView);
|
||||
/*ImageView imageView = (ImageView) view.findViewById(R.id.imageView);
|
||||
|
||||
if (journal.articleArr.get(position).previewImageUrl != null)
|
||||
{
|
||||
@ -241,7 +242,7 @@ public class NewsListFragment extends Fragment
|
||||
else
|
||||
{
|
||||
imageView.setImageResource(R.drawable.transparent);
|
||||
}
|
||||
}*/
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,8 @@ public class OsmMapHolderFragment extends Fragment
|
||||
|
||||
ImageView image = (ImageView) dialogInnerView.findViewById(R.id.imageView);
|
||||
TextView textView = (TextView) dialogInnerView.findViewById(R.id.addressTextView);
|
||||
TextView hintTextView = (TextView) dialogInnerView.findViewById(R.id.hintTextView);
|
||||
|
||||
Button button = (Button) dialogInnerView.findViewById(R.id.button);
|
||||
|
||||
ImageManager.getInstance().ApplyImageToImageView(image, item.getSnippet());
|
||||
@ -146,6 +148,7 @@ public class OsmMapHolderFragment extends Fragment
|
||||
|
||||
textView.setText(address);
|
||||
textView.setVisibility(View.VISIBLE);
|
||||
hintTextView.setVisibility(View.VISIBLE);
|
||||
|
||||
final String copied_text = MainActivity.getInstance().getResources().getString(R.string.copied_text);
|
||||
|
||||
@ -180,6 +183,7 @@ public class OsmMapHolderFragment extends Fragment
|
||||
} else
|
||||
{
|
||||
textView.setVisibility(View.GONE);
|
||||
hintTextView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (item.phone.length() > 0)
|
||||
|
@ -1,11 +1,15 @@
|
||||
package fishrungames.bashgid;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
|
||||
public class SettingsFragment extends Fragment
|
||||
@ -16,7 +20,62 @@ public class SettingsFragment extends Fragment
|
||||
|
||||
View rootView = inflater.inflate(R.layout.fragment_settings_page, container, false);
|
||||
|
||||
Button callSupportButton = (Button)rootView.findViewById(R.id.callSupportButton);
|
||||
|
||||
callSupportButton.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
String uri = "tel:+79260492730";
|
||||
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||
intent.setData(Uri.parse(uri));
|
||||
MainActivity.getInstance().startActivity(intent);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Button visitKitapButton = (Button)rootView.findViewById(R.id.visitKitapButton);
|
||||
|
||||
visitKitapButton.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("http://kitap-ufa.ru/"));
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
|
||||
Button visitDeveloperButton = (Button)rootView.findViewById(R.id.visitDeveloperButton);
|
||||
|
||||
visitDeveloperButton.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("http://fishrungames.ru/"));
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Button visitTranslatorButton = (Button)rootView.findViewById(R.id.visitTranslatorButton);
|
||||
|
||||
visitTranslatorButton.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("http://littlefoxlilia.ru/"));
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
return rootView;
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ public class ChannelManager
|
||||
}
|
||||
|
||||
MainActivity.getInstance().albumDataSource.AddPhotoToAlbum(imageUrl, albumName);
|
||||
|
||||
}
|
||||
|
||||
public static void DownloadAndAddPhotoToAlbum(PhotoRecordData recordData, String albumName)
|
||||
|
@ -6,6 +6,7 @@ import fishrungames.networkutils.ImageManager;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
import fishrungames.networkutils.DownloadFunctions;
|
||||
@ -16,17 +17,23 @@ import android.util.Log;
|
||||
import fishrungames.bashgid.MainActivity;
|
||||
import fishrungames.bashgid.R;
|
||||
import fishrungames.bashgid.core.ArticleManager.ArticleRecordData;
|
||||
import fishrungames.bashgid.core.TranslationManager.TranslationRecordData;
|
||||
|
||||
|
||||
public class NewsManager {
|
||||
|
||||
/*
|
||||
public static final String [] urlArr = {
|
||||
"https://www.bashkortostan.ru/presscenter/news/rss/",
|
||||
"http://www.bashedu.ru/rss.xml",
|
||||
"http://www.bashinform.ru/rss/all.xml",
|
||||
"http://www.minkult-rb.ru/news/rss/",
|
||||
"http://02.mvd.ru/news/rss/"
|
||||
};
|
||||
}; */
|
||||
|
||||
public static final String [] urlArr = {
|
||||
"https://news.yandex.ru/Ufa/index.rss",
|
||||
};
|
||||
|
||||
private static NewsManager instance = null;
|
||||
|
||||
@ -353,12 +360,18 @@ public class NewsManager {
|
||||
for (RssReader.Rss2Item rss2Item : rssReader.rss2ItemArr)
|
||||
{
|
||||
|
||||
String title = rss2Item.title.replace("'", "''").replace("\"", "\"\"");
|
||||
String description = rss2Item.description.replace("'", "''").replace("\"", "\"\"");
|
||||
|
||||
String titleUp = title.toUpperCase(new Locale("ru"));
|
||||
String descriptionUp = description.toUpperCase(new Locale("ru"));
|
||||
|
||||
|
||||
ArticleRecordData newsArticle = new ArticleRecordData(
|
||||
rss2Item.title.replace("'", "''").replace("\"", "\"\""),
|
||||
title,
|
||||
ArticleManager.ARTICLE_TYPE_NEWS,
|
||||
rss2Item.title.replace("'", "''").replace("\"", "\"\""),
|
||||
rss2Item.description.replace("'", "''").replace("\"", "\"\""),
|
||||
title,
|
||||
description,
|
||||
0,
|
||||
0,
|
||||
"",
|
||||
@ -369,6 +382,27 @@ public class NewsManager {
|
||||
0);
|
||||
|
||||
AlbumManager.AddNewArticleToJournal(newsArticle, "news");
|
||||
|
||||
//To perform search
|
||||
MainActivity.getInstance().translationDataSource.CreateNewTranslation(new TranslationRecordData(
|
||||
title,
|
||||
title, //En
|
||||
title, //Ru
|
||||
title, //Zh
|
||||
titleUp, //En Up
|
||||
titleUp, //Ru Up
|
||||
titleUp //Zh Up
|
||||
));
|
||||
|
||||
MainActivity.getInstance().translationDataSource.CreateNewTranslation(new TranslationRecordData(
|
||||
description,
|
||||
description, //En
|
||||
description, //Ru
|
||||
description, //Zh
|
||||
descriptionUp, //En Up
|
||||
descriptionUp, //Ru Up
|
||||
descriptionUp //Zh Up
|
||||
));
|
||||
//newsRecordArr.add(newsArticle);
|
||||
|
||||
}
|
||||
|
@ -310,7 +310,6 @@ public class AlbumDataSource
|
||||
{
|
||||
result.add(cursor.getString(0));
|
||||
} while (cursor.moveToNext());
|
||||
|
||||
}
|
||||
|
||||
cursor.close();
|
||||
|
@ -21,7 +21,7 @@ public class PhotoDataSource
|
||||
this.dbHelper = dbHelper;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void AddOrReplacePhoto(PhotoRecordData recordData)
|
||||
{
|
||||
SQLiteDatabase database = dbHelper.getWritableDatabase();
|
||||
|
Loading…
Reference in New Issue
Block a user