Tobias Duehr avatar Tobias Duehr committed 7ae0c21

Minor changes - pushed version to 1.0

Comments (0)

Files changed (5)

AndroidManifest.xml

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.saibotd.bitbeaker"
-      android:versionCode="4" android:versionName="0.8">
+      android:versionName="1.0" android:versionCode="5">
     <uses-sdk android:minSdkVersion="8" />
     <uses-permission android:name="android.permission.INTERNET"></uses-permission>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

gen/com/saibotd/bitbeaker/R.java

-/* AUTO-GENERATED FILE.  DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found.  It
- * should not be modified by hand.
- */
-
-package com.saibotd.bitbeaker;
-
-public final class R {
-    public static final class array {
-        public static final int type_of_issue=0x7f060000;
-    }
-    public static final class attr {
-    }
-    public static final class drawable {
-        public static final int add=0x7f020000;
-        public static final int bg=0x7f020001;
-        public static final int bug=0x7f020002;
-        public static final int del=0x7f020003;
-        public static final int edit=0x7f020004;
-        public static final int enhancement=0x7f020005;
-        public static final int file=0x7f020006;
-        public static final int folder=0x7f020007;
-        public static final int header=0x7f020008;
-        public static final int ic_menu_refresh=0x7f020009;
-        public static final int ic_menu_search_holo_dark=0x7f02000a;
-        public static final int ic_menu_share=0x7f02000b;
-        public static final int ic_menu_stop=0x7f02000c;
-        public static final int icon=0x7f02000d;
-        public static final int lock=0x7f02000e;
-        public static final int logo_big=0x7f02000f;
-        public static final int proposal=0x7f020010;
-        public static final int top_bg=0x7f020011;
-        public static final int top_search=0x7f020012;
-    }
-    public static final class id {
-        public static final int TextView01=0x7f08001d;
-        public static final int TextView02=0x7f08001b;
-        public static final int ad_space=0x7f080008;
-        public static final int bt_issues=0x7f080025;
-        public static final int bt_new_issue=0x7f080009;
-        public static final int bt_save_new_issue=0x7f08001f;
-        public static final int bt_search=0x7f080006;
-        public static final int bt_source_browser=0x7f080024;
-        public static final int bt_wiki=0x7f080026;
-        public static final int changeset_files=0x7f080002;
-        public static final int changeset_loading=0x7f080023;
-        public static final int changeset_message=0x7f080000;
-        public static final int changeset_what=0x7f08000c;
-        public static final int frameLayout1=0x7f08000b;
-        public static final int header_title=0x7f080005;
-        public static final int icon=0x7f080021;
-        public static final int imageView1=0x7f080004;
-        public static final int is_locked=0x7f080011;
-        public static final int issues_list=0x7f080007;
-        public static final int issues_subtitle=0x7f08000f;
-        public static final int issues_title=0x7f08000d;
-        public static final int issues_what=0x7f08000e;
-        public static final int login_button=0x7f080018;
-        public static final int login_password=0x7f080017;
-        public static final int login_username=0x7f080016;
-        public static final int menu_logout=0x7f08002a;
-        public static final int menu_refresh=0x7f080029;
-        public static final int new_issue_content=0x7f08001c;
-        public static final int new_issue_title=0x7f08001a;
-        public static final int new_issue_type=0x7f08001e;
-        public static final int owner_listitem_repositories=0x7f080012;
-        public static final int repositories_list=0x7f080020;
-        public static final int repository_changesets=0x7f080022;
-        public static final int repository_description=0x7f080019;
-        public static final int scrollView1=0x7f080015;
-        public static final int source_title=0x7f080013;
-        public static final int source_webview=0x7f080027;
-        public static final int source_what=0x7f080014;
-        public static final int subtitle=0x7f08000a;
-        public static final int textView1=0x7f080001;
-        public static final int title=0x7f080003;
-        public static final int title_listitem_repositories=0x7f080010;
-        public static final int wiki_webview=0x7f080028;
-    }
-    public static final class layout {
-        public static final int changeset=0x7f030000;
-        public static final int header=0x7f030001;
-        public static final int issues=0x7f030002;
-        public static final int listitem=0x7f030003;
-        public static final int listitem_changeset=0x7f030004;
-        public static final int listitem_issues=0x7f030005;
-        public static final int listitem_repositories=0x7f030006;
-        public static final int listitem_source=0x7f030007;
-        public static final int login=0x7f030008;
-        public static final int new_issue=0x7f030009;
-        public static final int repositories=0x7f03000a;
-        public static final int repository=0x7f03000b;
-        public static final int source=0x7f03000c;
-        public static final int wiki=0x7f03000d;
-    }
-    public static final class menu {
-        public static final int mainmenu=0x7f070000;
-    }
-    public static final class string {
-        public static final int app_name=0x7f050001;
-        public static final int browse_source=0x7f05000c;
-        public static final int changes=0x7f05000b;
-        public static final int changesets=0x7f050005;
-        public static final int clear_cache=0x7f050013;
-        public static final int content=0x7f050016;
-        public static final int description=0x7f050006;
-        public static final int files=0x7f05000a;
-        public static final int hello=0x7f050000;
-        public static final int hint=0x7f050019;
-        public static final int issue_tracker=0x7f050003;
-        public static final int issues=0x7f05000f;
-        public static final int log_out=0x7f050010;
-        public static final int login=0x7f050008;
-        public static final int new_issue=0x7f050014;
-        public static final int nothing=0x7f050007;
-        public static final int pleaseenterbitbucket=0x7f050009;
-        public static final int refresh=0x7f050012;
-        public static final int search_repo=0x7f050011;
-        public static final int source=0x7f05000e;
-        public static final int source_browser=0x7f05000d;
-        public static final int submit_new_issue=0x7f050018;
-        public static final int title=0x7f050015;
-        public static final int type=0x7f050017;
-        public static final int website=0x7f050004;
-        public static final int wiki=0x7f050002;
-    }
-    public static final class xml {
-        public static final int searchable=0x7f040000;
-    }
-}
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.saibotd.bitbeaker;
+
+public final class R {
+    public static final class array {
+        public static final int type_of_issue=0x7f060000;
+    }
+    public static final class attr {
+    }
+    public static final class drawable {
+        public static final int add=0x7f020000;
+        public static final int bg=0x7f020001;
+        public static final int bug=0x7f020002;
+        public static final int del=0x7f020003;
+        public static final int edit=0x7f020004;
+        public static final int enhancement=0x7f020005;
+        public static final int file=0x7f020006;
+        public static final int folder=0x7f020007;
+        public static final int header=0x7f020008;
+        public static final int ic_menu_refresh=0x7f020009;
+        public static final int ic_menu_search_holo_dark=0x7f02000a;
+        public static final int ic_menu_share=0x7f02000b;
+        public static final int ic_menu_stop=0x7f02000c;
+        public static final int icon=0x7f02000d;
+        public static final int lock=0x7f02000e;
+        public static final int logo_big=0x7f02000f;
+        public static final int proposal=0x7f020010;
+        public static final int top_bg=0x7f020011;
+        public static final int top_search=0x7f020012;
+    }
+    public static final class id {
+        public static final int TextView01=0x7f08001d;
+        public static final int TextView02=0x7f08001b;
+        public static final int ad_space=0x7f080008;
+        public static final int bt_issues=0x7f080025;
+        public static final int bt_new_issue=0x7f080009;
+        public static final int bt_save_new_issue=0x7f08001f;
+        public static final int bt_search=0x7f080006;
+        public static final int bt_source_browser=0x7f080024;
+        public static final int bt_wiki=0x7f080026;
+        public static final int changeset_files=0x7f080002;
+        public static final int changeset_loading=0x7f080023;
+        public static final int changeset_message=0x7f080000;
+        public static final int changeset_what=0x7f08000c;
+        public static final int frameLayout1=0x7f08000b;
+        public static final int header_title=0x7f080005;
+        public static final int icon=0x7f080021;
+        public static final int imageView1=0x7f080004;
+        public static final int is_locked=0x7f080011;
+        public static final int issues_list=0x7f080007;
+        public static final int issues_subtitle=0x7f08000f;
+        public static final int issues_title=0x7f08000d;
+        public static final int issues_what=0x7f08000e;
+        public static final int login_button=0x7f080018;
+        public static final int login_password=0x7f080017;
+        public static final int login_username=0x7f080016;
+        public static final int menu_logout=0x7f08002a;
+        public static final int menu_refresh=0x7f080029;
+        public static final int new_issue_content=0x7f08001c;
+        public static final int new_issue_title=0x7f08001a;
+        public static final int new_issue_type=0x7f08001e;
+        public static final int owner_listitem_repositories=0x7f080012;
+        public static final int repositories_list=0x7f080020;
+        public static final int repository_changesets=0x7f080022;
+        public static final int repository_description=0x7f080019;
+        public static final int scrollView1=0x7f080015;
+        public static final int source_title=0x7f080013;
+        public static final int source_webview=0x7f080027;
+        public static final int source_what=0x7f080014;
+        public static final int subtitle=0x7f08000a;
+        public static final int textView1=0x7f080001;
+        public static final int title=0x7f080003;
+        public static final int title_listitem_repositories=0x7f080010;
+        public static final int wiki_webview=0x7f080028;
+    }
+    public static final class layout {
+        public static final int changeset=0x7f030000;
+        public static final int header=0x7f030001;
+        public static final int issues=0x7f030002;
+        public static final int listitem=0x7f030003;
+        public static final int listitem_changeset=0x7f030004;
+        public static final int listitem_issues=0x7f030005;
+        public static final int listitem_repositories=0x7f030006;
+        public static final int listitem_source=0x7f030007;
+        public static final int login=0x7f030008;
+        public static final int new_issue=0x7f030009;
+        public static final int repositories=0x7f03000a;
+        public static final int repository=0x7f03000b;
+        public static final int source=0x7f03000c;
+        public static final int wiki=0x7f03000d;
+    }
+    public static final class menu {
+        public static final int mainmenu=0x7f070000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f050001;
+        public static final int browse_source=0x7f05000c;
+        public static final int changes=0x7f05000b;
+        public static final int changesets=0x7f050005;
+        public static final int clear_cache=0x7f050013;
+        public static final int content=0x7f050016;
+        public static final int description=0x7f050006;
+        public static final int files=0x7f05000a;
+        public static final int hello=0x7f050000;
+        public static final int hint=0x7f050019;
+        public static final int issue_tracker=0x7f050003;
+        public static final int issues=0x7f05000f;
+        public static final int log_out=0x7f050010;
+        public static final int login=0x7f050008;
+        public static final int new_issue=0x7f050014;
+        public static final int nothing=0x7f050007;
+        public static final int pleaseenterbitbucket=0x7f050009;
+        public static final int refresh=0x7f050012;
+        public static final int search_repo=0x7f050011;
+        public static final int source=0x7f05000e;
+        public static final int source_browser=0x7f05000d;
+        public static final int submit_new_issue=0x7f050018;
+        public static final int title=0x7f050015;
+        public static final int type=0x7f050017;
+        public static final int website=0x7f050004;
+        public static final int wiki=0x7f050002;
+    }
+    public static final class xml {
+        public static final int searchable=0x7f040000;
+    }
+}

