TextFit : modified it to work even if you change the text or multi-line attributes.
// text fit test
Property::Map backgroundMap;
backgroundMap["color"] = Color::RED;
backgroundMap["enable"] = true;
Property::Map textFitMap;
textFitMap["enable"] = true;
textFitMap["minSize"] = 10.f;
textFitMap["maxSize"] = 100.f;
textFitMap["stepSize"] = 1.f;
textFitMap["fontSizeType"] = "pointSize";
textFit = TextLabel::New( "This is a Text Fit sample text " );
textFit.SetSize( 750, 100 );
textFit.SetParentOrigin(ParentOrigin::TOP_LEFT);
textFit.SetAnchorPoint(AnchorPoint::TOP_LEFT);
textFit.SetPosition( 100.f, 100.f);
textFit.SetProperty( Toolkit::DevelTextLabel::Property::TEXT_FIT, textFitMap );
textFit.SetProperty( Toolkit::DevelTextLabel::Property::BACKGROUND, backgroundMap );
stage.Add( textFit );
stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTextFitTouch );
bool OnTextFitTouch( Actor actor, const TouchData& touch )
{
textFit.SetProperty( TextLabel::Property::TEXT, "Long enough message for TextLabel!! ");
textFit.SetProperty( TextLabel::Property::MULTI_LINE, true );
return true;
}
Change-Id: I81927d70db58211892fc98592eadfccf5a69d374