collections {
BASE_SCALE;
+
+ styles {
+ style { name: "time_details_textblock_style";
+ base: "font=Tizen:style=Regular font_size="24" color=#b3b3b3 text_class=tizen align=center wrap=mixed";
+ tag: "match" "+ color=#ffffff";
+ }
+ style { name: "msg_details_textblock_style";
+ base: "font=Tizen:style=Regular font_size="32" color=#fafafa text_class=tizen align=center wrap=mixed";
+ tag: "match" "+ color=#ffffff";
+ }
+ }
+
group {
name: "elm/genlist/item/custom_title/default";
data.item: "contents" "swl.content";
parts{
- PADDING_TOP("pad.top", 37);
- PADDING_BOTTOM("pad.bottom", 7);
+ PADDING_TOP("pad.top", 51);
+ PADDING_BOTTOM("pad.bottom", 0);
swallow { "swl.content"; scale; nomouse;
desc { "default";
align: 0.5 1.0;
}
}
}
+
+ group { "elm/genlist/item/message_detail/default";
+ data.item: "texts" "elm.text elm.text.1";
+ parts {
+ PADDING_TOP("pad.top", 0);
+ PADDING_LEFT("pad.left", 33);
+ PADDING_RIGHT("pad.right", 33);
+ rect { name: "bg"; scale;
+ desc { "default";
+ rel1 {
+ relative: 1 1;
+ to_x: "pad.left";
+ to_y: "pad.top";
+ }
+ rel2 {
+ relative: 0 1;
+ to_x: "pad.right";
+ }
+ color: 0 0 0 0;
+ }
+ }
+ textblock { "elm.text"; scale; nomouse;
+ desc { "default";
+ rel.to: "bg";
+ align: 0.5 0;
+ min: 294 32;
+ max: 294 32;
+ text {
+ min: 0 1;
+ max: 0 1;
+ style: "time_details_textblock_style";
+ ellipsis: -1;
+ }
+ }
+ }
+ spacer { "pad.bottom.time"; scale;
+ desc { "default";
+ rel1.to: "elm.text";
+ rel1.relative: 0 1;
+ rel2.to: "elm.text";
+ rel2.relative: 1 1;
+ align: 0.5 0;
+ min: 0 19;
+ }
+ }
+ textblock { "elm.text.1"; scale;
+ desc { "default";
+ rel1.to_y: "pad.bottom.time";
+ rel1.to_x: "bg";
+ rel1.relative: 0 1;
+ rel2.to: "bg";
+ rel2.relative: 1 1;
+ align: 0.5 0;
+ text {
+ min: 0 1;
+ max: 0 1;
+ style: "msg_details_textblock_style";
+ align: 0.5 0;
+ }
+ }
+ }
+ }
+ }
}
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SettingsBlockedMsgDetailView_h_
+#define SettingsBlockedMsgDetailView_h_
+
+#include "ListItem.h"
+#include "LangUtils.h"
+
+namespace Msg {
+ class SettingsBlockedMsgDetailView
+ : public ListItem {
+ public:
+ SettingsBlockedMsgDetailView();
+ virtual ~SettingsBlockedMsgDetailView();
+
+ void setTime(std::string time);
+ void setMessage(std::string message);
+
+ private:
+ std::string getText(ListItem &item, const char *part) override;
+
+ private:
+ std::string m_Time;
+ std::string m_Message;
+ };
+}
+
+#endif // SettingsBlockedMsgDetailView_h_
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include "SettingsBlockedMsgDetailView.h"
+#include "TimeUtils.h"
+
+using namespace Msg;
+
+namespace {
+ const char *msgTime = "elm.text";
+ const char *msgText = "elm.text.1";
+}
+
+SettingsBlockedMsgDetailView::SettingsBlockedMsgDetailView()
+ : ListItem(ListItemStyle::create("message_detail"))
+{
+}
+
+SettingsBlockedMsgDetailView::~SettingsBlockedMsgDetailView()
+{
+}
+
+void SettingsBlockedMsgDetailView::setTime(std::string time)
+{
+ m_Time = std::move(time);
+}
+
+void SettingsBlockedMsgDetailView::setMessage(std::string message)
+{
+ m_Message = std::move(message);
+}
+
+std::string SettingsBlockedMsgDetailView::getText(ListItem &item, const char *part)
+{
+ if (!strcmp(part, msgTime))
+ return m_Time;
+ else if (!strcmp(part, msgText)) {
+ return m_Message;
+ }
+
+ return "";
+}
+