private void setupContent(LinearLayout contentPanel) { mScrollView = (ScrollView) mWindow.findViewById(R.id.scrollView); mScrollView.setFocusable(false); // Special case for users that only want to display a String mMessageView = (TextView) mWindow.findViewById(R.id.message); if (mMessageView == null) { return; } if (mMessage != null) { mMessageView.setText(mMessage); } else { mMessageView.setVisibility(View.GONE); mScrollView.removeView(mMessageView); if (mListView != null) { contentPanel.removeView(mWindow.findViewById(R.id.scrollView)); contentPanel.addView(mListView, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)); contentPanel.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 0, 1.0f)); } else { contentPanel.setVisibility(View.GONE); } } }
@Override public void remove(AndroidViewComponent component) { if (resourceId != -1) { ((android.widget.ScrollView) ((Form) context).findViewById(resourceId)) .removeView(component.getView()); } else { layoutManager.removeView(component.getView()); } }
public void reset() { Log.d(TAG, "Resetting animation."); mCancelled = true; if (mAnimation1StartRunnable != null) { removeCallbacks(mAnimation1StartRunnable); } mTextField1.clearAnimation(); prepareTextFields(); mMoveText1TextOut.reset(); mMoveText1TextIn.reset(); mScrollView1.removeView(mTextField1); mScrollView1.addView(mTextField1); mTextField1.setEllipsize(TextUtils.TruncateAt.END); invalidate(); }