Is it possible to use the created like button on this website (https://likebtn.com/en/) in an app being developed in Smartface App Studio? - smartface.io

Is it possible to use the created like button on this website (https://likebtn.com/en/) in an app being developed in Smartface App Studio?
I've tried adding the like button onto a website and it was very successful.
Thankyou☺💻📱

It is possible with image button.You can create a button like that using following codes:
var myImgBtn = new SMF.UI.ImageButton({
left : '10%',
top : '10%',
width : '20%',
height : '10%',
defaultImage : 'likebutton.png',
highlightedImage : 'buttonhighlighted.png',
inactiveImage : 'buttoninactive.png',
text : 'Like',
onPressed : function(e){
...
}
});
Pages.Page1.add(myImgBtn);

Related

Flutter Razorpay not displaying image (logo) on checkout options

I am integrating Razorpay in Flutter, I have done all the things successfully but I am getting problem to show image (logo) on checkout dialog of Razorpay.
What I have done is:
var options = {
"key" : "rzp_test_123123123123",
"amount" : 100,
"name" : "Sample App",
"image" : "assets/logo.png",
"description" : "Payment for the some random product",
"prefill" : {
"contact" : "2323232323",
"email" : "shdjsdh#gmail.com"
},
"external" : {
"wallets" : ["paytm"]
}
};
try{
razorpay.open(options);
}catch(e){
print(e.toString());
}
The output that I am getting is:
Can anyone please tell me what will be the right string to give as a path in the image key?
I have pasted an image in the assets folder directly.
I tried hosting the image and then was able to load it.
"image" : "https://razorpay.com/assets/razorpay-glyph.svg"
I know this is a workaround but again if you wish to pass this image dynamically you won't be having this file saved in your app, rather would need to load it dynamically from a URL.
In case you wish to set up a fixed logo, u can do the same logging into razorpay.com -> setting -> Configurations.

How do i open a media source in sapui5?

I have a sap gateway service which returns a filestream from type /iwbep/cl_mgw_abs_data=>ty_s_media_resource
my question is: how do i open this in sapui5?
so in sapui5 i have a list with listitems. those listitems have to open the filestream(pdf) when clicked on.
I agree with #Krisho
OPTION 1.- open the URL in a separte tab. Something like this.
<Button text="Open PDF" press="onPress"></Button>
onPress: function(oEvent){
sap.m.URLHelper.redirect("https://sapui5.hana.ondemand.com/docs/maintenancestrategy.pdf", true)
}
Here a snippet: https://jsbin.com/xowocipuye/edit?html,output
OPTION 2 - Create a iFrame
Something like this:
createContent : function(oController) {
var html = new sap.ui.core.HTML();
html.setContent("<div id=\"divPdf\"><iframe id='pdfFrame' style=\"height:1000px;\"></iframe>");
return new sap.m.Page({
title : "PDF View",
showNavButton : true,
navButtonPress : oController.fnGoback,
content : [ html ],
footer : new sap.m.Bar({
})
});
}
I picked this last snippet from this old post:
https://blogs.sap.com/2014/02/20/sapui5-pdf-display/
The OData URL giving you the PDF will be looking like this.
/sap/opu/odata/......./$value
You have two options.
Upon selecting the item, open the corresponding URL in a new Tab.
New tab will automatically render the PDF
Create a UI5 view which
contains an iframe (using UI5 html control) and render the above URL
inside the iframe.

Change SliderDrawer Icon

whats I need to do to change the icon on top left? (SmartFaceIcon)
SliderDrawerIcon
You should use dynamic slider drawer for the first page and you can define it in Global.Smartface.js, such as :
var mySliderDrawer = new SMF.UI.SliderDrawer({
position : SMF.UI.SliderDrawerPosition.left,
icon : "myicon.png"
});
Pages.Page1.add(mySliderDrawer);
For other pages, you can use both dynamic or static and change the icon simply before you show the page. If you use static, you can change its icon as below :
Pages.Page2.SliderDrawer1.icon = "myicon.png";
Pages.Page2.show();
Be sure you set your icon(myicon) in the resource folder.

closethick button disappear liferay popup 6.2

I am migrating the AUI popup dialog window from liferay 6.1 to liferay 6.2. I see that there are some specific changes to be made. I had some problems with display of buttons but it is resolved now. But the problem is with the close icon (x) which should be on the top right corner. It disappeared suddenly as soon as I added a save button.
Here is my code:
myPopup = AUI().use('aui-base','liferay-util-window','aui-io-deprecated', 'event', 'event-custom', function(A) {
var buttons =[{
cssClass: 'button_close',
label: 'Save',
render:true,
id: 'myPopupButton',
on: {
click: function() {
myPopupSubmit();
}}
}];
myPopup = Liferay.Util.Window.getWindow(
{
dialog: {
title : a + ' mytitle',
centered : true,
height : 600,
width : 500,
draggable : true,
resizable : true,
modal : true,
toolbars: {
footer:buttons
},
}}).plug(A.Plugin.IO, {
uri : url
}).render();
myPopup.show();
});
}
Please let me know if you have any idea on it..
on myPopupSubmit I have also written code to close the popup as:
top.document.getElementById('closethick').click();
Since there is no closethick button it returns null.
Using the modal dialog example as a comparison, the X close button is removed when using the toolbars property.
Reviewing the source code for the toolbars property (line 309 at time of writing this) indicates that if you use this property directly, you'll need to include your own X close in the header.
An alternative would be to use the addToolbar function (as seen in the example) to include your buttons while preserving the default toolbars.
modal.addToolbar([{
cssClass: 'button_close',
label: 'Save',
render:true,
id: 'myPopupButton',
on: {
click: function() {
myPopupSubmit();
}
}
}]);
I would also consider making the instance of the dialog available to your myPopupSubmit function so that you would have direct access to perform dialog.hide() or calling dialog.hide() after myPopupSubmit versus using the X close approach.
If sticking with the current approach, the id being used will not work, you'll need to use a CSS selector as the YUI based id will change.

SAPUI5-How to create custom Split Page control

I want to create a custom split -like page control.This page should contain two areas left and right content with different width.How to create this type of page as a custom control?
Please help me with this.
Use a Splitter: https://openui5.netweaver.ondemand.com/#test-resources/sap/ui/commons/demokit/Splitter.html
the relevant parameters for you are:
new sap.ui.commons.Splitter("splitterId", {
splitterOrientation : sap.ui.commons.Orientation.Vertical,
splitterPosition : "50%",
minSizeFirstPane : "0%",
minSizeSecondPane : "0%",
firstPaneContent : yourLeftContents,
secondPaneContent : yourRightContents
})