Beispiel #1
0
 public static void MakeTextViewResizable(
     TextView tv, int maxLines, bool isPartial, ISimpleExpandableTextViewListerner listerner)
 {
     tv.ViewTreeObserver.AddOnGlobalLayoutListener(
         new SimpleExpandableTextViewUtilty(
             tv, maxLines, isPartial, listerner));
 }
Beispiel #2
0
        //private readonly Android.Text.TextUtils.TruncateAt ellipsize;

        public SimpleExpandableTextViewUtilty(
            TextView tv, int maxLines, bool isPartial, ISimpleExpandableTextViewListerner listerner)
        {
            this.tv        = tv;
            this.maxLines  = maxLines;
            this.listerner = listerner;
            this.isPartial = isPartial;
            //ellipsize = Android.Text.TextUtils.TruncateAt.End;

            tv.Tag = this;
        }
Beispiel #3
0
        public static void MakeTextViewResizable(
            TextView tv, int maxLines, ISimpleExpandableTextViewListerner listerner,
            AutoLinkOptions autoLinkOptions, bool isPartial = true)
        {
            tv.Tag = new ExpandableTextViewTag()
            {
                Text                = tv.Text,
                MaxLines            = maxLines,
                ClickSwitch         = false,
                IsPartial           = isPartial,
                Listerner           = listerner,
                AutoLinkOptions     = autoLinkOptions,
                ViewMoreLessOptions = null,
            };

            init(tv);
        }