draft UI version

git-svn-id: https://osmand.googlecode.com/svn/trunk@751 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-12-03 15:49:00 +00:00
parent 529b25a33d
commit cf18ae4d12
24 changed files with 113 additions and 165 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/button_left_pushed" />
<item android:drawable="@drawable/button_left_simple" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/button_right_pushed" />
<item android:drawable="@drawable/button_right_simple" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

View file

@ -6,70 +6,95 @@
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical">
<LinearLayout android:layout_weight="0.3" android:layout_height="0dp" android:layout_width="fill_parent"/>
<TableLayout android:layout_width="fill_parent" android:layout_weight="0.4" android:layout_height="0dp">
<LinearLayout android:layout_height="fill_parent" android:layout_weight="0.5">
<Button
android:id="@+id/MapButton"
android:text="@string/map_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="1dp"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/map"/>
<Button
android:id="@+id/SearchButton"
android:text="@string/search_button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="1dp"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/find"/>
</LinearLayout>
<LinearLayout android:layout_height="fill_parent" android:layout_weight="0.5">
<Button
android:id="@+id/FavoritesButton"
android:text="@string/favorites_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_marginLeft="1dp"
android:layout_weight="0.5"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/favorites"/>
<Button
android:id="@+id/SettingsButton"
android:text="@string/settings_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="2dp"
android:layout_marginRight="1dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/settings"/>
</LinearLayout>
</TableLayout>
<LinearLayout android:layout_weight="0.15" android:layout_height="0dp" android:layout_width="fill_parent" />
<LinearLayout android:layout_weight="0.15" android:layout_height="0dp" android:layout_width="fill_parent" android:gravity="center" android:background="@drawable/version_line" android:orientation="vertical">
<TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center"
android:text="OsmAnd" android:textColor="#FFFFFF" android:typeface="serif" android:id="@+id/TextVersion"
android:textSize="18sp"/>
<TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center"
<LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center_horizontal" >
<LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content"
android:background="@drawable/headliner" android:orientation="horizontal" >
<ImageView android:src="@drawable/headline_osmand_icon"
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginLeft="0dp" android:layout_weight="1" android:layout_marginTop="5dp"
android:text="OsmAnd" android:textColor="#000000" android:typeface="serif" android:textSize="20sp"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginRight="35dp" android:layout_marginTop="5dp"
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
android:textSize="13sp"/>
<!-- <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center"
android:textSize="14sp" android:text="http://osmand.net" android:textColor="#FFFFFF" android:typeface="serif" android:id="@+id/TextSite" />
-->
</LinearLayout>
</LinearLayout>
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<TableRow android:layout_height = "wrap_content" >
<LinearLayout android:id="@+id/MapButton" android:background="@drawable/button_left" android:orientation="vertical" android:clickable="true">
<ImageView
android:src="@drawable/button_icon_map"
android:scaleType="center"
android:layout_marginTop="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp" android:layout_marginRight="15dp"
android:text="@string/map_Button" android:typeface="serif" android:textColor="#000000"
android:textSize="18sp"/>
</LinearLayout>
<LinearLayout android:layout_weight="1" android:layout_height="fill_parent" />
<LinearLayout android:id="@+id/SearchButton" android:background="@drawable/button_right" android:orientation="vertical" android:clickable="true">
<ImageView
android:src="@drawable/button_icon_search"
android:scaleType="center"
android:layout_marginTop="20dp"
android:layout_gravity="center_vertical|right"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp" android:layout_marginLeft="15dp"
android:text="@string/search_button" android:typeface="serif" android:textColor="#000000"
android:textSize="18sp"/>
</LinearLayout>
</TableRow>
<TableRow android:layout_height = "wrap_content" >
<LinearLayout android:id="@+id/FavoritesButton" android:background="@drawable/button_left" android:orientation="vertical">
<ImageView
android:src="@drawable/button_icon_favorites"
android:scaleType="center"
android:layout_marginTop="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp" android:layout_marginRight="15dp"
android:text="@string/favorites_Button" android:typeface="serif" android:textColor="#000000"
android:textSize="18sp"/>
</LinearLayout>
<LinearLayout android:layout_weight="1" android:layout_height="fill_parent" />
<LinearLayout android:id="@+id/SettingsButton" android:background="@drawable/button_right" android:orientation="vertical" >
<ImageView
android:src="@drawable/button_icon_settings"
android:scaleType="center"
android:layout_marginTop="20dp"
android:layout_gravity="center_vertical|right"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp" android:layout_marginLeft="15dp"
android:text="@string/settings_Button" android:typeface="serif" android:textColor="#000000"
android:textSize="18sp"/>
</LinearLayout>
</TableRow>
</TableLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/background">
<ImageView android:layout_height="wrap_content" android:layout_width="fill_parent" android:adjustViewBounds="true"
android:scaleType="fitXY" android:src="@drawable/velcom_line" android:layout_gravity="bottom|center"/>
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical">
<LinearLayout android:layout_weight="0.25" android:layout_height="0dp" android:layout_width="wrap_content" android:gravity="center_vertical"
android:orientation="horizontal" android:layout_marginTop="5dp" android:layout_marginLeft="25dp">
<ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center"
android:src="@drawable/velcom_mini" android:id="@+id/VelcomMini"/>
<TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_gravity="center" android:layout_marginLeft="15dp"
android:textColor="#FFFFFF" android:textStyle="normal" android:typeface="serif" android:text="Навигация" android:textSize="32sp" android:id="@+id/TextVelcom"/>
</LinearLayout>
<TableLayout android:layout_width="fill_parent" android:layout_weight="0.4" android:layout_height="0dp">
<LinearLayout android:layout_height="fill_parent" android:layout_weight="0.5">
<Button
android:id="@+id/MapButton"
android:text="@string/map_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="1dp"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/map"/>
<Button
android:id="@+id/SearchButton"
android:text="@string/search_button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="1dp"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/find"/>
</LinearLayout>
<LinearLayout android:layout_height="fill_parent" android:layout_weight="0.5">
<Button
android:id="@+id/FavoritesButton"
android:text="@string/favorites_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_marginLeft="1dp"
android:layout_weight="0.5"
android:layout_marginRight="2dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/favorites"/>
<Button
android:id="@+id/SettingsButton"
android:text="@string/settings_Button"
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_weight="0.5"
android:layout_marginLeft="2dp"
android:layout_marginRight="1dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/settings"/>
</LinearLayout>
</TableLayout>
<LinearLayout android:layout_weight="0.35" android:layout_height="0dp" android:layout_width="fill_parent" android:orientation="vertical"/>
</LinearLayout>
</FrameLayout>

