This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Santiago Martinez
committed
Aug 2, 2010
1 parent
3803b34
commit cfe48d5
Showing
5 changed files
with
148 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<RelativeLayout android:id="@+id/RelativeLayout01" | ||
android:layout_width="wrap_content" android:layout_height="wrap_content" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<TextView android:id="@+id/subjectLabel" | ||
android:text="Subject" | ||
android:layout_toLeftOf="@+id/subject" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:paddingRight="5px" | ||
android:paddingTop="5px" | ||
android:layout_width="wrap_content"/> | ||
|
||
|
||
<EditText android:id="@+id/subject" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_toRightOf="@+id/participanlabel" | ||
android:gravity="top"/> | ||
|
||
<TextView android:text="Participants" | ||
android:id="@+id/participanlabel" | ||
android:layout_below="@+id/subject" | ||
android:layout_width="wrap_content" | ||
android:gravity="center_vertical" | ||
android:paddingRight="5px" | ||
android:paddingTop="5px" | ||
android:layout_height="wrap_content"/> | ||
|
||
<EditText android:layout_toRightOf="@+id/participanlabel" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@+id/subject" | ||
android:id="@+id/participants"/> | ||
|
||
<TextView android:id="@+id/messageLabel" | ||
android:text="Message" | ||
android:layout_below="@+id/participants" | ||
android:layout_height="wrap_content" | ||
android:layout_toLeftOf="@+id/message" | ||
android:gravity="center_vertical" | ||
android:paddingRight="5px" | ||
android:paddingTop="5px" | ||
android:layout_width="wrap_content"/> | ||
|
||
|
||
<EditText android:id="@+id/message" | ||
android:lines="10" | ||
android:layout_toRightOf="@+id/participanlabel" | ||
android:layout_height="100dip" | ||
android:layout_width="fill_parent" | ||
android:inputType="textMultiLine" | ||
android:gravity="top" | ||
android:layout_below="@+id/participants" /> | ||
|
||
|
||
<Button android:text="Create" | ||
android:layout_toRightOf="@+id/messageLabel" | ||
android:id="@+id/create" | ||
android:layout_below="@+id/message" | ||
android:layout_height="wrap_content" | ||
android:layout_width="wrap_content"/> | ||
|
||
|
||
</RelativeLayout> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package net.processone.awc; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.view.View.OnClickListener; | ||
import android.widget.Button; | ||
import android.widget.EditText; | ||
|
||
public class NewWave extends Activity { | ||
|
||
private OneWave ow; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
ow = (OneWave) getApplication(); | ||
|
||
setContentView(R.layout.newwave); | ||
|
||
Button b = (Button) findViewById(R.id.create); | ||
|
||
b.setOnClickListener(new OnClickListener() { | ||
public void onClick(View v) { | ||
EditText textView = (EditText) findViewById(R.id.participants); | ||
String[] p = textView.getText().toString().split(";"); //TODO improve this | ||
|
||
Set<String> participants = new HashSet<String>(); | ||
|
||
for (String s : p) | ||
participants.add(s.trim()); | ||
|
||
EditText subject = (EditText) findViewById(R.id.subject); | ||
|
||
EditText message = (EditText) findViewById(R.id.message); | ||
|
||
ow.createWave(subject.getText().toString(), participants, | ||
message.getText().toString()); | ||
} | ||
}); | ||
|
||
} | ||
|
||
@Override | ||
protected void onActivityResult(int requestCode, int resultCode, Intent data) { | ||
super.onActivityResult(requestCode, resultCode, data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters