Skip to content

Commit

Permalink
Fix keyboard pop-up so it doesnt unless tapped.
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy Charlton committed May 4, 2010
1 parent 3526686 commit 13aabd8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.sfcta.cycletracks"
android:versionCode="7" android:versionName="1.02">
android:versionCode="8" android:versionName="1.03">
<application android:label="@string/app_name" android:debuggable="false" android:icon="@drawable/icon72">
<activity android:label="@string/app_name" android:name=".MainInput" android:launchMode="singleTask">
<intent-filter>
Expand Down
2 changes: 1 addition & 1 deletion res/layout/save.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
android:inputType="textShortMessage" android:hint="Comments about your trip"
android:layout_marginRight="2sp" android:layout_marginLeft="2sp"
android:nextFocusDown="@+id/ButtonSubmit" android:nextFocusRight="@+id/ButtonSubmit"
android:nextFocusUp="@+id/ToggleSocial"></EditText>
android:nextFocusUp="@+id/ToggleSocial" android:imeOptions="actionDone"></EditText>
<Button android:layout_height="wrap_content"
android:layout_marginTop="5sp" android:layout_width="fill_parent"
android:textStyle="bold" android:textSize="18sp"
Expand Down
4 changes: 4 additions & 0 deletions src/org/sfcta/cycletracks/SaveTrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.os.IBinder;
import android.text.Html;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CompoundButton;
Expand Down Expand Up @@ -134,6 +135,9 @@ public void onClick(View v) {
// Submit btn
final Button btnSubmit = (Button) findViewById(R.id.ButtonSubmit);
btnSubmit.setEnabled(false);

// Don't pop up the soft keyboard until user clicks!
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}

// submit btn is only activated after the service.finishedRecording() is completed.
Expand Down
4 changes: 4 additions & 0 deletions src/org/sfcta/cycletracks/UserInfoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
Expand All @@ -42,6 +43,9 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.userprefs);

// Don't pop up the soft keyboard until user clicks!
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

SeekBar sb = (SeekBar) findViewById(R.id.SeekCycleFreq);
sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

Expand Down

0 comments on commit 13aabd8

Please sign in to comment.