Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r514 committed - Plumb in buttons, links; tweak layout more.

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r514 committed - Plumb in buttons, links; tweak layout more.


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r514 committed - Plumb in buttons, links; tweak layout more.
  • Date: Tue, 23 Aug 2011 15:24:39 +0000

Revision: 514
Author:

Date: Tue Aug 23 08:23:47 2011
Log: Plumb in buttons, links; tweak layout more.
http://code.google.com/p/ndt/source/detail?r=514

Modified:
/branches/android/Android/res/layout/results.xml
/branches/android/Android/res/values/strings.xml
/branches/android/Android/src/net/measurementlab/ndt/InitialActivity.java
/branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java

=======================================
--- /branches/android/Android/res/layout/results.xml Tue Aug 23 07:29:06 2011
+++ /branches/android/Android/res/layout/results.xml Tue Aug 23 08:23:47 2011
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android";
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:id="@+id/VisibleResults">
- <LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent"
android:layout_height="wrap_content">
- <!-- header text -->
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content"
android:paddingTop="15sp"
- android:id="@+id/ResultsHeader"
android:text="@string/results_header"
- style="@style/NdtHeader" />
+ android:layout_height="fill_parent">
+ <!-- header text -->
+ <TextView android:layout_width="fill_parent"
+ android:layout_height="wrap_content" android:paddingTop="15sp"
+ android:id="@+id/ResultsHeader"
android:text="@string/results_header"
+ style="@style/NdtHeader" />
+ <RelativeLayout android:orientation="vertical"
+ android:layout_width="fill_parent"
android:layout_height="fill_parent">
<HorizontalScrollView android:orientation="horizontal"
- android:layout_width="fill_parent"
android:layout_height="fill_parent">
+ android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentTop="true">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<!-- summary results -->
@@ -82,24 +82,23 @@
</LinearLayout>
<!-- detailed results -->
<LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:id="@+id/DetailedResults">
+ android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="15sp"
- android:text="Details"
style="@style/NdtHeader" />
+ android:text="Details" style="@style/NdtHeader" android:id="@+id/DetailedResultsHeader" />
</LinearLayout>
<!-- advanced results -->
<LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:id="@+id/AdvancedResults">
+ android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="15sp"
- android:text="Advanced"
style="@style/NdtHeader" />
+ android:text="Advanced" style="@style/NdtHeader" android:id="@+id/AdvancedResultsHeader" />
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>
<RelativeLayout android:orientation="horizontal"
- android:layout_width="fill_parent"
android:layout_height="wrap_content">
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:padding="5sp"
android:layout_alignParentBottom="true">
<LinearLayout android:orientation="vertical"
android:layout_alignParentLeft="true" android:layout_width="wrap_content"
android:layout_height="wrap_content">
@@ -107,15 +106,16 @@
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/mlab_logo_small"
/>
<TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content"
android:paddingTop="15sp"
- android:text="@string/results_header"
style="@style/NdtHeader" />
+ android:layout_height="wrap_content"
android:id="@+id/MoreInfo"
+ android:text="@string/results_more_about" style="@style/NdtResultsMoreInfo"
+ android:padding="0sp" />
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:layout_alignParentRight="true" android:layout_width="wrap_content"
android:layout_height="wrap_content">
- <Button android:text="@string/start"
android:id="@+id/ButtonStart"
+ <Button android:text="@string/results_test_again" android:id="@+id/ButtonStart"
style="@style/NdtButton" />
</LinearLayout>
</RelativeLayout>
- </LinearLayout>
-</ScrollView>
+ </RelativeLayout>
+</LinearLayout>
=======================================
--- /branches/android/Android/res/values/strings.xml Tue Aug 16 13:12:16 2011
+++ /branches/android/Android/res/values/strings.xml Tue Aug 23 08:23:47 2011
@@ -52,4 +52,6 @@
<string name="results_latency">{0} msec round trip time</string>
<string name="results_jitter_label">Jitter:</string>
<string name="results_jitter">{0} msec</string>
+ <string name="results_more_about">More information about M-Lab</string>
+ <string name="results_test_again">Test Again</string>
</resources>
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/InitialActivity.java Tue Aug 16 09:54:15 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/InitialActivity.java Tue Aug 23 08:23:47 2011
@@ -5,6 +5,7 @@
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
+import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
@@ -39,6 +40,16 @@
TestsActivity.class);
startActivity(intent);
}
+ });
+
+ Button aboutButton = (Button) findViewById(R.id.ButtonAbout);
+ aboutButton.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://measurementlab.net";));
+ startActivity(intent);
+ }
});
}
}
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java Tue Aug 16 13:12:16 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java Tue Aug 23 08:23:47 2011
@@ -5,8 +5,13 @@
import java.util.Map;

import android.app.Activity;
+import android.content.Intent;
import android.graphics.Typeface;
+import android.net.Uri;
import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
import android.widget.TextView;

public class ResultsActivity extends Activity {
@@ -33,6 +38,40 @@
textView.setTypeface(typeFace);
textView = (TextView) findViewById(R.id.DownloadSpeedMbps);
textView.setTypeface(typeFace);
+
+ textView = (TextView)
findViewById(R.id.DetailedResultsHeader);
+ textView.setTypeface(typeFace);
+
+ textView = (TextView)
findViewById(R.id.AdvancedResultsHeader);
+ textView.setTypeface(typeFace);
+
+ textView = (TextView) findViewById(R.id.MoreInfo);
+ textView.setTypeface(typeFace);
+
+ OnClickListener aboutListener = new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://measurementlab.net";));
+ startActivity(intent);
+ }
+ };
+ View aboutView = findViewById(R.id.MoreInfo);
+ aboutView.setOnClickListener(aboutListener);
+ aboutView = findViewById(R.id.MLabLogo);
+ aboutView.setOnClickListener(aboutListener);
+
+
+ Button startButton = (Button) findViewById(R.id.ButtonStart);
+ startButton.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Intent intent = new
Intent(getApplicationContext(),
+ TestsActivity.class);
+ startActivity(intent);
+ }
+ });
}

@SuppressWarnings("unchecked")


  • [ndt-dev] [ndt] r514 committed - Plumb in buttons, links; tweak layout more., ndt, 08/23/2011

Archive powered by MHonArc 2.6.16.

Top of Page