聊天气球-iOS-Android
我正在开发一个聊天风格的应用程序。我不能使气球根据文字的大小而变大或变小 有人知道我该怎么做吗?我目前的代码如下:聊天气球-iOS-Android,android,ios,appcelerator,appcelerator-titanium,Android,Ios,Appcelerator,Appcelerator Titanium,我正在开发一个聊天风格的应用程序。我不能使气球根据文字的大小而变大或变小 有人知道我该怎么做吗?我目前的代码如下: var scrollTxtResp = Ti.UI.createScrollView({ contentWidth: 'auto', contentHeight: 'auto', layout: 'vertical', showVerticalScrollIndicator: true, showHorizontalScrollIndicator: false,
var scrollTxtResp = Ti.UI.createScrollView({
contentWidth: 'auto',
contentHeight: 'auto',
layout: 'vertical',
showVerticalScrollIndicator: true,
showHorizontalScrollIndicator: false,
top:0,
height: '100%',
width: '100%'
});
view.add(scrollTxtResp);
var lblTexto = Titanium.UI.createLabel({
left: 2,
width: '98%',
height: 'auto',
textAlign: Titanium.UI.TEXT_ALIGNMENT_LEFT,
text: Dec(json[pos].content),
color: clr_aux5,
font: { fontFamily: font_primaria, fontSize: 15 }
});
scrollTxtResp.add(lblTexto);
我正在使用SDK 5.2.2 GA(iOS/Android)的经典开发
提前感谢。在
您正在寻找的9个补丁图像。在
您正在寻找的9个补丁图像。还有两个模块将创建气泡视图:
- iOS:
- 安卓:
var TiBubble = require('be.k0suke.tibubble');
var bubble = TiBubble.createView({
top: 0,
left: 10,
width: Ti.UI.SIZE, // just fit from contained label
height: Ti.UI.SIZE, // just fit from contained label
bubbleColor: '#dfdee5', // default: #fff
bubbleRadius: 20, // default: 20
bubbleBeak: TiBubble.BUBBLE_BEAK_LEFT // default BUBBLE_BEAK_LEFT
bubbleBeakVertical: TiBubble.BUBBLE_BEAK_UPPER // default BUBBLE_BEAK_LOWER
});
bubble.add(label);
还有两个模块将创建气泡视图:
- iOS:
- 安卓:
var TiBubble = require('be.k0suke.tibubble');
var bubble = TiBubble.createView({
top: 0,
left: 10,
width: Ti.UI.SIZE, // just fit from contained label
height: Ti.UI.SIZE, // just fit from contained label
bubbleColor: '#dfdee5', // default: #fff
bubbleRadius: 20, // default: 20
bubbleBeak: TiBubble.BUBBLE_BEAK_LEFT // default BUBBLE_BEAK_LEFT
bubbleBeakVertical: TiBubble.BUBBLE_BEAK_UPPER // default BUBBLE_BEAK_LOWER
});
bubble.add(label);