Mention name of connected device on ListenActivity
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
tools:context="protect.babymonitor.MonitorActivity" >
|
tools:context="protect.babymonitor.MonitorActivity" >
|
||||||
|
|
||||||
<TableLayout
|
<TableLayout
|
||||||
|
android:id="@+id/tableLayout1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
@@ -44,7 +45,26 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/connectedToTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:padding="@dimen/activity_horizontal_margin"
|
||||||
|
android:text="Connected to:"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/connectedDeviceNameTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignLeft="@+id/connectedToTextView"
|
||||||
|
android:layout_below="@+id/connectedToTextView"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text=" "
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -105,6 +105,16 @@ public class ListenActivity extends Activity
|
|||||||
|
|
||||||
setContentView(R.layout.activity_listen);
|
setContentView(R.layout.activity_listen);
|
||||||
|
|
||||||
|
ListenActivity.this.runOnUiThread(new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
final TextView statusText = (TextView) findViewById(R.id.connectedDeviceNameTextView);
|
||||||
|
statusText.setText(_name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
_listenThread = new Thread(new Runnable()
|
_listenThread = new Thread(new Runnable()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user