View file

@ -15,22 +15,15 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Camera;
import android.graphics.Color;
import android.graphics.Matrix;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.text.util.Linkify;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class MainMenuActivity extends Activity {
@ -38,10 +31,10 @@ public class MainMenuActivity extends Activity {
private static final String FIRST_TIME_APP_RUN = "FIRST_TIME_APP_RUN"; //$NON-NLS-1$
private static final String EXCEPTION_FILE_SIZE = ResourceManager.APP_DIR + "exception.log"; //$NON-NLS-1$
private Button showMap;
private Button settingsButton;
private Button searchButton;
private Button favouritesButton;
private View showMap;
private View settingsButton;
private View searchButton;
private View favouritesButton;
@ -98,8 +91,8 @@ public class MainMenuActivity extends Activity {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(Version.VELCOM_EDITION ? R.layout.menu_velcom : R.layout.menu);
if(Version.VELCOM_EDITION){
setContentView(R.layout.menu);
/* if(Version.VELCOM_EDITION){
final ImageView imgView = (ImageView) findViewById(R.id.VelcomMini);
final Camera camera = new Camera();
final float firstRotate = 0.25f;
@ -163,14 +156,12 @@ public class MainMenuActivity extends Activity {
alphaAnimation.setDuration(animationTime);
textView.startAnimation(alphaAnimation);
textView.setVisibility(View.INVISIBLE);
} else {
final TextView textView = (TextView) findViewById(R.id.TextVersion);
textView.setText(Version.APP_FULL_NAME);
Linkify.addLinks((TextView) findViewById(R.id.TextSite), Linkify.WEB_URLS);
((TextView) findViewById(R.id.TextSite)).setTextColor(Color.WHITE);
}
} else { */
showMap = (Button) findViewById(R.id.MapButton);
final TextView textView = (TextView) findViewById(R.id.TextVersion);
textView.setText(Version.APP_VERSION+ " "+ Version.APP_DESCRIPTION); //$NON-NLS-1$
showMap = findViewById(R.id.MapButton);
showMap.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@ -178,7 +169,7 @@ public class MainMenuActivity extends Activity {
startActivityForResult(mapIndent, 0);
}
});
settingsButton = (Button) findViewById(R.id.SettingsButton);
settingsButton = findViewById(R.id.SettingsButton);
settingsButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@ -187,7 +178,7 @@ public class MainMenuActivity extends Activity {
}
});
favouritesButton = (Button) findViewById(R.id.FavoritesButton);
favouritesButton = findViewById(R.id.FavoritesButton);
favouritesButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@ -196,7 +187,7 @@ public class MainMenuActivity extends Activity {
}
});
searchButton = (Button) findViewById(R.id.SearchButton);
searchButton = findViewById(R.id.SearchButton);
searchButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {