From 61551e05a00d9b37c4a21594be5bc89e4954372e Mon Sep 17 00:00:00 2001 From: Kamil Kraszewski Date: Wed, 30 Nov 2011 15:51:25 -0800 Subject: [PATCH] Refactoring of Android's Hackbook example Summary: Cleaning of the Hackbook code. Main reason of this commit is mixing tabs and white spaces inside the code, which makes the code ugly (for example browsing the code inside github). In addition I also refactored few other things: - I tried to wrap the lines to 100 characters per line (80 per comments) - at least in those places where it made sense - Remove trailing whitespaces and unnecessary blank lines - Add missing @Override adnnotations - Fixed syntax in some places (like "for(i=0;..." -> "for (i = 0;...") - Added missing 'static' keywords Test Plan: Run the app and see if everything works :-) Reviewers: jimbru, raghuc1, vksgupta, dalves Reviewed By: dalves CC: platform-diffs@lists, nbushak, dalves Differential Revision: 370079 --- examples/Hackbook/AndroidManifest.xml | 94 +-- .../Hackbook/res/layout/connection_item.xml | 4 +- .../res/layout/fields_connections_list.xml | 84 +- examples/Hackbook/res/layout/fields_item.xml | 16 +- examples/Hackbook/res/layout/fql_query.xml | 78 +- examples/Hackbook/res/layout/friend_item.xml | 20 +- examples/Hackbook/res/layout/friends_list.xml | 14 +- .../Hackbook/res/layout/graph_explorer.xml | 184 ++-- examples/Hackbook/res/layout/main.xml | 70 +- .../Hackbook/res/layout/main_list_item.xml | 4 +- .../Hackbook/res/layout/permission_item.xml | 10 +- .../Hackbook/res/layout/permissions_list.xml | 96 +-- examples/Hackbook/res/layout/place_item.xml | 14 +- examples/Hackbook/res/layout/places_list.xml | 14 +- examples/Hackbook/res/layout/splash.xml | 8 +- .../res/layout/update_post_response.xml | 86 +- .../res/layout/upload_photo_response.xml | 102 +-- examples/Hackbook/res/values/strings.xml | 140 +-- .../facebook/android/BaseDialogListener.java | 16 +- .../facebook/android/BaseRequestListener.java | 17 +- .../src/com/facebook/android/FQLQuery.java | 123 +-- .../android/FieldsConnectionsDialog.java | 462 +++++----- .../android/FriendsGetProfilePics.java | 192 ++--- .../src/com/facebook/android/FriendsList.java | 326 +++---- .../com/facebook/android/GraphExplorer.java | 592 ++++++------- .../src/com/facebook/android/Hackbook.java | 797 ++++++++++-------- .../facebook/android/IntentUriHandler.java | 13 +- .../src/com/facebook/android/LoginButton.java | 79 +- .../facebook/android/PermissionsDialog.java | 313 +++---- .../src/com/facebook/android/Places.java | 509 +++++------ .../com/facebook/android/SessionEvents.java | 52 +- .../com/facebook/android/SessionStore.java | 17 +- .../com/facebook/android/SplashActivity.java | 42 +- .../android/UpdateStatusResultDialog.java | 94 ++- .../android/UploadPhotoResultDialog.java | 198 ++--- .../src/com/facebook/android/Utility.java | 106 +-- 36 files changed, 2553 insertions(+), 2433 deletions(-) diff --git a/examples/Hackbook/AndroidManifest.xml b/examples/Hackbook/AndroidManifest.xml index 68f80f362a..afd4c5307a 100644 --- a/examples/Hackbook/AndroidManifest.xml +++ b/examples/Hackbook/AndroidManifest.xml @@ -1,49 +1,49 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + package="com.facebook.android" + android:versionCode="1" + android:versionName="1.0"> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Hackbook/res/layout/connection_item.xml b/examples/Hackbook/res/layout/connection_item.xml index 4c77b283ff..e556c06852 100644 --- a/examples/Hackbook/res/layout/connection_item.xml +++ b/examples/Hackbook/res/layout/connection_item.xml @@ -1,11 +1,11 @@ - - \ No newline at end of file + diff --git a/examples/Hackbook/res/layout/fields_connections_list.xml b/examples/Hackbook/res/layout/fields_connections_list.xml index e5e676fcd5..06b48f89e5 100644 --- a/examples/Hackbook/res/layout/fields_connections_list.xml +++ b/examples/Hackbook/res/layout/fields_connections_list.xml @@ -1,45 +1,45 @@ - - - - - -