Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Trailing white space on each line of a multiline label

$
0
0

Hi everyone! This is my first post and I tried to find the answer elsewhere but to no avail. My current solution and screenshot :

var message = Ti.UI.createLabel({
        top                     : 11,
        right                   : 16,
        text                    : message.Text,
        color                   : '#000',
        backgroundImage         : '/images/chat/messageBackground.png',
        backgroundLeftCap       : 10,
        backgroundPaddingLeft   : 6,
        backgroundPaddingRight  : 6,
        backgroundTopCap        : 10  ,
        backgroundPaddingTop    : 3,
        backgroundPaddingBottom : 5,
        font                    : {
            fontSize    : 15
        }
    });
![iOS Screenshot](http://i.imgur.com/7NiGZWt.png "iOS Screenshot")

Single line labels do not cause problems. The moment the label text is word wrapped, i get white space at the end which I want to remove. Similar to Messages app on iOS.

The Catch : I just want to use a stretchable image as the label background. No other views for padding or enclosing the label. (Already done)

Other Info : 1. Application Type : iOS & Android\n 2. Titanium/Appcelerator SDK : 4.1.0GA\n 3. Platform Versions : - iOS 8.4 - Android API Level 19 4. Device : Simulator(iOS as well as Genymotion for Android). Also tested on device. No changes whatsoever\n 5. Host Operating System : Mac OS X 10.10.4 6. Appcelerator Studio Version : Appcelerator Studio, build: 4.1.1.201507141126


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>