res/layout/header.xml

   android:background="@drawable/top_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/title">
     <ImageView android:id="@+id/imageView1" android:src="@drawable/header" android:minHeight="0dip" android:layout_height="54dip" android:paddingLeft="10dip" android:layout_width="130dip"></ImageView>
     <TextView android:layout_width="wrap_content" android:layout_height="54dip" android:layout_gravity="center|center_vertical|right" android:layout_marginRight="5dip" android:id="@+id/header_title" android:paddingLeft="150dip" android:gravity="center_vertical|right" android:text="@string/nothing"></TextView>
-    <ImageButton android:background="@drawable/top_search" android:layout_gravity="right" android:id="@+id/bt_search" android:src="@drawable/ic_menu_search_holo_dark" android:layout_height="54dip" android:layout_width="54dip" android:visibility="gone"></ImageButton>
+    <ImageButton android:background="@drawable/top_search" android:layout_gravity="right" android:id="@+id/bt_search" android:src="@drawable/ic_menu_search_holo_dark" android:layout_height="54dip" android:layout_width="54dip" android:visibility="gone" android:focusable="true" android:focusableInTouchMode="true"></ImageButton>
 </FrameLayout>

res/layout/login.xml

   android:layout_width="match_parent"
   android:orientation="vertical" android:layout_height="match_parent" android:background="@drawable/bg">
   <include layout="@layout/header" android:layout_width="match_parent" android:layout_height="wrap_content"/>
