Skip to content

Commit

Permalink
Add vertical scroll support (#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
almedina-ms authored Jun 25, 2018
1 parent 3e833ed commit 91f66a6
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
import android.support.v4.app.FragmentManager;
import android.text.InputFilter;
import android.text.InputType;
import android.text.Spannable;
import android.text.TextUtils;
import android.text.method.MovementMethod;
import android.text.method.ScrollingMovementMethod;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Scroller;
import android.widget.TextView;

import io.adaptivecards.objectmodel.BaseInputElement;
import io.adaptivecards.objectmodel.ContainerStyle;
Expand Down Expand Up @@ -151,6 +158,9 @@ else if ((textInput = TextInput.dynamic_cast(baseCardElement)) == null)
if (textInput.GetIsMultiline())
{
editText.setLines(3);
editText.setScroller(new Scroller((context)));
editText.setVerticalScrollBarEnabled(true);
editText.setMovementMethod(new ScrollingMovementMethod());
}
setTextInputStyle(editText, textInput.GetTextInputStyle());
int maxLength = (int) Math.min(textInput.GetMaxLength(), Integer.MAX_VALUE);
Expand Down

0 comments on commit 91f66a6

Please sign in to comment.