Skip to content

Commit

Permalink
did some string fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent Nguyen committed Dec 13, 2013
1 parent 42b5ce1 commit 7cd5435
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 215 deletions.
16 changes: 10 additions & 6 deletions PenPal/gen/edu/berkeley/cs160/off_by_1/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,8 @@ public static final class id {
public static final int questionButton=0x7f07004f;
public static final int radio=0x7f07002f;
public static final int receivedContainer=0x7f070060;
public static final int recordButton=0x7f07006c;
public static final int recordProgressBar=0x7f07006b;
public static final int recordButton=0x7f07006b;
public static final int recordProgressBar=0x7f07006c;
public static final int recordTimer=0x7f07006d;
public static final int reply=0x7f07005f;
public static final int research=0x7f070057;
Expand Down Expand Up @@ -1266,10 +1266,10 @@ public static final class string {
public static final int green=0x7f0c0030;
public static final int hello_user=0x7f0c001a;
public static final int home_button=0x7f0c0016;
public static final int internet_error=0x7f0c003f;
public static final int internet_error=0x7f0c0043;
public static final int language=0x7f0c003c;
public static final int largesize=0x7f0c0038;
public static final int loading=0x7f0c0040;
public static final int loading=0x7f0c0044;
public static final int location=0x7f0c003b;
public static final int medsize=0x7f0c0037;
public static final int message_sent_text=0x7f0c0020;
Expand All @@ -1280,10 +1280,14 @@ public static final class string {
public static final int red=0x7f0c002b;
public static final int reply_button=0x7f0c0026;
public static final int research_pen_pal=0x7f0c0028;
public static final int send_another=0x7f0c0041;
public static final int send_another=0x7f0c0045;
public static final int send_message_button=0x7f0c0029;
public static final int send_message_text=0x7f0c001f;
public static final int smallsize=0x7f0c0036;
public static final int start_play=0x7f0c0041;
public static final int start_record=0x7f0c003f;
public static final int stop_play=0x7f0c0042;
public static final int stop_record=0x7f0c0040;
public static final int stroke=0x7f0c003a;
public static final int text_message=0x7f0c0021;
public static final int title_activity_friend_list=0x7f0c000e;
Expand All @@ -1294,7 +1298,7 @@ public static final class string {
public static final int title_activity_receive_message=0x7f0c0011;
public static final int title_activity_send_message=0x7f0c0013;
public static final int to_user=0x7f0c0025;
public static final int undo=0x7f0c0042;
public static final int undo=0x7f0c0046;
public static final int user_profile=0x7f0c002a;
public static final int voice_message=0x7f0c0023;
public static final int yellow=0x7f0c002e;
Expand Down
32 changes: 17 additions & 15 deletions PenPal/res/layout/voice_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@
android:layout_height="match_parent"
android:orientation="vertical" >

<ProgressBar
android:id="@+id/recordProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_below="@+id/recordButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="26dp"
android:max="60"/>

<Button
android:id="@+id/recordButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="140dp"
android:text="Start Recording" />
android:text="@string/start_record"
android:visibility="visible"
/>

<Button
android:id="@+id/playButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/recordProgressBar"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="Play Button" />
android:layout_marginTop="140dp"
android:text="@string/start_play"
android:visibility="invisible" />

<ProgressBar
android:id="@+id/recordProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_below="@+id/recordButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="26dp"
android:max="60" />

<TextView
android:id="@+id/recordTimer"
Expand All @@ -42,4 +44,4 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="30sp" />

</RelativeLayout>
</RelativeLayout>
6 changes: 6 additions & 0 deletions PenPal/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
<string name="language">%1$s speaks %2$s</string>
<string name="get_question_button">Throw me a question!</string>
<string name="received_message"> Hi Jack Jack,\n How are you doing today?</string>
<string name="start_record">Record Message</string>
<string name="stop_record">Stop Recording</string>
<string name="start_play">Play Message</string>
<string name="stop_play">"Stop Playing"</string>


<string-array name="suggested_questions">
<item>What are you learning in school? </item>
<item>What did you eat for breakfast? </item>
Expand Down
16 changes: 8 additions & 8 deletions PenPal/src/edu/berkeley/cs160/off_by_1/MessageFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class MessageFragment extends Fragment{

MessageFragment fragment;
boolean draw = false;
Activity con;
Activity act;

public MessageFragment() {

Expand All @@ -38,7 +38,7 @@ public MessageFragment(String type) {
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
con = activity;
act = activity;
Log.d("debug", "hello onattach");
}

Expand All @@ -48,15 +48,15 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
//return inflater.inflate(R.layout.text_message, container, false);
if (draw) {
//if (draw) {
Log.d("debug", "it's drawing");
Log.d("debug", getActivity().toString());
onAttach(getActivity());
fragment.onAttach(con);
draw = false;
//onAttach(getActivity());
fragment.onAttach(act);
//draw = false;
return fragment.onCreateView(inflater, container, savedInstanceState);
}
return fragment.onCreateView(inflater, container, savedInstanceState);
//}
//return fragment.onCreateView(inflater, container, savedInstanceState);
}

Intent getIntent() {
Expand Down
Loading

0 comments on commit 7cd5435

Please sign in to comment.