-  <TextView android:layout_gravity="right" android:layout_margin="5dip" android:layout_height="wrap_content" android:text="@string/hint" android:textSize="10dip" android:textAppearance="?android:attr/textAppearanceSmall" android:id="@+id/textView1" android:layout_width="wrap_content"></TextView>
     <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_weight="1" android:orientation="vertical">
         <ImageView android:layout_height="wrap_content" android:layout_width="match_parent" android:src="@drawable/logo_big" android:layout_margin="10dip"></ImageView>
     </LinearLayout>
     <ScrollView android:id="@+id/scrollView1" android:layout_height="wrap_content" android:layout_width="match_parent">
         <LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="match_parent">
-            <TextView android:layout_margin="5dip" android:layout_height="wrap_content" android:text="@string/pleaseenterbitbucket" android:layout_width="wrap_content"></TextView>
+            <TextView android:layout_height="wrap_content" android:text="@string/pleaseenterbitbucket" android:layout_width="wrap_content" android:layout_marginLeft="5dip" android:layout_marginTop="5dip"></TextView>
+            <TextView android:text="@string/hint" android:id="@+id/textView1" android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="10dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="left" android:layout_marginLeft="5dip" android:layout_marginBottom="5dip"></TextView>
             <EditText android:layout_marginLeft="5dip" android:inputType="text" android:id="@+id/login_username" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:text="@string/nothing" android:layout_width="match_parent" android:hint="Username"></EditText>
             <EditText android:layout_marginLeft="5dip" android:inputType="textPassword" android:id="@+id/login_password" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:text="@string/nothing" android:layout_width="match_parent" android:hint="Password"></EditText>
             <Button android:id="@+id/login_button" android:layout_margin="5dip" android:text="@string/login" android:layout_height="wrap_content" android:layout_width="match_parent"></Button>

