diff --git a/application/src/org/yaaic/activity/ConversationActivity.java b/application/src/org/yaaic/activity/ConversationActivity.java
index 10c8ff5..6a037d9 100644
--- a/application/src/org/yaaic/activity/ConversationActivity.java
+++ b/application/src/org/yaaic/activity/ConversationActivity.java
@@ -259,7 +259,7 @@ public class ConversationActivity extends Activity implements ServiceConnection,
button in that case */
setInputTypeFlags |= InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
} else {
- input.setImeOptions(input.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
+ input.setImeOptions(input.getImeOptions());
}
input.setInputType(input.getInputType() | setInputTypeFlags);
diff --git a/application/src/org/yaaic/view/ConversationLayout.java b/application/src/org/yaaic/view/ConversationLayout.java
index 6f9eae3..d1fc10e 100644
--- a/application/src/org/yaaic/view/ConversationLayout.java
+++ b/application/src/org/yaaic/view/ConversationLayout.java
@@ -20,6 +20,7 @@ along with Yaaic. If not, see .
*/
package org.yaaic.view;
+import org.yaaic.R;
import org.yaaic.model.Settings;
import android.app.Activity;
@@ -31,7 +32,9 @@ import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
+import android.widget.ImageView;
import android.widget.LinearLayout;
+import android.widget.TextView;
/**
* ConversationLayout: LinearLayout that resizes correctly when an IME
@@ -41,7 +44,9 @@ import android.widget.LinearLayout;
*/
public class ConversationLayout extends LinearLayout
{
- Activity activity;
+ private Activity activity;
+ private TextView title;
+ private ImageView status;
int curHeight = 0;
boolean fullscreen = false, isLandscape = false;
boolean redoLayout = false;
@@ -93,26 +98,38 @@ public class ConversationLayout extends LinearLayout
* onMeasure (ask the view how much space it wants)
* This is called when the window size changes, so we can hook into it to
* resize ourselves when the IME comes up
+ * @author Steven Luo
+ * @author Reynaldo Cortorreal
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- /* XXX: We should probably use some heuristic of how many pixels are
- available for deciding whether to scroll instead of resize, instead
- of refusing to resize in landscape */
- if (!fullscreen || isLandscape) {
- return;
- }
-
int height = getWindowHeight();
if (curHeight != height) {
curHeight = height;
+
+ status = (ImageView) findViewById(R.id.status);
+ title = (TextView) findViewById(R.id.title);
+ final float scale = getResources().getDisplayMetrics().density;
+ android.util.Log.d("CONVO height",String.valueOf(height)+", Scale: "+String.valueOf(height*scale));
+
+
+ //Give us at least an inch, or we'll have to make sacrifices.
+ if (height < 160*scale) {
+ status.setVisibility(GONE);
+ title.setVisibility(GONE);
+ } else if (status.getVisibility() == GONE || title.getVisibility() == GONE){
+ status.setVisibility(VISIBLE);
+ title.setVisibility(VISIBLE);
+ }
+
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.FILL_PARENT,
height
);
+
params.gravity = Gravity.BOTTOM | Gravity.CLIP_VERTICAL;
setLayoutParams(params);
redoLayout = true;