From 0d7d167dcfd456c1f8695448f885989661e712c8 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 19 Jan 2015 00:42:03 +0000
Subject: [PATCH] Create "About" tab and bump version.

---
 app/app.iml                                                    |   11 
 app/src/main/res/layout/main.xml                               |  381 ++++++++++++++++---------------
 app/src/main/java/net/jacekk/bridge/android/AboutActivity.java |   27 ++
 app/src/main/res/layout/about.xml                              |   82 ++++++
 app/src/main/res/values-w820dp/dimens.xml                      |    6 
 app/src/main/res/values/strings.xml                            |   45 +++
 app/src/main/java/net/jacekk/bridge/android/MainActivity.java  |   24 +
 app/src/main/res/menu/main.xml                                 |   13 +
 app/src/main/AndroidManifest.xml                               |   32 ++
 app/src/main/res/values-pl/strings.xml                         |   47 +++
 app/build.gradle                                               |    8 
 app/src/main/res/values/dimens.xml                             |    5 
 12 files changed, 459 insertions(+), 222 deletions(-)

diff --git a/app/app.iml b/app/app.iml
index 4753f0d..c6c55c4 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -86,17 +86,6 @@
     <orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
     <orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
     <orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
-    <orderEntry type="module-library" scope="TEST">
-      <library name="JUnit4">
-        <CLASSES>
-          <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.11.jar!/" />
-          <root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
-          <root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-library-1.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
   </component>
 </module>
 
diff --git a/app/build.gradle b/app/build.gradle
index 2d32d42..9b791cb 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,14 +6,14 @@
 
     defaultConfig {
         applicationId "net.jacekk.bridge"
-        minSdkVersion 14
+        minSdkVersion 11
         targetSdkVersion 21
-        versionCode 1
-        versionName "1.0"
+        versionCode 2
+        versionName "1.1"
     }
     buildTypes {
         release {
-            minifyEnabled false
+            minifyEnabled true
         }
     }
 }
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 407198c..8864004 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,12 +1,30 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="net.jacekk.bridge">
-    <application android:allowBackup="true" android:label="@string/app_name"
-        android:icon="@drawable/icon" android:theme="@style/AppTheme">
-        <activity android:name="net.jacekk.bridge.android.MainActivity"
-            android:label="@string/app_name">
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="net.jacekk.bridge">
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/icon"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme"
+        android:supportsRtl="true">
+        <activity
+            android:name=".android.MainActivity"
+            android:label="@string/app_name" >
             <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity
+            android:name=".android.AboutActivity"
+            android:label="@string/about_title"
+            android:parentActivityName=".android.MainActivity" >
+            <meta-data
+                android:name="android.support.PARENT_ACTIVITY"
+                android:value="net.jacekk.bridge.android.MainActivity" />
+        </activity>
     </application>
+
 </manifest>