src/com/saibotd/bitbeaker/LoginActivity.java

         
         try{
 	        Bundle b = getIntent().getExtras();
-	        if(b.containsKey("logout")){
-	        	logOut(false);
-	        }
+	        if(b.containsKey("logout")) logOut(false);
         } catch(Exception e) {}
         if(bitbeaker.getSettings().contains("username")){
         	progressDialog = ProgressDialog.show(this, bitbeaker.getUsername(), "Logging in ...", true);
     	ImageButton search = (ImageButton) findViewById(R.id.bt_search);
         search.setVisibility(ImageButton.VISIBLE);
         search.setOnClickListener(searchClickListener);
+        search.requestFocus();
     }
     
     public boolean onCreateOptionsMenu(Menu menu) {
     	bitbeaker.logOut();
     	if(isError){
     		AlertDialog alertDialog = new AlertDialog.Builder(this).create();
-			alertDialog.setTitle("HTTP Error");
-			alertDialog.setMessage("Login failed");
+			alertDialog.setTitle("Login failed");
+			alertDialog.setMessage("Please check your username and password.");
 			alertDialog.show();
     	}
     	bitbeaker.clearKV();
 		protected Boolean doInBackground(String... params) {
 	    	Boolean all_fine = true;
 			try {
+				
+				/* This is an awful way to check the login! */
+				
 				URL url = new URL("https://api.bitbucket.org/1.0/user/repositories/");
 				HttpsURLConnection urlConnection;
 				urlConnection = (HttpsURLConnection) url.openConnection();
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.