Latest changes

This commit is contained in:
Vladislav Khorev 2014-11-05 05:00:15 +00:00
parent 024d63efa3
commit 6f57fe72c6
83 changed files with 694 additions and 433 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,9 +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/culture_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/culture_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/culture_teaser_darken" />
<item android:drawable="@drawable/culture_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_culture1" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_culture1_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_culture1_highlighted" />
<item android:drawable="@drawable/img_culture1" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_culture1"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,9 +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/agro_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/agro_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/agro_teaser_darken" />
<item android:drawable="@drawable/agro_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_culture2" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_culture2_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_culture2_highlighted" />
<item android:drawable="@drawable/img_culture2" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_culture2"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,9 +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/tourism_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/tourism_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/tourism_teaser_darken" />
<item android:drawable="@drawable/tourism_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_culture3" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_culture3_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_culture3_highlighted" />
<item android:drawable="@drawable/img_culture3" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_culture3"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,9 +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/economics_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/economics_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/economics_teaser_darken" />
<item android:drawable="@drawable/economics_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_education1" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_education1_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_education1_highlighted" />
<item android:drawable="@drawable/img_education1" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_education1"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,9 +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/education_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/education_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/education_teaser_darken" />
<item android:drawable="@drawable/education_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_education2" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_education2_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_education2_highlighted" />
<item android:drawable="@drawable/img_education2" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_education2"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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/img_education3" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_education3_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_education3_highlighted" />
<item android:drawable="@drawable/img_education3" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_education3"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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/img_for_investor1" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_for_investor1_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_for_investor1_highlighted" />
<item android:drawable="@drawable/img_for_investor1" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_for_investor1"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View 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/img_for_investor2" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_for_investor2_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_for_investor2_highlighted" />
<item android:drawable="@drawable/img_for_investor2" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_for_investor2"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View 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/img_for_investor3" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_for_investor3_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_for_investor3_highlighted" />
<item android:drawable="@drawable/img_for_investor3" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_for_investor3"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View 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/img_for_investor4" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_for_investor4_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_for_investor4_highlighted" />
<item android:drawable="@drawable/img_for_investor4" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_for_investor4"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,9 +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/sport_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/sport_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/sport_teaser_darken" />
<item android:drawable="@drawable/sport_teaser" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/img_tourist1" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_tourist1_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_tourist1_highlighted" />
<item android:drawable="@drawable/img_tourist1" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_tourist1"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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/img_tourist2" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_tourist2_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_tourist2_highlighted" />
<item android:drawable="@drawable/img_tourist2" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_tourist2"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View 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/img_tourist3" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_tourist3_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_tourist3_highlighted" />
<item android:drawable="@drawable/img_tourist3" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_tourist3"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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/img_tourist4" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/img_tourist4_highlighted" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/img_tourist4_highlighted" />
<item android:drawable="@drawable/img_tourist4" />
</selector>

View File

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/img_tourist4"/>
<item>
<shape>
<solid android:color="@color/button_highlighted" />
</shape>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,9 +0,0 @@
<?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/medicine_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/medicine_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/medicine_teaser_darken" />
<item android:drawable="@drawable/medicine_teaser" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

View File

@ -1,9 +0,0 @@
<?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/test_teaser_bkg" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/test_teaser_bkg_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/test_teaser_bkg_darken" />
<item android:drawable="@drawable/test_teaser_bkg" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View File

@ -1,9 +0,0 @@
<?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/transport_teaser" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/transport_teaser_darken" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/transport_teaser_darken" />
<item android:drawable="@drawable/transport_teaser" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout"
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" >
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="TextView" />
</LinearLayout>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:orientation="vertical"
android:showDividers="middle" >
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:text="TextView"
android:textColor="@color/text_white" />
<TextView
android:id="@+id/subTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:text="TextView"
android:textColor="@color/text_white" />
</LinearLayout>

View File

