]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: fixed bug with CategoryEdit preventing adding a category.
authorrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Sat, 24 Oct 2009 23:05:02 +0000 (23:05 +0000)
committerrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Sat, 24 Oct 2009 23:05:02 +0000 (23:05 +0000)
Updated the front_door layout to work better on a QVGA display.

git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2346 72b678ce-9140-0410-bee8-679b907dd61a

.classpath
AndroidManifest.xml
res/layout-land/front_door.xml
res/layout/front_door.xml
src/org/openintents/safe/AskPassword.java
src/org/openintents/safe/CategoryEdit.java
src/org/openintents/safe/CategoryList.java

index 263baf8de412d6b7f09be27143698058746a8cdb..8b379236399b1e874e0fbd5bbf839e5eab70a652 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+       <classpathentry kind="lib" path="lib/OISafeMyBackupPro.jar"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
-       <classpathentry kind="lib" path="lib/OISafeMyBackupPro.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index bd8a82000f589f01cee5aafd9c636b1059f1db66..729d9358258576e9464439d13e67e6ba8bcc7ebf 100644 (file)
@@ -86,7 +86,7 @@
         <activity class=".PassEdit" android:name="PassEdit" android:label="@string/app_name" />
         <activity class=".CategoryList" android:name="CategoryList" android:label="@string/app_name" />
         <activity class=".Search" android:name="Search" android:label="@string/app_name" />
-        <activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name"/>\r
+        <activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name" android:windowSoftInputMode="adjustPan"/>\r
         <activity class=".Help" android:name="Help" android:label="@string/app_name" />
         <activity class=".ChangePass" android:name="ChangePass" android:label="@string/app_name" />
         <activity class=".Restore" android:name="Restore" android:label="@string/app_name" />
index 6d3ef860c73979c6564550280af4ab989a9a626c..e8204fe30858b95aac8f6bc098a4492c469c7fe4 100644 (file)
 * limitations under the License.\r
 *\r
 -->\r
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
-       android:orientation="vertical" android:layout_width="fill_parent"\r
-       android:layout_height="fill_parent">\r
-       <LinearLayout android:id="@+id/entry_head"\r
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"\r
+    android:layout_width="fill_parent"\r
+    android:layout_height="wrap_content"\r
+    android:scrollbars="vertical">\r
+\r
+<LinearLayout android:id="@+id/entry_head"\r
                android:layout_width="fill_parent" \r
                android:layout_height="wrap_content"\r
                android:orientation = "vertical"\r
                                android:layout_height="wrap_content"\r
                        />\r
                </LinearLayout>\r
-       </LinearLayout>\r
        <TextView android:id="@+id/first_time"\r
-               android:layout_below="@id/entry_head"\r
                android:text="@string/first_time" \r
                android:paddingBottom="10sp"\r
-               android:visibility="invisible" \r
+               android:visibility="gone" \r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
-       <TextView android:id="@+id/pass_lbl"\r
-               android:layout_below="@id/first_time"\r
-               android:paddingRight="10sp"\r
-               android:layout_width="wrap_content"\r
-               android:layout_height="wrap_content"\r
-               android:text="@string/master_password" />\r
        <EditText android:id="@+id/password" \r
-               android:layout_below="@id/first_time"\r
-               android:layout_toRightOf="@id/pass_lbl"\r
-               android:password="true"\r
-               android:autoText="false"\r
-               android:singleLine="true"\r
+               android:inputType="textPassword"\r
+               android:hint="@string/master_password"\r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
-               \r
-       <TextView android:id="@+id/confirm_lbl"\r
-               android:layout_below="@id/password"\r
-               android:paddingRight="17sp"\r
-               android:visibility="invisible" \r
-               android:layout_width="wrap_content"\r
-               android:layout_height="wrap_content"\r
-               android:text="@string/confirm" />\r
+\r
        <EditText android:id="@+id/pass_confirm"\r
-               android:layout_below="@id/password"\r
-               android:layout_toRightOf="@id/confirm_lbl"\r
-               android:visibility="invisible" \r
-               android:password="true"\r
-               android:autoText="false"\r
-               android:singleLine="true"\r
+               android:visibility="gone" \r
+               android:inputType="textPassword"\r
+               android:hint="@string/confirm"\r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
 \r
        <Button android:id="@+id/continue_button" \r
-               android:layout_below="@id/pass_confirm"\r
                android:text="Continue"\r
                android:layout_width="wrap_content"\r
                android:layout_height="wrap_content" /> \r
 \r
        <Button android:id="@+id/restore_button" \r
-               android:layout_below="@id/pass_confirm"\r
-               android:layout_toRightOf="@id/continue_button"\r
-               android:visibility="invisible" \r
+               android:visibility="gone" \r
                android:text="@string/restore"\r
                android:layout_width="wrap_content"\r
                android:layout_height="wrap_content" /> \r
