Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent Nguyen committed Dec 14, 2013
1 parent a8b0ba5 commit e2309de
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
50 changes: 29 additions & 21 deletions PenPal/gen/edu/berkeley/cs160/off_by_1/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -989,23 +989,30 @@ public static final class drawable {
public static final int abc_textfield_searchview_right_holo_light=0x7f020056;
public static final int back_btn=0x7f020057;
public static final int background=0x7f020058;
public static final int home_icon=0x7f020059;
public static final int list_view_button=0x7f02005a;
public static final int list_view_green_button=0x7f02005b;
public static final int list_view_green_button_click=0x7f02005c;
public static final int opened_message=0x7f02005d;
public static final int pen_pal_icon=0x7f02005e;
public static final int pen_pal_text=0x7f02005f;
public static final int profile_icon=0x7f020060;
public static final int red_button=0x7f020061;
public static final int stamp1=0x7f020062;
public static final int stamp2=0x7f020063;
public static final int stamp3=0x7f020064;
public static final int stamp4=0x7f020065;
public static final int stamp5=0x7f020066;
public static final int sun=0x7f020067;
public static final int top_bar=0x7f020068;
public static final int unopened_message=0x7f020069;
public static final int draw_btn=0x7f020059;
public static final int home_icon=0x7f02005a;
public static final int list_view_button=0x7f02005b;
public static final int list_view_green_button=0x7f02005c;
public static final int list_view_green_button_click=0x7f02005d;
public static final int opened_message=0x7f02005e;
public static final int pen_pal_icon=0x7f02005f;
public static final int pen_pal_text=0x7f020060;
public static final int play_button=0x7f020061;
public static final int profile_icon=0x7f020062;
public static final int record_btn=0x7f020063;
public static final int red_button=0x7f020064;
public static final int stamp1=0x7f020065;
public static final int stamp2=0x7f020066;
public static final int stamp3=0x7f020067;
public static final int stamp4=0x7f020068;
public static final int stamp5=0x7f020069;
public static final int stop_button=0x7f02006a;
public static final int sun=0x7f02006b;
public static final int talk_btn=0x7f02006c;
public static final int throw_question=0x7f02006d;
public static final int top_bar=0x7f02006e;
public static final int unopened_message=0x7f02006f;
public static final int write_btn=0x7f020070;
}
public static final class id {
public static final int RelativeLayout1=0x7f07004b;
Expand Down Expand Up @@ -1103,7 +1110,7 @@ public static final class id {
public static final int showHome=0x7f070004;
public static final int showTitle=0x7f070006;
public static final int split_action_bar=0x7f07001e;
public static final int stamp=0x7f07004e;
public static final int stamp=0x7f07004d;
public static final int submit_area=0x7f070039;
public static final int suggestedQuestion=0x7f070050;
public static final int sun=0x7f070042;
Expand All @@ -1112,7 +1119,7 @@ public static final class id {
public static final int textMessageButton=0x7f070061;
public static final int timmy=0x7f070048;
public static final int title=0x7f07002b;
public static final int toUser=0x7f07004d;
public static final int toUser=0x7f07004e;
public static final int top_action_bar=0x7f070020;
public static final int unreadMessagesLayout=0x7f070046;
public static final int unreadText=0x7f070045;
Expand Down Expand Up @@ -1339,8 +1346,9 @@ public static final class style {
/** Action Bar Theme.
Action Bar Theme.
*/
public static final int PenPalActionBar=0x7f0d0088;
public static final int PenPalTheme=0x7f0d0089;
public static final int PenPalActionBar=0x7f0d0089;
public static final int PenPalTheme=0x7f0d008a;
public static final int QuestionButton=0x7f0d0088;
public static final int RedButton=0x7f0d0087;
/** Mimic text appearance in select_dialog_item.xml
*/
Expand Down
5 changes: 5 additions & 0 deletions PenPal/res/layout/activity_friend_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
android:layout_marginTop="42dp"
android:background="@drawable/stamp1"
android:onClick="goToProfile"
android:text="Timmy"
android:textSize="15sp" />

<Button
Expand All @@ -36,6 +37,7 @@
android:layout_marginTop="42dp"
android:background="@drawable/stamp2"
android:onClick="goToProfile"
android:text="Annie"
android:src="@drawable/stamp2"/>

<Button
Expand All @@ -46,6 +48,7 @@
android:layout_marginRight="22dp"
android:layout_marginTop="42dp"
android:background="@drawable/stamp3"
android:text="Angus"
android:onClick="goToProfile"/>

<Button
Expand All @@ -55,6 +58,7 @@
android:layout_marginLeft="22dp"
android:layout_marginTop="200dp"
android:background="@drawable/stamp4"
android:text="Mike"
android:onClick="goToProfile"/>

<Button
Expand All @@ -64,6 +68,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="200dp"
android:background="@drawable/stamp5"
android:text="Natalie"
android:onClick="goToProfile"/>

<ImageView
Expand Down
5 changes: 5 additions & 0 deletions PenPal/src/edu/berkeley/cs160/off_by_1/FriendList.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,17 @@ public void goToProfile(View v) {
}

private byte[] getUserStamp(Button v) {
try {
Drawable stamp = v.getCompoundDrawables()[3];
Bitmap stampBitmap = ((BitmapDrawable) stamp).getBitmap();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
stampBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] compressStamp = stream.toByteArray();
return compressStamp;
} catch (Exception e) {

}
return null;
}

}
4 changes: 4 additions & 0 deletions PenPal/src/edu/berkeley/cs160/off_by_1/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
//String[] data = i.getStringArrayExtra("name");
String name = i.getStringExtra("name");
String[] data = Home.getUserData(name);
try {
byte[] compressStamp = i.getByteArrayExtra("image");
Bitmap stampBitmap = BitmapFactory.decodeByteArray(compressStamp, 0, compressStamp.length);

Expand All @@ -46,6 +47,9 @@ protected void onCreate(Bundle savedInstanceState) {
friendProfileStamp.setImageBitmap(stampBitmap);
friendProfileLocation.setText(friendProfileLocationText);
friendProfileLanguage.setText(friendProfileLanguageText);
} catch (Exception e) {

}
}

@Override
Expand Down
Binary file removed appcompat/bin/android-support-v7-appcompat.jar
Binary file not shown.

0 comments on commit e2309de

Please sign in to comment.