@ -5,25 +5,40 @@
android:layout_margin="0dp"
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" >
<GridView
android:id="@+id/teaserGridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:alwaysDrawnWithCache="true"
android:gravity="center_horizontal"
android:horizontalSpacing="10dp"
android:numColumns="2"
android:scrollingCache="true"
android:smoothScrollbar="true"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" >
</GridView>
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10" >
<requestFocus />
</EditText>
<ImageButton
android:id="@+id/searchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@drawable/transparent"
android:padding="8dp"
android:src="@drawable/abc_ic_search" />
</LinearLayout>
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/transparent"
android:dividerHeight="18dp" >
</ListView>
</LinearLayout>

View File

@ -1,24 +0,0 @@
<?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="match_parent"
android:background="@color/light_grey"
android:orientation="vertical" >
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" >
</ListView>
<it.sephiroth.android.library.widget.HListView
android:id="@+id/hListView1"
android:layout_width="match_parent"
android:layout_height="200dip"
android:paddingTop="20dip"
android:paddingBottom="20dip"
android:background="#11000000" />
</LinearLayout>

View File

@ -0,0 +1,38 @@
<?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_blue"
android:orientation="vertical"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:showDividers="middle" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical|right|center_horizontal"
android:text="Button" />
</LinearLayout>
<it.sephiroth.android.library.widget.HListView
android:id="@+id/hListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</it.sephiroth.android.library.widget.HListView>
</LinearLayout>

View File

@ -0,0 +1,86 @@
<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:layout_margin="0dp"
android:background="@color/light_blue"
android:orientation="vertical"
android:paddingLeft="30dp"
android:paddingRight="30dp"
tools:context="fishrungames.bashgid.MainPageFragment" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="8dp"
android:text="Новости"
android:textSize="24sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" >
<ImageView
android:id="@+id/news1ImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/news1TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="TextView" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" >
<ImageView
android:id="@+id/news2ImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/news2TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="TextView" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" >
<ImageView
android:id="@+id/news3ImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/news3TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="TextView" />
</LinearLayout>
<Button
android:id="@+id/moreNewsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Button" />
</LinearLayout>

View File

@ -1,85 +0,0 @@
<?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="5dp"
android:orientation="vertical" >
<TextView
android:id="@+id/headerTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="TextView"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/subHeaderTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="TextView" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp" >
<ImageView
android:id="@+id/imageView"
android:layout_width="204dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/economics_teaser" />
<TextView
android:id="@+id/imageTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="TextView"
android:visibility="gone" />
</LinearLayout>
<TextView
android:id="@+id/footerTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="TextView" />
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:orientation="vertical"
android:padding="8dp"
android:showDividers="middle" >
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="2dp" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="2dp"
android:text="TextView"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/subTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="TextView" />
</LinearLayout>

View File

@ -1,20 +0,0 @@
<?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" >
<Button
android:id="@+id/teaserElement"
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/test_teaser_bkg_button"
android:text="Промышленность"
android:textColor="@color/text_white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>

View File

@ -12,5 +12,13 @@
<color name="teaser_color">#2B517F</color>
<color name="black">#000000</color>
<color name="button_highlighted">#60000000</color>
<color name="light_blue">#BCDEFF</color>
</resources>

View File

@ -66,7 +66,7 @@ public class MainActivity extends ActionBarActivity {
public void OnSelectSemiDetails(Integer pos)
{
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, new SemiDetailsFragment()).addToBackStack(null).commit();
//getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, new SemiDetailsFragment()).addToBackStack(null).commit();
}
public void OpenMainScreen()

View File

