diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2014-08-13 20:04:55 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2014-08-13 20:04:55 +0200 |
commit | e8011e447b981983a0dd5c2192851ae7cb1b9d16 (patch) | |
tree | 29e0a66452a50d2ae6487c0f11a00a8e2ace05f3 /main | |
parent | fc9b60674bdbd9d7ed2ce4eaa862ef58f3d312c5 (diff) | |
download | cgeo-e8011e447b981983a0dd5c2192851ae7cb1b9d16.zip cgeo-e8011e447b981983a0dd5c2192851ae7cb1b9d16.tar.gz cgeo-e8011e447b981983a0dd5c2192851ae7cb1b9d16.tar.bz2 |
new: invoke keyboard on log text field
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/AbstractLoggingActivity.java | 6 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/LogCacheActivity.java | 1 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/LogTrackableActivity.java | 12 |
3 files changed, 19 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/AbstractLoggingActivity.java b/main/src/cgeo/geocaching/AbstractLoggingActivity.java index 90fda53..4641d3a 100644 --- a/main/src/cgeo/geocaching/AbstractLoggingActivity.java +++ b/main/src/cgeo/geocaching/AbstractLoggingActivity.java @@ -2,6 +2,7 @@ package cgeo.geocaching; import cgeo.geocaching.activity.AbstractActionBarActivity; import cgeo.geocaching.activity.ActivityMixin; +import cgeo.geocaching.activity.Keyboard; import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.connector.gc.GCConnector; import cgeo.geocaching.connector.gc.GCSmiliesProvider; @@ -88,4 +89,9 @@ public abstract class AbstractLoggingActivity extends AbstractActionBarActivity enableSend = enabled; invalidateOptionsMenuCompatible(); } + + protected void requestKeyboardForLogging() { + new Keyboard(this).show(findViewById(R.id.log)); + } + } diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java index 83bbdf2..75d4c2c 100644 --- a/main/src/cgeo/geocaching/LogCacheActivity.java +++ b/main/src/cgeo/geocaching/LogCacheActivity.java @@ -286,6 +286,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia loggingManager = cache.getLoggingManager(this); loggingManager.init(); + requestKeyboardForLogging(); } private void initializeRatingBar(final RatingBar ratingBar) { diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java index cc3a6e6..5970210 100644 --- a/main/src/cgeo/geocaching/LogTrackableActivity.java +++ b/main/src/cgeo/geocaching/LogTrackableActivity.java @@ -3,6 +3,7 @@ package cgeo.geocaching; import butterknife.ButterKnife; import butterknife.InjectView; +import cgeo.geocaching.activity.Keyboard; import cgeo.geocaching.connector.gc.GCLogin; import cgeo.geocaching.connector.gc.GCParser; import cgeo.geocaching.enumerations.LogType; @@ -144,6 +145,17 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat } init(); + requestKeyboardForLogging(); + } + + @Override + protected void requestKeyboardForLogging() { + if (StringUtils.isBlank(trackingEditText.getText())) { + new Keyboard(this).show(trackingEditText); + } + else { + super.requestKeyboardForLogging(); + } } @Override |