-</RelativeLayout>      
\ No newline at end of file
+</LinearLayout>\r
+</ScrollView>\r
+       
\ No newline at end of file
index 09d78c6a3f8b531eef25bf9607a552e71973dbf2..6c3ec4572326095290718eac92b4e7b682451705 100644 (file)
 * limitations under the License.\r
 *\r
 -->\r
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"\r
+    android:layout_width="fill_parent"\r
+    android:layout_height="wrap_content"\r
+    android:scrollbars="vertical">\r
+\r
+<LinearLayout\r
        android:orientation="vertical" android:layout_width="fill_parent"\r
        android:layout_height="fill_parent">\r
         <LinearLayout android:layout_width="wrap_content" \r
        <TextView android:id="@+id/first_time"\r
                android:text="@string/first_time" \r
                android:paddingBottom="10px"\r
-               android:visibility="invisible" \r
+               android:visibility="gone" \r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" /> \r
     <TextView android:id="@+id/remote"\r
                android:text="@string/remote_ask" \r
                android:paddingBottom="10px"\r
-               android:visibility="invisible" \r
+               android:visibility="gone" \r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
-       <TextView android:id="@+id/pass_lbl"\r
-               android:layout_width="fill_parent"\r
-               android:layout_height="wrap_content"\r
-               android:text="@string/master_password" />\r
+\r
        <EditText android:id="@+id/password" \r
-               android:password="true"\r
-               android:autoText="false"\r
-               android:singleLine="true"\r
+               android:inputType="textPassword"\r
+               android:hint="@string/master_password"\r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
-               \r
-       <TextView android:id="@+id/confirm_lbl"\r
-               android:visibility="invisible" \r
-               android:layout_width="fill_parent"\r
-               android:layout_height="wrap_content"\r
-               android:text="@string/confirm" />\r
+\r
        <EditText android:id="@+id/pass_confirm"\r
-               android:visibility="invisible" \r
-               android:password="true"\r
-               android:autoText="false"\r
-               android:singleLine="true"\r
+               android:visibility="gone" \r
+               android:inputType="textPassword"\r
+               android:hint="@string/confirm"\r
                android:layout_width="fill_parent"\r
                android:layout_height="wrap_content" />\r
 \r
@@ -78,8 +73,9 @@
                android:layout_width="wrap_content"\r
                android:layout_height="wrap_content" /> \r
        <Button android:id="@+id/restore_button" \r
-               android:visibility="invisible" \r
+               android:visibility="gone" \r
                android:text="@string/restore"\r
                android:layout_width="wrap_content"\r
                android:layout_height="wrap_content" /> \r
-</LinearLayout>        
\ No newline at end of file
+</LinearLayout>\r
+</ScrollView>\r
index 29045ad05a5cd0c13732b1ef05fb18a176edf223..df3e5216062e1b3ea42ed4ec27a60a9f8c6373e2 100644 (file)
@@ -70,7 +70,7 @@ public class AskPassword extends Activity {
        private EditText pbeKey;
        private DBHelper dbHelper;
        private TextView introText;
-       private TextView confirmText;
+//     private TextView confirmText;
        private TextView remoteAsk;
        private EditText confirmPass;
        private String PBEKey;
@@ -147,11 +147,11 @@ public class AskPassword extends Activity {
                introText = (TextView) findViewById(R.id.first_time);
                remoteAsk = (TextView) findViewById(R.id.remote);
                confirmPass = (EditText) findViewById(R.id.pass_confirm);
-               confirmText = (TextView) findViewById(R.id.confirm_lbl);
+//             confirmText = (TextView) findViewById(R.id.confirm_lbl);
                if (masterKey.length() == 0) {
                        firstTime = true;
                        introText.setVisibility(View.VISIBLE);
-                       confirmText.setVisibility(View.VISIBLE);
+//                     confirmText.setVisibility(View.VISIBLE);
                        confirmPass.setVisibility(View.VISIBLE);
                        checkForBackup();
                }
index 12592e0a8d7e010883a27bc23583343e98d92ec4..b20a8c408a7f6dba23d38b13df99ed8815e8009f 100644 (file)
@@ -79,10 +79,6 @@ public class CategoryEdit extends Activity {
                    Bundle extras = getIntent().getExtras();            
                    RowId = extras != null ? extras.getLong(CategoryList.KEY_ID) : null;
                }
-               if ((RowId==null) || (RowId<1)) {
-                       finish();       // no valid category
-                       return;
-               }
        
                confirmButton.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View arg0) {
index 0c0a9d1d0d592eec91e1281ad0fa51350a6ab7df..18b5c0190b0a72eccd60e18e52c32560895e4839 100644 (file)
@@ -483,7 +483,8 @@ public class CategoryList extends ListActivity {
                return masterKey;
     }
 
-    private void addCategory() {
+    private void addCategoryActivity() {
+       if (debug) Log.d(TAG,"addCategoryActivity()");
                Intent i = new Intent(this, CategoryEdit.class);
                startActivityForResult(i,REQUEST_ADD_CATEGORY);
     }
@@ -526,7 +527,7 @@ public class CategoryList extends ListActivity {
                        }
                    break;
                case ADD_CATEGORY_INDEX:
-                   addCategory();
+                   addCategoryActivity();
                    break;
                case DEL_CATEGORY_INDEX:
                    try {