@ -8,60 +8,90 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import it.sephiroth.android.library.widget.HListView;
public class MainPageFragment extends Fragment {
final Integer[] teaserIcons = {
R.drawable.economics_teaser_button,
R.drawable.test_teaser_bkg_button,
R.drawable.agro_teaser_button,
R.drawable.transport_teaser_button,
R.drawable.education_teaser_button,
R.drawable.tourism_teaser_button,
R.drawable.medicine_teaser_button,
R.drawable.sport_teaser_button,
};
String [] teaserHeaderArray = { "Для инвестора", "Культура Башкортостана", "Для гостей и туристов", "Образование" };
final String[] teaserText = {
"Экономика",
"Промышленность",
"Сельское хозяйство ",
"Транспорт",
"Образование",
"Туризм",
"Медицина",
"Спорт",
String [] investorGroupTitleArray = { "Предприятия Башкортостана", "Статистика", "Помощь инвестору", "Транспорт" };
String [] investorGroupSubtitleArray = { "Обзор", "Все об экономике Башкортостана", "Программа помощи инвесторам", "Обзор транспортной инфраструктуры" };
int[] investorGroupImgIdArray = { R.drawable.img_for_investor1_button, R.drawable.img_for_investor2_button, R.drawable.img_for_investor3_button, R.drawable.img_for_investor4_button };
};
GridView teaserGridView;
String [] cultureGroupTitleArray = { "Земфира", "Башкирский театр", "Национальная библиотека" };
String [] cultureGroupSubtitleArray = { "Персона дня", "Культурные традиции", "Литература"};
int[] cultureGroupImgIdArray = { R.drawable.img_culture1_button, R.drawable.img_culture2_button, R.drawable.img_culture3_button };
String [] touristGroupTitleArray = { "Панорамы Уфы", "Иремель", "Памятник Салавату Юлаеву", "Ночная жизнь в Уфе" };
String [] touristGroupSubtitleArray = { "Уфа с высоты птичьего полета", "Природный парк", "Достопримечательность", "Обзор"};
int[] touristGroupImgIdArray = { R.drawable.img_tourist1_button, R.drawable.img_tourist2_button, R.drawable.img_tourist3_button, R.drawable.img_tourist4_button };
String [] educationGroupTitleArray = { "Учебные заведения Уфы", "УГАТУ", "БГПУ" };
String [] educationGroupSubtitleArray = { "Обзор", "Университет", "Университет"};
int[] educationGroupImgIdArray = { R.drawable.img_education1_button, R.drawable.img_education2_button, R.drawable.img_education3_button };
ListView listView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main_page, container, false);
listView = (ListView) rootView.findViewById(R.id.listView);
teaserGridView = (GridView) rootView.findViewById(R.id.teaserGridView);
listView.setAdapter(new ListAdapter(getActivity()));
teaserGridView.setAdapter(new SlideListAdapter(getActivity()));
View header = inflater.inflate(R.layout.main_page_list_header, null);
fillHeader(header);
listView.addHeaderView(header);
return rootView;
}
public class SlideListAdapter extends BaseAdapter {
private void fillHeader(View header)
{
ImageView news1ImageView = (ImageView) header.findViewById(R.id.news1ImageView);
ImageView news2ImageView = (ImageView) header.findViewById(R.id.news2ImageView);
ImageView news3ImageView = (ImageView) header.findViewById(R.id.news3ImageView);
TextView news1TextView = (TextView)header.findViewById(R.id.news1TextView);
TextView news2TextView = (TextView)header.findViewById(R.id.news2TextView);
TextView news3TextView = (TextView)header.findViewById(R.id.news3TextView);
news1ImageView.setImageResource(R.drawable.news_image1);
news2ImageView.setImageResource(R.drawable.news_image2);
news3ImageView.setImageResource(R.drawable.news_image3);
news1TextView.setText("Власти Башкирии создадут выезд из Уфы на трассу М-5 «Урал»");
news2TextView.setText("Башкирия заняла первое место индекса «деловой активности»");
news3TextView.setText("«Салават Юлаев» обыграл «Ладу» и прервал серию из 5 поражений в КХЛ");
Button moreNewsButton = (Button)header.findViewById(R.id.moreNewsButton);
moreNewsButton.setText("Другие новости...");
}
public class ListAdapter extends BaseAdapter {
private Context mContext;
public SlideListAdapter(Context c) {
public ListAdapter(Context c) {
mContext = c;
}
public int getCount() {
return teaserIcons.length;
return teaserHeaderArray.length;
}
public Object getItem(int position) {
@ -79,28 +109,44 @@ public class MainPageFragment 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.teaser_list_element, null);
view = inflater.inflate(R.layout.main_page_list_element, null);
} else {
view = convertView;
}
Button button = (Button) view.findViewById(R.id.teaserElement);
TextView textView = (TextView) view.findViewById(R.id.textView);
button.setOnClickListener(new View.OnClickListener()
Button button = (Button) view.findViewById(R.id.button);
HListView hListView = (HListView) view.findViewById(R.id.hListView);
if (position == 0)
{
@Override
public void onClick(View v) {
MainActivity.getInstance().OnSelectSemiDetails(0);
}
hListView.setAdapter(new MainPageHListViewAdapters.SimpleElementAdapter(getActivity(), investorGroupTitleArray, investorGroupSubtitleArray, investorGroupImgIdArray));
}
else if (position == 1)
{
hListView.setAdapter(new MainPageHListViewAdapters.SimpleElementAdapter(getActivity(), cultureGroupTitleArray, cultureGroupSubtitleArray, cultureGroupImgIdArray));
}
else if (position == 2)
{
hListView.setAdapter(new MainPageHListViewAdapters.SimpleElementAdapter(getActivity(), touristGroupTitleArray, touristGroupSubtitleArray, touristGroupImgIdArray));
}
else
{
hListView.setAdapter(new MainPageHListViewAdapters.SimpleElementAdapter(getActivity(), educationGroupTitleArray, educationGroupSubtitleArray, educationGroupImgIdArray));
}
);
//button.setBackground(mContext.getResources().getDrawable(teaserIcons[position]));
textView.setText(teaserHeaderArray[position]);
button.setText("Посмотреть все");
button.setBackgroundResource(teaserIcons[position]);
button.setText(teaserText[position]);
return view;
}

View File

@ -0,0 +1,143 @@
package fishrungames.bashgid;
import it.sephiroth.android.library.widget.HListView;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
public class MainPageHListViewAdapters {
public static class SimpleElementAdapter extends BaseAdapter {
String [] textsArray;
String [] subTextsArray;
int [] imgIdArray;
private Context mContext;
public SimpleElementAdapter(Context c, String [] textsArray, String [] subTextsArray, int [] imgIdArray) {
mContext = c;
this.textsArray = textsArray;
this.subTextsArray = subTextsArray;
this.imgIdArray = imgIdArray;
}
public int getCount() {
return textsArray.length;
}
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.simple_hview_list_element, null);
} else {
view = convertView;
}
TextView textView = (TextView) view.findViewById(R.id.textView);
TextView subTextView = (TextView) view.findViewById(R.id.subTextView);
ImageButton imageButton = (ImageButton) view.findViewById(R.id.imageButton);
textView.setText(textsArray[position]);
subTextView.setText(subTextsArray[position]);
//imageButton.setImageResource(imgIdArray[position]);
imageButton.setBackgroundResource(imgIdArray[position]);
return view;
}
}
public static class DarkenElementAdapter extends BaseAdapter {
String [] textsArray;
String [] subTextsArray;
int [] imgIdArray;
private Context mContext;
public DarkenElementAdapter(Context c, String [] textsArray, String [] subTextsArray, int [] imgIdArray) {
mContext = c;
this.textsArray = textsArray;
this.subTextsArray = subTextsArray;
this.imgIdArray = imgIdArray;
}
public int getCount() {
return textsArray.length;
}
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.darken_hview_list_element, null);
} else {
view = convertView;
}
TextView textView = (TextView) view.findViewById(R.id.textView);
TextView subTextView = (TextView) view.findViewById(R.id.subTextView);
LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.linearLayout);
textView.setText(textsArray[position]);
subTextView.setText(subTextsArray[position]);
linearLayout.setBackgroundResource(imgIdArray[position]);
return view;
}
}
}