diff --git a/app/src/main/java/net/jacekk/bridge/android/AboutActivity.java b/app/src/main/java/net/jacekk/bridge/android/AboutActivity.java
new file mode 100644
index 0000000..dd11245
--- /dev/null
+++ b/app/src/main/java/net/jacekk/bridge/android/AboutActivity.java
@@ -0,0 +1,27 @@
+package net.jacekk.bridge.android;
+
+import android.app.Activity;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.widget.TextView;
+
+import net.jacekk.bridge.R;
+
+public class AboutActivity extends Activity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.about);
+
+        InitializeApp();
+    }
+
+    protected void InitializeApp() {
+        final TextView version = (TextView)findViewById(R.id.about_version);
+        try {
+            version.setText(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
+        } catch (PackageManager.NameNotFoundException e) {
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/app/src/main/java/net/jacekk/bridge/android/MainActivity.java b/app/src/main/java/net/jacekk/bridge/android/MainActivity.java
index eb1677f..15d2906 100644
--- a/app/src/main/java/net/jacekk/bridge/android/MainActivity.java
+++ b/app/src/main/java/net/jacekk/bridge/android/MainActivity.java
@@ -1,9 +1,12 @@
 package net.jacekk.bridge.android;
 
 import android.app.Activity;
+import android.content.Intent;
 import android.os.Bundle;
 import android.text.Editable;
 import android.text.TextWatcher;
+import android.view.Menu;
+import android.view.MenuItem;
 import android.widget.CompoundButton;
 import android.widget.EditText;
 import android.widget.SeekBar;
@@ -51,6 +54,25 @@
         InitializeApp();
     }
 
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.main_action_about:
+                Intent about = new Intent(getApplicationContext(), AboutActivity.class);
+                startActivity(about);
+                return true;
+            case R.id.main_action_reset:
+                resetInputs();
+                return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+
     private void resetInputs() {
         BidSlider.setProgress(0);
         MinorSuitsToggle.setChecked(true);
@@ -61,7 +83,7 @@
         ResultsText.setText(getString(R.string.enter_data));
     }
 
-    private void InitializeApp() {
+    protected void InitializeApp() {
         bridgeCompute = new BridgeCompute();
 
         BidSlider = (SeekBar) findViewById(R.id.BidSlider);
diff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml
new file mode 100644
index 0000000..61d1617
--- /dev/null
+++ b/app/src/main/res/layout/about.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/about_version_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/about_version"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+        <TextView
+            android:id="@+id/about_version"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <TextView
+            android:id="@+id/about_author_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10sp"
+            android:text="@string/about_author"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+        <TextView
+            android:id="@+id/about_author"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/about_author_contents" />
+
+        <TextView
+            android:id="@+id/about_url_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10sp"
+            android:text="@string/about_url"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+        <TextView
+            android:id="@+id/about_url"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/about_url_contents"
+            android:autoLink="web" />
+
+        <TextView
+            android:id="@+id/about_license_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10sp"
+            android:text="@string/about_license"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+        <TextView
+            android:id="@+id/about_license"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/about_license_contents"
+            android:textSize="16sp" />
+
+        <TextView
+            android:id="@+id/about_license_full"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/about_license_full"
+            android:textSize="16sp" />
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml
index d31e456..c9d38c6 100644
--- a/app/src/main/res/layout/main.xml
+++ b/app/src/main/res/layout/main.xml
@@ -1,195 +1,202 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:layout_margin="10dp"
-    android:orientation="vertical">
-
-    <SeekBar
-        android:id="@+id/BidSlider"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:indeterminate="false"
-        android:max="7" />
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin">
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:weightSum="1">
+        android:orientation="vertical">
+
+        <SeekBar
+            android:id="@+id/BidSlider"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:indeterminate="false"
+            android:max="7" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:weightSum="1">
+
+            <TextView
+                android:id="@+id/BidText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_weight="0.25"
+                android:text="0"
+                android:textAlignment="center"
+                android:textAppearance="?android:attr/textAppearanceLarge" />
+
+            <ToggleButton
+                android:id="@+id/MinorSuitsToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="0.25"
+                android:checked="true"
+                android:text="@string/minor_suits"
+                android:textOff="@string/minor_suits"
+                android:textOn="@string/minor_suits" />
+
+            <ToggleButton
+                android:id="@+id/MajorSuitsToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="0.25"
+                android:checked="false"
+                android:text="@string/major_suits"
+                android:textOff="@string/major_suits"
+                android:textOn="@string/major_suits" />
+
+            <ToggleButton
+                android:id="@+id/NoTrumpToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="0.25"
+                android:checked="false"
+                android:text="@string/no_trump"
+                android:textOff="@string/no_trump"
+                android:textOn="@string/no_trump" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <ToggleButton
+                android:id="@+id/ContractToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="true"
+                android:text="@string/bid_normal"
+                android:textOff="@string/bid_normal"
+                android:textOn="@string/bid_normal" />
+
+            <ToggleButton
+                android:id="@+id/DoubleToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="false"
+                android:text="@string/bid_double"
+                android:textOff="@string/bid_double"
+                android:textOn="@string/bid_double" />
+
+            <ToggleButton
+                android:id="@+id/RedoubleToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="false"
+                android:text="@string/bid_redouble"
+                android:textOff="@string/bid_redouble"
+                android:textOn="@string/bid_redouble" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <ToggleButton
+                android:id="@+id/NNToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="true"
+                android:text="@string/non_non"
+                android:textOff="@string/non_non"
+                android:textOn="@string/non_non" />
+
+            <ToggleButton
+                android:id="@+id/NVToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="false"
+                android:text="@string/non_vul"
+                android:textOff="@string/non_vul"
+                android:textOn="@string/non_vul" />
+
+            <ToggleButton
+                android:id="@+id/VNToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="false"
+                android:text="@string/vul_non"
+                android:textOff="@string/vul_non"
+                android:textOn="@string/vul_non" />
+
+            <ToggleButton
+                android:id="@+id/VVToggle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:checked="false"
+                android:text="@string/vul_vul"
+                android:textOff="@string/vul_vul"
+                android:textOn="@string/vul_vul" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/PCText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="10dp"
+                android:layout_marginRight="10dp"
+                android:labelFor="@+id/PCInput"
+                android:text="@string/pc"
+                android:textAppearance="?android:attr/textAppearanceLarge" />
+
+            <EditText
+                android:id="@+id/PCInput"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:ems="4"
+                android:inputType="number" />
+
+            <TextView
+                android:id="@+id/TricksText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="10dp"
+                android:layout_marginLeft="20dp"
+                android:layout_marginRight="10dp"
+                android:layout_marginStart="20dp"
+                android:labelFor="@+id/TricksInput"
+                android:text="@string/tricks"
+                android:textAppearance="?android:attr/textAppearanceLarge" />
+
+            <EditText
+                android:id="@+id/TricksInput"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:ems="4"
+                android:inputType="number" />
+        </LinearLayout>
 
         <TextView
-            android:id="@+id/BidText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:layout_weight="0.25"
-            android:text="0"
-            android:textAlignment="gravity"
-            android:textAppearance="?android:attr/textAppearanceLarge" />
-
-        <ToggleButton
-            android:id="@+id/MinorSuitsToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="0.25"
-            android:checked="true"
-            android:text="@string/minor_suits"
-            android:textOff="@string/minor_suits"
-            android:textOn="@string/minor_suits" />
-
-        <ToggleButton
-            android:id="@+id/MajorSuitsToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="0.25"
-            android:checked="false"
-            android:text="@string/major_suits"
-            android:textOff="@string/major_suits"
-            android:textOn="@string/major_suits" />
-
-        <ToggleButton
-            android:id="@+id/NoTrumpToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="0.25"
-            android:checked="false"
-            android:text="@string/no_trump"
-            android:textOff="@string/no_trump"
-            android:textOn="@string/no_trump" />
+            android:id="@+id/ResultsText"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="10dp"
+            android:text="@string/enter_data"
+            android:textAppearance="?android:attr/textAppearanceMedium" />
     </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <ToggleButton
-            android:id="@+id/ContractToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="true"
-            android:text="@string/bid_normal"
-            android:textOff="@string/bid_normal"
-            android:textOn="@string/bid_normal" />
-
-        <ToggleButton
-            android:id="@+id/DoubleToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="false"
-            android:text="@string/bid_double"
-            android:textOff="@string/bid_double"
-            android:textOn="@string/bid_double" />
-
-        <ToggleButton
-            android:id="@+id/RedoubleToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="false"
-            android:text="@string/bid_redouble"
-            android:textOff="@string/bid_redouble"
-            android:textOn="@string/bid_redouble" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <ToggleButton
-            android:id="@+id/NNToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="true"
-            android:text="@string/before_before"
-            android:textOff="@string/before_before"
-            android:textOn="@string/before_before" />
-
-        <ToggleButton
-            android:id="@+id/NVToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="false"
-            android:text="@string/before_after"
-            android:textOff="@string/before_after"
-            android:textOn="@string/before_after" />
-
-        <ToggleButton
-            android:id="@+id/VNToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="false"
-            android:text="@string/after_before"
-            android:textOff="@string/after_before"
-            android:textOn="@string/after_before" />
-
-        <ToggleButton
-            android:id="@+id/VVToggle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:checked="false"
-            android:text="@string/after_after"
-            android:textOff="@string/after_after"
-            android:textOn="@string/after_after" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <TextView
-            android:id="@+id/PCText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginRight="10dp"
-            android:labelFor="@+id/PCInput"
-            android:text="@string/pc"
-            android:textAppearance="?android:attr/textAppearanceLarge" />
-
-        <EditText
-            android:id="@+id/PCInput"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:ems="4"
-            android:inputType="number" />
-
-        <Space
-            android:layout_width="20dp"
-            android:layout_height="wrap_content" />
-
-        <TextView
-            android:id="@+id/TricksText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginRight="10dp"
-            android:labelFor="@+id/TricksInput"
-            android:text="@string/tricks"
-            android:textAppearance="?android:attr/textAppearanceLarge" />
-
-        <EditText
-            android:id="@+id/TricksInput"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:ems="4"
-            android:inputType="number" />
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/ResultsText"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_marginTop="10dp"
-        android:text="@string/enter_data"
-        android:textAppearance="?android:attr/textAppearanceMedium" />
-</LinearLayout>
-
+</ScrollView>
diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml
new file mode 100644
index 0000000..f044483
--- /dev/null
+++ b/app/src/main/res/menu/main.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:id="@+id/main_action_reset"
+        android:icon="@android:drawable/ic_menu_revert"
+        android:title="@string/reset"
+        android:showAsAction="ifRoom"/>
+    <item
+        android:id="@+id/main_action_about"
+        android:icon="@android:drawable/ic_menu_info_details"
+        android:title="@string/about"
+        android:showAsAction="ifRoom" />
+</menu>
\ No newline at end of file
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 29d49e9..567b41a 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -2,14 +2,51 @@
 <resources>
     <string name="app_name">Obliczenia brydżowe</string>
 
+    <string name="reset">Wyczyść</string>
+
+    <string name="about">O programie</string>
+    <string name="about_title">Obliczenia brydżowe - O programie</string>
+    <string name="about_version">Wersja</string>
+    <string name="about_author">Autor</string>
+    <string name="about_author_contents">Jacek Kowalski</string>
+    <string name="about_url">WWW</string>
+    <string name="about_url_contents">https://dev.jacekk.net/brydz</string>
+    <string name="about_license">Licencja</string>
+    <string name="about_license_contents">Trzyklauzulowa licencja BSD</string>
+    <string name="about_license_full">Copyright © 2012-2015 Jacek Kowalski\n
+Wszystkie prawa zastrzeżone.\n
+\n
+Rozpowszechnianie i używanie oprogramowania, czy to w formie kodu źródłowego, czy w formie kodu
+        wykonywalnego, są dozwolone pod warunkiem spełnienia poniższych warunków:\n
+1. Rozpowszechniany kod źródłowy musi zawierać powyższą notę dotyczącą praw autorskich,
+        niniejszą listę warunków oraz poniższe oświadczenie o wyłączeniu odpowiedzialności.\n
+2. Rozpowszechniany kod wykonywalny musi zawierać powyższą notę dotyczącą praw autorskich,
+        niniejszą listę warunków oraz poniższe oświadczenie o wyłączeniu odpowiedzialności
+        w dokumentacji i/lub w innych materiałach dostarczanych wraz z kopią oprogramowania.\n
+3. Ani nazwa Jacekk.info, ani nazwa Jacekk.net, ani nazwiska twórców i współpracowników nie mogą
+        być użyte dla ukazania ich aprobaty dla prac pochodnych od tego oprogramowania lub ich
+        promowania bez szczególnego, wyrażonego na piśmie zezwolenia danej osoby lub organizacji.\n
+\n
+To oprogramowanie jest dostarczone przez właścicieli praw autorskich "takim, jakie jest". Wszelkie
+        dorozumiane lub bezpośrednio wyrażone gwarancje, nie wyłączając gwarancji przydatności
+        handlowej i przydatności do określonego zastosowania, są wyłączone. W żadnym wypadku
+        posiadacze praw autorskich oraz współtwórcy nie mogą być odpowiedzialni za jakiekolwiek
+        bezpośrednie, pośrednie, przypadkowe, specjalne, uboczne lub wtórne szkody (w tym obowiązek
+        dostarczenia produktu zastępczego lub serwisu, utratę danych lub korzyści, a także przerwę
+        w pracy przedsiębiorstwa) spowodowane w jakikolwiek sposób i niezależnie od przyczyn
+        odpowiedzialności, takich jak: teoretyczna odpowiedzialność kontraktowa lub deliktowa
+        (wynikła zarówno z niedbalstwa, jak i z innych przyczyn), powstałe w jakikolwiek sposób
+        w wyniku używania lub mające związek z używaniem oprogramowania, nawet jeśli o możliwości
+        powstania takich szkód ostrzeżono.</string>
+
     <string name="minor_suits">♣ / ♦</string>
     <string name="major_suits">♥ / ♠</string>
     <string name="no_trump">NT</string>
 
-    <string name="before_before">przed/przed</string>
-    <string name="before_after">przed/po</string>
-    <string name="after_before">po/przed</string>
-    <string name="after_after">po/po</string>
+    <string name="non_non">przed/przed</string>
+    <string name="non_vul">przed/po</string>
+    <string name="vul_non">po/przed</string>
+    <string name="vul_vul">po/po</string>
 
     <string name="bid_normal">norm.</string>
     <string name="bid_double">ktr.</string>
@@ -22,14 +59,12 @@
     <string name="invalid_level">Niepoprawny kontrakt.</string>
     <string name="invalid_color">Niepoprawny kolor kontraktu.</string>
     <string name="invalid_contract">Niepoprawna informacja o kontrze.</string>
-    <string name="invalid_vulnerability">Niepoprawna informacja o partii.</string>
     <string name="invalid_pc">Niepoprawna ilość punktów.</string>
     <string name="invalid_tricks">Niepoprawna ilość wziętych lew.</string>
     <string name="invalid_passes">Przy czterech pasach podaj większą liczę punktów.</string>
 
     <string name="result_for_us">Zapis dla rozgrywających.</string>
     <string name="result_for_them">Zapis dla przeciwników.</string>
-
     <string name="result_pts_wo_pc">Punktów (bez PC):</string>
     <string name="result_pts">Punktów (z PC):</string>
     <string name="result_imps">IMP-ów:</string>
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+<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>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+<resources>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index dda0d92..08e32d2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2,14 +2,49 @@
 <resources>
     <string name="app_name">Bridge scoring</string>
 
+    <string name="reset">Reset</string>
+
+    <string name="about">About</string>
+    <string name="about_title">Bridge scoring - About</string>
+    <string name="about_version">Version</string>
+    <string name="about_author">Author</string>
+    <string name="about_author_contents">Jacek Kowalski</string>
+    <string name="about_url">WWW</string>
+    <string name="about_url_contents">https://dev.jacekk.net/brydz</string>
+    <string name="about_license">License</string>
+    <string name="about_license_contents">BSD 3-clause license</string>
+    <string name="about_license_full">Copyright © 2012-2015 Jacek Kowalski\n
+All rights reserved.\n
+\n
+Redistribution and use in source and binary forms, with or without modification, are permitted
+        provided that the following conditions are met:\n
+1. Redistributions of source code must retain the above copyright notice, this list of conditions
+        and the following disclaimer.\n
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+        and the following disclaimer in the documentation and/or other materials provided with the
+        distribution.\n
+3. Neither the name Jacekk.info, nor Jacekk.net, nor the names of its contributors may be used to
+        endorse or promote products derived from this software without specific prior written
+        permission.\n
+\n
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+        IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
+        OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+        CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+        OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.</string>
+
     <string name="minor_suits">♣ / ♦</string>
     <string name="major_suits">♥ / ♠</string>
     <string name="no_trump">NT</string>
 
-    <string name="before_before">non./non</string>
-    <string name="before_after">non./vuln.</string>
-    <string name="after_before">vuln./non.</string>
-    <string name="after_after">vuln./vuln.</string>
+    <string name="non_non">non./non.</string>
+    <string name="non_vul">non./vuln.</string>
+    <string name="vul_non">vuln./non.</string>
+    <string name="vul_vul">vuln./vuln.</string>
 
     <string name="bid_normal">norm.</string>
     <string name="bid_double">dbl.</string>
@@ -22,14 +57,12 @@
     <string name="invalid_level">Invalid contract level.</string>
     <string name="invalid_color">Invalid contract color.</string>
     <string name="invalid_contract">Invalid information about doubling/redoubling.</string>
-    <string name="invalid_vulnerability">Invalid information about vulnerability.</string>
     <string name="invalid_pc">Invalid number for Milton Work Point Count.</string>
     <string name="invalid_tricks">Invalid number of tricks taken.</string>
     <string name="invalid_passes">For four passes enter data for side with more PCs.</string>
 
     <string name="result_for_us">Score for declaring side.</string>
     <string name="result_for_them">Score for defending side.</string>
-
     <string name="result_pts_wo_pc">Points (excl. PC):</string>
     <string name="result_pts">Points (incl. PC):</string>
     <string name="result_imps">IMPs:</string>

--
Gitblit v1.9.1