Smartface Android Header Logo - smartface.io

Can I change this logo to show slider on android? I tried
this.actionbar.logo = "img_source";
in HeaderBar script page, but it didn't change.

Correct property is icon ;
this.actionBar.icon = 'img_source';
You can read more about actionBar from http://www.smartface.io/developer/guides/controls/actionbar/

Related

Custom Icon for Gnome Shell Extension in Top Panel not visible

I try to use a custom SVG for my GNOME shell extension as status icon in top panel. But the custom icon is never shown, just the widget's label text. And I find no error in log output.
When I try to set a build-in icon like "system-search-symbolic" it works, this icon is shown.
This is my code snippet (the SVG is in an "icons" directory of my extension: /home/myusername/.local/share/gnome-shell/extensions/my-widget#my-widgets/icons/timeclock-16x16.svg):
// ...
let widgetBoxLayout = new St.BoxLayout();
let iconPath = `${Me.path}/icons/timeclock-16x16.svg`;
// just for debug if path is correct
log(`${Me.metadata.name}: Icon path=${iconPath}`);
let gicon = Gio.icon_new_for_string(`${iconPath}`);
let icon = new St.Icon({ gicon: gicon, style_class: 'system-status-icon', icon_size: 16 });
// this works for build-in icon:
//let icon = new St.Icon({ icon_name: 'system-search-symbolic', style_class: 'system-status-icon'});
widgetBoxLayout.add(icon);
widgetBoxLayout.add(this.widgetText);
//...
Maybe it's a problem that there is an "#" char in icon path?
But why no error is logged?
What is the correct code to use a custom icon for status panel?
(I have GNOME Shell 3.30.2)
Oh no! This one of these "fight for weeks alone, finally ask the crowd, suddenly know the solution yourself" cases ...
The icon was actually visible but since I use a dark theme and the icon itself is also dark it was not "visible". I inverted the colors of this icon and now I can see the icon next to my text in top panel.
Now I have to find out which icon to use depending on user's theme, but the original issue is solved.
Maybe this answer helps other developer making same stupid error.
You need to use -symbolic icons to allow automatic theme aware re-colorization of the icons. Just change the file name of the icon to timeclock-symbolic.svg, at least this should be your first step if every other aspect is fine.

Xamarin.Forms NavigationPage and screen rotation

I started Xamarin.Forms and it is great with MVVM pattern.
As main page I use NavigationPage and navigate with PushAsync and PopAsync brteen different pages. This works great if the phone stays in the same orientation. If I rotate screen, Xamarin shows always the first page after rotation.
How can I prevent this? I want to support the screen rotation and don't loose the navigation stack after rotation.
This is possible when running Android. Make sure that your MainActivity class has the ConfigurationChanges attributes. Here is an example:
[Activity(Label = "MYProject.Droid", Icon = "#drawable/icon", Theme = "#style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]

UWP - How to show TimePicker / DatePicker in Open format on Page Load

I am developing UWP (Win10 - VS2015) app. when the app runs, the timepicker/datepicker is always in this format, See Img (1), and when we tap on the img(1) control then it shows/popup the img(2) flyout, but I need to show the full page flyout mode (like img(2)) on Page Load, rather than tap on the img(1).
I checked the Style and Template of Timepicker but didn't find anything. Plz help.
OR how can we get the custom timepicker control same like the iPad one.
See the img Link here
As a workaround i found below solution. Hope it helps.
Attach TimePickerFlyout to TimePicker.It has got Placement property. There you can specify Full mode.
<TimePicker x:Name="TestTimePicker" ClockIdentifier="24HourClock" Time="0" >
<FlyoutBase.AttachedFlyout>
<TimePickerFlyout Placement="Full" TimePicked="TimePickerFlyout_TimePicked"/>
</FlyoutBase.AttachedFlyout>
</TimePicker>
On page load showthe flyout. DOnt forget to call UpdateLayout of page or else Flyout wont be closed when you tap on Accept button.
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
FlyoutBase.ShowAttachedFlyout(TestTimePicker);
UpdateLayout();
}
In TimePicked event assign selected time to TimePicker
private void TimePickerFlyout_TimePicked(TimePickerFlyout sender, TimePickedEventArgs args)
{
TestTimePicker.Time = sender.Time;
}
Here is the screenshoot. If you want to increase the width and height you can edit the style of TimePickerFlyoutPresenter
You can also use TimePicker from Syncfusion
Or you can try to edit style for standart UWP TimePicker. It's located in file generic.xaml which should be inside folder like
C:\Program Files\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.10240.0\Generic
You can serch for TimePicker or TimePickerFlyoutPresenter

Change backgroundImage of right Nav button in Titanium - iPhone

I am developing an iPhone app using Titanium Alloy.
My problem is that I would like to change the backgroundImage of rightNav button.
I am using the rightNav button as a Filter button. My Filter button is placed in a window which also has a table. Once the filter button is clicked a new window is opened where the user can make some selections. Once the selection is made, the table on the previous page is refreshed based on the selections made and I would like to change the backgroundImage of the rightNav button to show that some selections have been applied. But I am unable to do so.
My code :
if ((screenType === "parentWindow") {
$.rightNav.visible = true;
$.rightNav.backgroundImage = "/images/buttons/filterOff.png";
} else if ((screenType === "childWindow")) {
$.rightNav.visible = true;
$.rightNav.backgroundImage = "/images/buttons/filterOn.png";
}
The backgroundImage of the rightNav button is set first time and then it is not changed. I have tried to make it null and then set it again but it does not work.
Please help.
Other details :
Titanium Command-Line Interface, CLI version 4.0.0, Titanium SDK version 4.0.0.RC, Mac OS X 10.10
Thanks
Try using the image property .

Open File Picker in snap view of Metro Style App

When I try to open file picker on snap view in Metro Style App, exception occurs and exception dialog box was shown. How to solve that problem? Is there any good idea? I want my app works properly even on snap view.
Before opening the file picker, you must try to leave the snapped mode.
Here is the code I use:
var ready = true;
if (ApplicationView.Value == ApplicationViewState.Snapped)
ready = ApplicationView.TryUnsnap();
if (!ready)
return;
The SDK samples available on msdn use the following snippet
// FilePicker APIs will not work if the application is in a snapped state.
// If an app wants to show a FilePicker while snapped, it must attempt to unsnap first
bool unsnapped = ((ApplicationView::Value != ApplicationViewState::Snapped) || ApplicationView::TryUnsnap());
if (!unsnapped)
{
// Unsnapping failed
}