View File

@ -1,187 +0,0 @@
package fishrungames.bashgid;
import it.sephiroth.android.library.widget.HListView;
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.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
public class SemiDetailsFragment extends Fragment {
ListView semidetailsGridView;
HListView hListView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_semidetails_page, container, false);
semidetailsGridView = (ListView) rootView.findViewById(R.id.listView);
semidetailsGridView.setAdapter(new SemidetailsAdapter(getActivity()));
hListView = (HListView) rootView.findViewById(R.id.hListView1);
hListView.setAdapter(new SemidetailsAdapter(getActivity()));
return rootView;
}
public class SemidetailsAdapter extends BaseAdapter {
private Context mContext;
public SemidetailsAdapter(Context c) {
mContext = c;
}
public int getCount() {
return 3;
}
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.semidetails_element, null);
} else {
view = convertView;
}
TextView headerTextView = (TextView)view.findViewById(R.id.headerTextView);
TextView subHeaderTextView = (TextView)view.findViewById(R.id.subHeaderTextView);
ImageView imageView = (ImageView)view.findViewById(R.id.imageView);
TextView imageTextView = (TextView)view.findViewById(R.id.imageTextView);
TextView footerTextView = (TextView)view.findViewById(R.id.footerTextView);
Button button1 = (Button)view.findViewById(R.id.button1);
Button button2 = (Button)view.findViewById(R.id.button2);
Button button3 = (Button)view.findViewById(R.id.button3);
if (position == 0)
{
headerTextView.setVisibility(View.VISIBLE);
headerTextView.setText("Структура промышленности Башкортостана");
subHeaderTextView.setText("Важнейшие отрасли промышленности Башкортостана — нефтедобыча, нефтепереработка, химия и нефтехимия.");
subHeaderTextView.setVisibility(View.VISIBLE);
imageView.setImageResource(R.drawable.test_promstruct_rb);
LayoutParams params = imageView.getLayoutParams();
params.width = LayoutParams.MATCH_PARENT;
imageView.setLayoutParams(params);
imageTextView.setVisibility(View.GONE);
footerTextView.setText("Информация предоставлена Министерством промышленности и инновационной политики республики Башкортостан");
button1.setText("Статистика по отраслям...");
button1.setVisibility(View.VISIBLE);
button2.setText("Поиск...");
button2.setVisibility(View.VISIBLE);
button3.setVisibility(View.GONE);
}
else if (position == 1)
{
headerTextView.setVisibility(View.VISIBLE);
headerTextView.setText("Предприятие дня");
subHeaderTextView.setVisibility(View.VISIBLE);
subHeaderTextView.setText("Уфимское моторостроительное производственное объединение");
imageView.setImageResource(R.drawable.test_umpo);
LayoutParams params = imageView.getLayoutParams();
params.width = 200;
imageView.setLayoutParams(params);
imageTextView.setVisibility(View.VISIBLE);
imageTextView.setText("УМПО - российское предприятие, производитель авиационных двигателей. Основано в 1925 году. В объединении работают более 15 тысяч человек.");
footerTextView.setText("Информация предоставлена пресс-службой УМПО");
button1.setText("Информация о предприятии...");
button1.setVisibility(View.VISIBLE);
button2.setText("Продукция...");
button2.setVisibility(View.VISIBLE);
button3.setText("Контакты...");
button3.setVisibility(View.VISIBLE);
}
else
{
headerTextView.setVisibility(View.VISIBLE);
headerTextView.setText("Информационная поддержка инвестора");
subHeaderTextView.setVisibility(View.VISIBLE);
subHeaderTextView.setText("С чего начать? Пошаговое руководство и ответы на вопросы");
imageView.setImageResource(R.drawable.test_investagency);
LayoutParams params = imageView.getLayoutParams();
params.width = 200;
imageView.setLayoutParams(params);
imageTextView.setVisibility(View.VISIBLE);
imageTextView.setText("Специалисты агентства подготовили справочник, в котором вы узнаете ответы на все юридические вопросы, которые могут возникнуть при инвестировании в предприятия Республики Башкортостан");
footerTextView.setText("Агентство по привлечению инвестиций Республики Башкортостан");
button1.setText("С чего начать...");
button1.setVisibility(View.VISIBLE);
button2.setText("Часто задаваемые вопросы...");
button2.setVisibility(View.VISIBLE);
button3.setVisibility(View.GONE);
}
//Button button = (Button) view.findViewById(R.id.teaserElement);
//button.setBackground(mContext.getResources().getDrawable(teaserIcons[position]));
//button.setBackgroundResource(teaserIcons[position]);
//button.setText(teaserText[position]);
return view;
}
}
}