left-align prompt text

This commit is contained in:
sonora 2016-05-30 21:39:31 +02:00
parent b03b42e8f6
commit 2755fe880a

View file

@ -9,6 +9,7 @@ import android.support.v7.app.AlertDialog;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Gravity;
import android.widget.Button; import android.widget.Button;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams; import android.widget.LinearLayout.LayoutParams;
@ -229,6 +230,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
public void addButton(ViewGroup layout, String description, final CommandBuilder builder){ public void addButton(ViewGroup layout, String description, final CommandBuilder builder){
Button button = new Button(this); Button button = new Button(this);
button.setGravity(Gravity.LEFT);
button.setText(description); button.setText(description);
button.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); button.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
button.setPadding(10, 5, 10, 2); button.setPadding(10, 5, 10, 2);