first version
9
android/.classpath
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="gen"/>
|
||||||
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
|
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||||
|
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||||
|
<classpathentry kind="output" path="bin/classes"/>
|
||||||
|
</classpath>
|
34
android/.project
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Bashgid</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
<project>HorizontalListViewLibrary</project>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
4
android/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.6
|
41
android/AndroidManifest.xml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="fishrungames.bashgid"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="11"
|
||||||
|
android:targetSdkVersion="21" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@drawable/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
android:hardwareAccelerated="true" >
|
||||||
|
<activity
|
||||||
|
android:name=".LoadingActivity"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@android:style/Theme.NoTitleBar" >
|
||||||
|
<intent-filter>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".WelcomeActivity"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@android:style/Theme.NoTitleBar" >
|
||||||
|
<intent-filter>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:label="@string/app_name" >
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
BIN
android/ic_launcher-web.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
android/libs/android-support-v4.jar
Normal file
3
android/lint.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<lint>
|
||||||
|
</lint>
|
20
android/proguard-project.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# To enable ProGuard in your project, edit project.properties
|
||||||
|
# to define the proguard.config property as described in that file.
|
||||||
|
#
|
||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# By default, the flags in this file are appended to flags specified
|
||||||
|
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||||
|
# You can edit the include path and order by changing the ProGuard
|
||||||
|
# include property in project.properties.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# Add any project specific keep options here:
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
15
android/project.properties
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# This file is automatically generated by Android Tools.
|
||||||
|
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||||
|
#
|
||||||
|
# This file must be checked in Version Control Systems.
|
||||||
|
#
|
||||||
|
# To customize properties used by the Ant build system edit
|
||||||
|
# "ant.properties", and override values to adapt the script to your
|
||||||
|
# project structure.
|
||||||
|
#
|
||||||
|
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||||
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
|
# Project target.
|
||||||
|
target=android-20
|
||||||
|
android.library.reference.1=../appcompat_v7
|
12
android/res/animator/language_flag_in.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<objectAnimator
|
||||||
|
android:valueFrom="0"
|
||||||
|
android:valueTo="200"
|
||||||
|
android:propertyName="flag_in"
|
||||||
|
android:interpolator="@android:interpolator/accelerate_decelerate"
|
||||||
|
android:duration="@integer/flag_in_time" />
|
||||||
|
|
||||||
|
</set>
|
BIN
android/res/drawable-hdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 161 B |
BIN
android/res/drawable-hdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
android/res/drawable-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
android/res/drawable-mdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 142 B |
BIN
android/res/drawable-mdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
android/res/drawable-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
android/res/drawable-xhdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
android/res/drawable-xhdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
android/res/drawable-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
android/res/drawable-xxhdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
android/res/drawable-xxhdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
android/res/drawable-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
android/res/drawable/background.png
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
android/res/drawable/china_icon.png
Normal file
After Width: | Height: | Size: 22 KiB |
9
android/res/drawable/china_icon_button.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/china_icon" />
|
||||||
|
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/china_icon_darken" />
|
||||||
|
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/china_icon_darken" />
|
||||||
|
<item android:drawable="@drawable/china_icon" />
|
||||||
|
|
||||||
|
</selector>
|
BIN
android/res/drawable/china_icon_darken.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
android/res/drawable/h_line.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
android/res/drawable/logo.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
android/res/drawable/russia_icon.png
Normal file
After Width: | Height: | Size: 17 KiB |
9
android/res/drawable/russia_icon_button.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/russia_icon" />
|
||||||
|
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/russia_icon_darken" />
|
||||||
|
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/russia_icon_darken" />
|
||||||
|
<item android:drawable="@drawable/russia_icon" />
|
||||||
|
|
||||||
|
</selector>
|
BIN
android/res/drawable/russia_icon_darken.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
android/res/drawable/transparent.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
android/res/drawable/united_states_icon.png
Normal file
After Width: | Height: | Size: 32 KiB |
9
android/res/drawable/united_states_icon_button.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/united_states_icon" />
|
||||||
|
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/united_states_icon_darken" />
|
||||||
|
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/united_states_icon_darken" />
|
||||||
|
<item android:drawable="@drawable/united_states_icon" />
|
||||||
|
|
||||||
|
</selector>
|
BIN
android/res/drawable/united_states_icon_darken.png
Normal file
After Width: | Height: | Size: 32 KiB |
6
android/res/layout/activity_main.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/fragment_proto_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
</FrameLayout>
|
||||||
|
|
28
android/res/layout/fragment_main.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/drawer_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context="fishrungames.bashgid.MainActivity" >
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/fragment_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<ListView android:id="@+id/left_drawer"
|
||||||
|
android:layout_width="240dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:choiceMode="singleChoice"
|
||||||
|
android:divider="@android:color/transparent"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
android:background="#111"/>
|
||||||
|
|
||||||
|
|
||||||
|
</android.support.v4.widget.DrawerLayout>
|
19
android/res/layout/fragment_main_page.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/background"
|
||||||
|
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"
|
||||||
|
tools:context="fishrungames.bashgid.MainPageFragment" >
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/teaserListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
69
android/res/layout/fragment_welcome.xml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/background"
|
||||||
|
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"
|
||||||
|
tools:context="fishrungames.bashgid.WelcomeFragment" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/logo_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="350dp"
|
||||||
|
android:layout_marginTop="22dp"
|
||||||
|
android:contentDescription="@string/RB_Coat"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/logo" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/flag_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/image_flag_usa"
|
||||||
|
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_english"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/united_states_icon_button"
|
||||||
|
android:onClick="OnSelectEnglish" />
|
||||||
|
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
107
android/res/layout/teaser_list_element.xml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
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" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/light_grey" >
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textTeaserHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Заголовок" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/light_grey" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageTeaser1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/russia_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textTeaser1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
android:text="TextView" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/light_grey" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageTeaser2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/russia_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textTeaser2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
android:text="TextView" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/light_grey" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageTeaser3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/russia_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textTeaser3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
android:text="TextView" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@color/light_grey" >
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="TextView" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
10
android/res/menu/global.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_settings"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/action_settings"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
</menu>
|
16
android/res/menu/main.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="fishrungames.bashgid.MainActivity" >
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_example"
|
||||||
|
android:title="@string/action_example"
|
||||||
|
app:showAsAction="withText|ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_settings"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/action_settings"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
</menu>
|
11
android/res/values-v11/styles.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Base application theme for API 11+. This theme completely replaces
|
||||||
|
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||||
|
-->
|
||||||
|
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
|
||||||
|
<!-- API 11 theme customizations can go here. -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
12
android/res/values-v14/styles.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Base application theme for API 14+. This theme completely replaces
|
||||||
|
AppBaseTheme from BOTH res/values/styles.xml and
|
||||||
|
res/values-v11/styles.xml on API 14+ devices.
|
||||||
|
-->
|
||||||
|
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
|
<!-- API 14 theme customizations can go here. -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
10
android/res/values-w820dp/dimens.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Example customization of dimensions originally defined in res/values/dimens.xml
|
||||||
|
(such as screen margins) for screens with more than 820dp of available width. This
|
||||||
|
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||||
|
-->
|
||||||
|
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||||
|
|
||||||
|
</resources>
|
13
android/res/values/colors.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<string name="app_name">Bashgid</string>
|
||||||
|
|
||||||
|
|
||||||
|
<color name="light_grey">#60E0E0E0</color>
|
||||||
|
|
||||||
|
<color name="light_grey_1">#60d0d0d0</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</resources>
|
13
android/res/values/dimens.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||||
|
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||||
|
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Per the design guidelines, navigation drawers should be between 240dp and 320dp:
|
||||||
|
https://developer.android.com/design/patterns/navigation-drawer.html
|
||||||
|
-->
|
||||||
|
<dimen name="navigation_drawer_width">240dp</dimen>
|
||||||
|
|
||||||
|
</resources>
|
5
android/res/values/integers.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<integer name="flag_in_time">500</integer>
|
||||||
|
</resources>
|
23
android/res/values/strings.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<string name="app_name">Bashgid</string>
|
||||||
|
<string name="title_section1">Section 1</string>
|
||||||
|
<string name="title_section2">Section 2</string>
|
||||||
|
<string name="title_section3">Section 3</string>
|
||||||
|
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||||
|
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||||
|
<string name="action_example">Example action</string>
|
||||||
|
<string name="action_settings">Settings</string>
|
||||||
|
|
||||||
|
<string name="lang_english">English</string>
|
||||||
|
<string name="lang_russian">Russian</string>
|
||||||
|
<string name="lang_chinese">Chinese</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<string name="RB_Coat">Coat of Bashkortostan</string>
|
||||||
|
|
||||||
|
|
||||||
|
</resources>
|
20
android/res/values/styles.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Base application theme, dependent on API level. This theme is replaced
|
||||||
|
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||||
|
-->
|
||||||
|
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
|
||||||
|
<!--
|
||||||
|
Theme customizations available in newer API levels can go in
|
||||||
|
res/values-vXX/styles.xml, while customizations related to
|
||||||
|
backward-compatibility can go here.
|
||||||
|
-->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Application theme. -->
|
||||||
|
<style name="AppTheme" parent="AppBaseTheme">
|
||||||
|
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
89
android/src/fishrungames/bashgid/MainActivity.java
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
package fishrungames.bashgid;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.support.v7.app.ActionBarActivity;
|
||||||
|
import android.support.v7.app.ActionBar;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.app.FragmentManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
|
||||||
|
public class MainActivity extends ActionBarActivity {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
|
|
||||||
|
getSupportActionBar().hide();
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().add(R.id.fragment_proto_container, new WelcomeFragment()).commit();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void OnSelectEnglish(View view)
|
||||||
|
{
|
||||||
|
OpenMainScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSelectRussian(View view)
|
||||||
|
{
|
||||||
|
OpenMainScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSelectChinese(View view)
|
||||||
|
{
|
||||||
|
OpenMainScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenMainScreen()
|
||||||
|
{
|
||||||
|
|
||||||
|
getSupportActionBar().show();
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_proto_container, new MainFragment()).commit();
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, new MainPageFragment()).commit();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
|
||||||
|
return super.onCreateOptionsMenu(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.action_settings) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
17
android/src/fishrungames/bashgid/MainFragment.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package fishrungames.bashgid;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
public class MainFragment extends Fragment {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
|
||||||
|
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
}
|
65
android/src/fishrungames/bashgid/MainPageFragment.java
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
package fishrungames.bashgid;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
public class MainPageFragment extends Fragment {
|
||||||
|
|
||||||
|
ListView teaserListView;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View rootView = inflater.inflate(R.layout.fragment_main_page, container, false);
|
||||||
|
|
||||||
|
|
||||||
|
teaserListView = (ListView) rootView.findViewById(R.id.teaserListView);
|
||||||
|
|
||||||
|
teaserListView.setAdapter(new SlideListAdapter(getActivity()));
|
||||||
|
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class SlideListAdapter extends BaseAdapter {
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
public SlideListAdapter(Context c) {
|
||||||
|
mContext = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCount() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a new ImageView for each item referenced by the Adapter
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
|
||||||
|
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.teaser_list_element, null);
|
||||||
|
} else {
|
||||||
|
view = convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
16
android/src/fishrungames/bashgid/WelcomeFragment.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package fishrungames.bashgid;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
public class WelcomeFragment extends Fragment {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View rootView = inflater.inflate(R.layout.fragment_welcome, container, false);
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
}
|