Fix small issues. Test voice activity

This commit is contained in:
Victor Shcherb 2011-10-06 22:55:53 +02:00
parent 0fd1b15b74
commit 3b315c36ce
7 changed files with 21 additions and 17 deletions

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical"> android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:textSize="16sp" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView> <TextView android:textSize="16sp" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1">
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1"> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:layout_width="fill_parent" > <TableRow android:layout_width="fill_parent" >
@ -26,10 +26,11 @@
<TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView> <TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
</TableLayout> </TableLayout>
</ScrollView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" <LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"
android:gravity="center"> android:gravity="center">
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button> <Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button>
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel"></Button> <Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel"></Button>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView>

View file

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" >
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical"> android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:id="@+id/TextView" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:text="@string/navigate_point_top_text"></TextView> <TextView android:id="@+id/TextView" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:text="@string/navigate_point_top_text"></TextView>
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1">
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1"> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:layout_width="fill_parent" > <TableRow android:layout_width="fill_parent" >
<TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView> <TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
@ -24,11 +22,12 @@
</RadioGroup> </RadioGroup>
<TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView> <TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
</TableLayout> </TableLayout>
</ScrollView>
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center">
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button> <Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button>
<Button android:layout_width="125dp" android:layout_toRightOf="@id/ShowOnMap" <Button android:layout_width="125dp" android:layout_toRightOf="@id/ShowOnMap"
android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel" > </Button> android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel" > </Button>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical"> android:layout_height="fill_parent" android:orientation="vertical">
@ -9,7 +10,7 @@
android:layout_marginTop = "5dp" android:text="@string/search_address_top_text"> android:layout_marginTop = "5dp" android:text="@string/search_address_top_text">
</TextView> </TextView>
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1">
<TableLayout android:id="@+id/TableLayout" android:stretchColumns="1" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableLayout android:id="@+id/TableLayout" android:stretchColumns="1" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp"> <TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
<TextView android:id="@+id/TextView" android:text="@string/search_address_region"> <TextView android:id="@+id/TextView" android:text="@string/search_address_region">
@ -52,7 +53,7 @@
</TableRow> </TableRow>
</TableLayout> </TableLayout>
</ScrollView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" <LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content"
@ -72,5 +73,5 @@
</Button> </Button>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</LinearLayout> </ScrollView>

View file

@ -1043,7 +1043,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
// dlg.showDialog(); // dlg.showDialog();
Intent newIntent = new Intent(MapActivity.this, SearchActivity.class); Intent newIntent = new Intent(MapActivity.this, SearchActivity.class);
newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
newIntent.putExtra(SearchActivity.TAB_INDEX_EXTRA, SearchActivity.LOCATION_TAB_INDEX);
LatLon mapLoc = getMapLocation(); LatLon mapLoc = getMapLocation();
newIntent.putExtra(SearchActivity.SEARCH_LAT, mapLoc.getLatitude()); newIntent.putExtra(SearchActivity.SEARCH_LAT, mapLoc.getLatitude());
newIntent.putExtra(SearchActivity.SEARCH_LON, mapLoc.getLongitude()); newIntent.putExtra(SearchActivity.SEARCH_LON, mapLoc.getLongitude());

View file

@ -53,7 +53,7 @@ public class TestVoiceActivity extends Activity {
// add buttons // add buttons
setContentView(gl); setContentView(gl);
app.showDialogInitializingCommandPlayer(this, true, new Runnable(){ Runnable r = new Runnable(){
@Override @Override
public void run() { public void run() {
@ -65,7 +65,12 @@ public class TestVoiceActivity extends Activity {
} }
} }
}); };
if (app.getRoutingHelper().getVoiceRouter().getPlayer() != null) {
r.run();
} else {
app.showDialogInitializingCommandPlayer(this, true, r);
}
} }
private void addButtons(final LinearLayout ll, CommandPlayer p) { private void addButtons(final LinearLayout ll, CommandPlayer p) {

View file

@ -115,7 +115,6 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
@Override @Override
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
super.onCreate(icicle); super.onCreate(icicle);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.searchpoi); setContentView(R.layout.searchpoi);
uiHandler = new Handler(); uiHandler = new Handler();

View file

@ -28,7 +28,7 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer {
// playing media // playing media
private MediaPlayer mediaPlayer; private MediaPlayer mediaPlayer;
// indicates that player is ready to play first file // indicates that player is ready to play first file
private boolean playNext = true; private volatile boolean playNext = true;
private List<String> filesToPlay = Collections.synchronizedList(new ArrayList<String>()); private List<String> filesToPlay = Collections.synchronizedList(new ArrayList<String>());