Fix small issues. Test voice activity
This commit is contained in:
parent
0fd1b15b74
commit
3b315c36ce
7 changed files with 21 additions and 17 deletions
|
@ -1,12 +1,12 @@
|
|||
<?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
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
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>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"
|
||||
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/Cancel" android:text="@string/navigate_point_cancel"></Button>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -1,13 +1,11 @@
|
|||
<?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
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
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>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
@ -24,11 +22,12 @@
|
|||
</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>
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
|
||||
<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_toRightOf="@id/ShowOnMap"
|
||||
android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel" > </Button>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -1,6 +1,7 @@
|
|||
<?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
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:orientation="vertical">
|
||||
|
||||
|
@ -9,7 +10,7 @@
|
|||
android:layout_marginTop = "5dp" android:text="@string/search_address_top_text">
|
||||
</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">
|
||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
||||
<TextView android:id="@+id/TextView" android:text="@string/search_address_region">
|
||||
|
@ -52,7 +53,7 @@
|
|||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
|
@ -72,5 +73,5 @@
|
|||
</Button>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -1043,7 +1043,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
// dlg.showDialog();
|
||||
Intent newIntent = new Intent(MapActivity.this, SearchActivity.class);
|
||||
newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
newIntent.putExtra(SearchActivity.TAB_INDEX_EXTRA, SearchActivity.LOCATION_TAB_INDEX);
|
||||
LatLon mapLoc = getMapLocation();
|
||||
newIntent.putExtra(SearchActivity.SEARCH_LAT, mapLoc.getLatitude());
|
||||
newIntent.putExtra(SearchActivity.SEARCH_LON, mapLoc.getLongitude());
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TestVoiceActivity extends Activity {
|
|||
|
||||
// add buttons
|
||||
setContentView(gl);
|
||||
app.showDialogInitializingCommandPlayer(this, true, new Runnable(){
|
||||
Runnable r = new Runnable(){
|
||||
|
||||
@Override
|
||||
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) {
|
||||
|
|
|
@ -115,7 +115,6 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
|
|||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
setContentView(R.layout.searchpoi);
|
||||
|
||||
uiHandler = new Handler();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
// playing media
|
||||
private MediaPlayer mediaPlayer;
|
||||
// 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>());
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue