I am using Arc.UserDialogs ActionSheet in my xamarin form app. But I am unable to attach a icons to the action sheet items. It asks a string value. I set image name but not working.
UserDialogs.Instance.ActionSheet(new ActionSheetConfig()
.SetTitle("Choose Type")
.Add("Default", null, "icon1.png")
.Add("E-Mail", null, "icon2.png")
);
I test your code in my VS, I can add/set icon to Arc.UserDialogs ActionSheet like the following screenshot.
You can put these picture in drawable folder in android
In IOS, 1. double-click the Assets folder like the following screenshot.
Then create Image(click the plus in the top-left), put the image in the 1x
This is my demo(I test it in android, it is normal).
https://github.com/851265601/ToolbarItemDemo
Related
I want to create a button in a googlesheet/google Apps Script that opens an existing google sheet in a new tab when u click on it. I will insert the button in a google sheet, so i basically just need a code that i link to the button.
The code below does not work somehow?
Can you help me?
function openURL(){
var button = CardService.newTextButton()
.setText("This button opens a link in an overlay window")
.setOpenLink(CardService.newOpenLink()
.setUrl("google sheet")
.setOpenAs(CardService.OpenAs.OVERLAY)
.setOnClose(CardService.OnClose.RELOAD_ADD_ON));
};
In order to create such button and functionality, you will have to:
Create the code that will be executed upon clicking it. Go to Tools>Script Editor. Paste the following code (replacing, of course, the url for the appropriate one):
function openMySpreadsheet() {
var url = 'YOUR_SHEET_URL';
var htmlTemplate = HtmlService.createTemplateFromFile('js');
htmlTemplate.url = url;
SpreadsheetApp.getUi().showModalDialog(htmlTemplate.evaluate().setHeight(10).setWidth(100), 'Opening Sheet...');
}
Still from the Google Apps Script IDE, go to File>New>HTML File. Set the file name to be js and paste the following code into it:
<script>
window.open('<?=url?>', '_blank', 'width=800, height=600');
google.script.host.close();
</script>
Go back to your Sheets document and insert an image using Insert>Image>Image over cells and select any image you would like to have as your button.
Select the newly created image and click on the 3 dots that appear on the top-right corner of it. Click on "Assign script", and put the function name to be run (in this case, openMySpreadsheet would work).
From now on, each time you click on the button, a short-lived dialog will be shown up (that is necessary in order to open a link on a new tab) and the link will be automatically open.
I have a .aar file component which has the below functions.
1) Open camera
2) Open gallery
3) Return a string which is given as input
4) Open a new view which displays the passed input string.
I have created an Android binding library for this and referenced in Xamarin Forms Android. I am able to perform the first three operations correctly. But when i call the fourth function, I am getting a dark colour background with actionbar containing projectName.Android text. This actually should show a white colour view with the passed input string as label.
The input params for this method is Context and string. I am passing the correct context because i am getting the correct output from the other three methods. Also when this same .aar library is binded in a native android app, it is showing all methods properly. Can anyone help me whether I am doing anything wrong?
I can share the .aar file/binding library dll/sample code, if required.
I got the answer. We need to add a JavaDocs folder at the Binding project and copy the JavaDoc files obtained while building the native component to this folder. Then need to add the index.html present in the folder and need to set the build action to JavaDocIndex. Now this binding needs to be build and refer to the android project which will display the view also while calling the method.
I`m developer blackberry and try create to new attribute under to contacts but not set knows determineattrib correctly.
Code:
ContactBuilder builder;
builder.addAttribute(ContactAttributeBuilder()
.setKind(AttributeKind::Name)
.setSubKind(AttributeSubKind::NameGiven)
.setValue("NAME_test"));
...
other attributes
...
builder.addAttribute(ContactAttributeBuilder()
.setKind(ContactAttributeBuilder::determineAttributeKind("Attr_test"))
.setSubKind(ContactAttributeBuilder::determineAttributeSubKind("SubAttr_test"))
.setValue("1234567890"));
...
With other default attribute no problem.
I found a example:
https://supportforums.blackberry.com/t5/Native-Development/Gmail-synchronization-removes-some-attributes-from-contacts/td-p/2676999
result:
http://i.stack.imgur.com/wzh3s.png
The problem is that not show the attributes ("Attr_test" and "SubAttr_Test")names in the contact.
¿How adding a icon, label and link for app on attribute from the application?
thanks !!!
A photo you add with:
ContactBuilder.addPhoto()
https://developer.blackberry.com/native/reference/cascades/bb__pim__contacts__contactbuilder.html#function-addphoto-photo-isprimary
A link to a website you could add with AttributeKind::Website.
https://developer.blackberry.com/native/reference/cascades/bb__pim__contacts__attributekind.html#enumvalue-website
I don't know what kind of label you want to add but you would have to use one of the AttributeKind::Type enum values to add a label.
I need to style the browse button of file upload in GWT.... I found the way through this link http://www.dreamincode.net/forums/topic/15621-styling-a-file-browse-button/. But I am not able to use the same in GWT. Any idea how to go about it?.
I am using GWT 2.4.0
I tried the following approach and it worked for me.
I hid the file upload field and used a trigger box on the screen instead. Trigger box click is delegated back to file upload browse button click using JSNI approach
private static native void fileClick (Element el) /*-{
el.click();
}*-/;
And used the fileupload.getfilename() and set the trigger text box with file location details.
I have created a facebook application for addding page tab in any facebook page.
Everything is working fine but i am not able to change the icon the tab i am adding.
I am using following code of php sdk
if($facebook->api($tabid, 'POST', array(
'custom_name' => $tabtitle,
'image_url'=>$newname,
'is_non_connection_landing_tab'=>1,
'access_token'=>$mpagetoken
))
Please tell me where i am wrong in this ?
There is no such field as image_url in page tabs.
Actually tab icon is the application icon which is icon_url field of application object, and while some of fields may be edited by issuing POST request to https://graph.facebook.com/APP_ID?PROPERTY_1=PROPERTY_VALUE this field isn't marked as editable:
Not all app properties can be edited via the API, please refer to the properties in the table above for an indication of whether a property can be edited or not.