<Apps>
<ApiVersion>3.0</ApiVersion>
<Privileges>
- <Privilege>http://tizen.org/privilege/nfc.common</Privilege>
- <Privilege>http://tizen.org/privilege/nfc.p2p</Privilege>
- <Privilege>http://tizen.org/privilege/systeminfo</Privilege>
- <Privilege>http://tizen.org/privilege/inputmanager</Privilege>
- </Privileges>
+ <Privilege>http://tizen.org/privilege/nfc.common</Privilege>
+ <Privilege>http://tizen.org/privilege/nfc.p2p</Privilege>
+ <Privilege>http://tizen.org/privilege/systeminfo</Privilege>
+ <Privilege>http://tizen.org/privilege/inputmanager</Privilege>
+ </Privileges>
<UiApp ExecutableName="nfc-push-ui-app-control" Default="True" MainmenuVisible="True" MenuIconVisible="False">
<UiScalability CoordinateSystem="Logical" BaseScreenSize="Normal" LogicalCoordinate="720"></UiScalability>
<UiTheme SystemTheme="White"></UiTheme>
<Icons>
<Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
</Icons>
- <AppControls>
- <AppControl Category="osp.appcontrol.category.none" ProviderId="http://tizen.org/appcontrol/provider/nfcpushui">
- <Capability OperationId="http://tizen.org/appcontrol/operation/nfc/animation/show">
- </Capability>
- </AppControl>
- </AppControls>
<LaunchConditions></LaunchConditions>
<Notifications></Notifications>
</UiApp>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">انقر للإرسال</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Göndəmək üçün vurun</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Чукнете, за да изпратите</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tocar per enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Klepnutím odešlete</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tap for at sende</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Zum Senden tippen</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Πατήστε για την αποστολή</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tap to send</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tap to send</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tap to send</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Toksake, et saata</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Ukitu bidaltzeko</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Lähetä napauttamalla</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Touchez pour envoyer</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Appuyez pour envoyer</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tapáil le seoladh</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tocar para enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">भेजने के लिए टैप करें</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Dotaknite za slanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Érintse meg a küldéshez</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Թակեք ուղարկելու համար</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Pikkaðu til að senda</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tocca per inviare</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">タップして送信します。</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">შეეხეთ და გაგზავნეთ</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Жіберу үшін түртіңіз</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">전송하려면 누르세요</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Pieskarieties, lai sūtītu</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Bakstelėkite ir išsiųskite žinutę</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Допрете за праќање</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tik om te verzenden</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Trykk for å sende</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Dotknij, aby wysłać</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Toque para enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tocar para enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Atingeţi pentru a trimite</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Нажмите для отправки</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Ťuknutím vykonáte odoslanie</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Pritisnite za pošiljanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Toque para enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Pulsar enviar</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Kucni za slanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Tryck för att skicka</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Göndermek için dokunun</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Натисніть щоб відправити</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">Yuborish uchun cherting</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">轻敲以发送</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">輕觸以發送</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">轻敲以发送</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201304241223" Dversion="20120315">
+ <text id="IDS_NFC_BODY_TAP_TO_SEND">輕觸以發送</text>
+</string_table>
result
NfcPushUiForm::DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect)
{
- result r = E_SUCCESS;
- const int textAreaWidth = rect.width;
+ result r = E_SUCCESS;
+ const int textAreaWidth = rect.width;
std::unique_ptr<EnrichedText> pEnrichedText(new (std::nothrow) EnrichedText());
SysTryReturnResult(NID_NET_NFC, pEnrichedText != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
std::unique_ptr<TextElement> pTextElement(new (std::nothrow) TextElement());
SysTryReturnResult(NID_NET_NFC, pTextElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
- r = pEnrichedText->Construct(Dimension(textAreaWidth, 200));
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an enriched text.");
+ r = pEnrichedText->Construct(Dimension(textAreaWidth, 200));
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an enriched text.");
- pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
- pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
- pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
- pEnrichedText->SetTextAbbreviationEnabled(true);
+ pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+ pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+ pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
+ pEnrichedText->SetTextAbbreviationEnabled(true);
- // Creates a TextElement and sets attributes
- r = pTextElement->Construct(__description);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct a text element.");
+ // Creates a TextElement and sets attributes
+ r = pTextElement->Construct(__description);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct a text element.");
- pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
- {
- Font font;
- font.Construct(FONT_STYLE_BOLD, 40);
- pTextElement->SetFont(font);
- }
+ pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
+ {
+ Font font;
+ font.Construct(FONT_STYLE_BOLD, 40);
+ pTextElement->SetFont(font);
+ }
- // Adds the TextElement and the bitmap to the EnrichedText
- pEnrichedText->Add(*pTextElement);
+ // Adds the TextElement and the bitmap to the EnrichedText
+ pEnrichedText->Add(*pTextElement);
// canvas
std::unique_ptr<Canvas> pCanvas(GetCanvasN());
// Draws the EnrichedText at the specified Point
pCanvas->DrawText(Point(0, (rect.height / 2) + 100), *pEnrichedText);
- return r;
+ return r;
}
result
NfcPushUiForm::DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect)
{
- result r = E_SUCCESS;
- const int textAreaWidth = rect.width;
+ result r = E_SUCCESS;
+ const int textAreaWidth = rect.width;
+ String sendNotiStr(L"Tap to send");
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+
+ if (pAppResource)
+ {
+ pAppResource->GetString(L"IDS_NFC_BODY_TAP_TO_SEND", sendNotiStr);
+ }
std::unique_ptr<EnrichedText> pEnrichedText(new (std::nothrow) EnrichedText());
SysTryReturnResult(NID_NET_NFC, pEnrichedText != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
std::unique_ptr<TextElement> pTextElement(new (std::nothrow) TextElement());
SysTryReturnResult(NID_NET_NFC, pTextElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
- r = pEnrichedText->Construct(Dimension(textAreaWidth, 100));
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an enriched text.");
+ r = pEnrichedText->Construct(Dimension(textAreaWidth, 100));
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an enriched text.");
- r = pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set horizontal alignment.");
+ r = pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set horizontal alignment.");
- pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set vertical alignment.");
+ pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set vertical alignment.");
- pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set text wrap style.");
+ pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set text wrap style.");
- pEnrichedText->SetTextAbbreviationEnabled(true);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set abbreviation enabled.");
+ pEnrichedText->SetTextAbbreviationEnabled(true);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to set abbreviation enabled.");
- // Creates a TextElement and sets attributes
- r = pTextElement->Construct(L"Tap to send");
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct a text element.");
+ // Creates a TextElement and sets attributes
+ r = pTextElement->Construct(sendNotiStr);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct a text element.");
pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
- {
- Font font;
- font.Construct(FONT_STYLE_BOLD, 40);
- pTextElement->SetFont(font);
- }
+ {
+ Font font;
+ font.Construct(FONT_STYLE_BOLD, 40);
+ pTextElement->SetFont(font);
+ }
- // Adds the TextElement and the bitmap to the EnrichedText
- r = pEnrichedText->Add(*pTextElement);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to add text element to enriched text.");
+ // Adds the TextElement and the bitmap to the EnrichedText
+ r = pEnrichedText->Add(*pTextElement);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to add text element to enriched text.");
// canvas
std::unique_ptr<Canvas> pCanvas(GetCanvasN());
// Draws the EnrichedText at the specified Point
r = pCanvas->DrawText(Point((rect.width - textAreaWidth) / 2, (int)(rect.height / 4)), *pEnrichedText);
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw text to canvas.");
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw text to canvas.");
- return r;
+ return r;
}
void