imageSuffix =
{
["-x2"] = 2,
["-x4"] = 4,--ipad3
}
i creaded app in corona for iphone in that app i worte some like that for dynamic image Resulation and like that i want to know what procedure for android build the same project and i want know one more thing that is we mention any premission in build.settings file any thing for android did u explain to me
its the Images dynamic scale factor for android to set config.lua .its code for
imageSuffix =
{
["-x15"] = 1.5,--android devices
["-x3"] = 3,--mid size tablet
}
Related
I'm using Android Studio Bumblebee 2021.1.1 Canary 3 + Compose 1.0-rc02, and there seems to be no easy way to force landscape mode for a preview, which includes using resources (in particular dimensions) from -land/ resource folders.
I know that this behaviour is possible in theory, because using #Preview(device = Devices.AUTOMOTIVE_1024p) will use the correct resource values. However, this is not a viable preview option as the pixel density is off compared to the default preview device. (Even when tweaking the preview width, height and font scale, the icons are still the wrong size.)
I was able to make it so that my UI code detects the landscape orientation using the following wrapper
val lanscapeConfig = LocalConfiguration.current.apply {
orientation = Configuration.ORIENTATION_LANDSCAPE
}
CompositionLocalProvider(LocalConfiguration provides lanscapeConfig) {
// actual preview code
}
However this doesn't fix the aforementioned issue with not getting landscape resources using dimensionResource().
Any ideas?
Current workaround is to use a separate file for the landscape preview and specify device = Devices.AUTOMOTIVE_1024p, and tweak the height and width (but not the font scale).
But I hope someone can come up with a better approach which works with different device types.
#Preview(device = Devices.AUTOMOTIVE_1024p, widthDp = 720, heightDp = 360)
#Composable
fun PreviewLandscape() {
PreviewHelper() // common preview code to all modes
}
Update 2023-02-13
Looks like some relevant features have been added to Android Studio 2022.1 Electric Eel: Use Compose Preview with different devices.
For now, the interactive mode feature has to be enabled manually (File > Settings > Experimental > Jetpack Compose > Check 'Enable #Preview picker').
Based on the new specs this can be done with:
#Preview(
showSystemUi = true,
device = "spec:width=411dp,height=891dp,dpi=420,isRound=false,chinSize=0dp,orientation=landscape"
)
I am using ionic for application.I have one ionic modal in my app.When i am setting height in px or percentage its coming correct for all android device but not for ios.If i use .platform-ios for height in CSS for ios devices its not coming same for all ios devices.
I have added vh for ios but still not same for all ios devices.What can i do can anyone suggest me.
css:-
.appModal
{
height:120px;
}
.platform-ios .appModal
{
height:40vh;
}
Thank you.
You may want to have a look at this link.
You can see that iOS 9.3 Safari and above support the Viewport Height and Width measurements vh and vw
Older iOS devices don't support these, see the known issues tab on that link for more information.
As a fallback you can use something like:
.class-name {
height: 300px;
height: 40vh;
}
Browsers that support vh will use specified 40vh but older browsers/devices will see theres an error and default back to the 300px height.
Please note: more widely supported css should appear first in your markup. Otherwise you won't be able to overwrite for the newer browser.
i have this issue too ;
the best solutions i found is to use javascript is supported every where ;)
code be something like this :
var heighDevice = window.screen.height;
var FirstELement = document.getElementById('MyAppModal');//MyAppModal id element
var heightElm = (heighDevice * 40) / 100; // 40 is height in vh
// add the height to the element
FirstELement.style["height"] = heightElm + "px";
XCode 8.1 Swift 3.0.1
I've been playing with img.ly iOS SDK for the last few days and I'm really excited about it, especially, the full blown customization that they've offered.
Unfortunately, I'm facing a few issues which I seem to can't get my head around it.
I wanted to limit the filter effects for the user to use only 5 of them. I can make it work by using this code:
However, when I select a filter effect, the image won't apply that effect to the Camera view, like the picture below:
I've tried to hook up the filterToolControllerBuilder to the CameraViewController like below:
And I called the filterSelectedClosure to get the identifier, and I can get it. as the filter is selected like the image below:
Questions are in the picture.
How to apply the filter identifier to the photo?
How to get the filter identifier when filter in Camera View is selected?
How to apply that selected filter identifier to the live Camera preview?
It seems like this is the first question related to Img.ly iOS SDK.
Please assist. Thanks.
I used to use this framework... let try to follow my code .
builder.configureAdjustToolController({ (options) in
options.allowedAdjustTools = [.brightness]
options.adjustToolButtonConfigurationClosure = { cell , action in
cell.imageView.image = cell.imageView.image?.withRenderingMode(.alwaysTemplate)
cell.imageView.tintColor = UIColor.white
}
})
I've been having difficulty with getting the images to show in ImageButton in Xamarin.Forms for my iOS application. The buttons are functional, and clickable, but the text and image source is not properly displaying. Instead, there is a clickable blue box, and ellipses as the text value. (http://i.imgur.com/kdQtOL0.png) I put the images in the Resources folder with the build action set to BundleResource. I can also display images as a simple image (rather than a button), so I know that iOS can see the images in the folder. I am using the following format to add buttons to my page.
Grid btns = SetUpGrid(1, 0, 0, 0, false);
var ib = new ImageButton();
ib.Image = "account.png";
ib.Text = "Account";
ib.HorizontalOptions = LayoutOptions.Start;
ib.VerticalOptions = LayoutOptions.FillAndExpand;
ib.Clicked += Home_BillClicked;
btns.Children.Add(ib, 0, 1);
Grid.SetColumnSpan(ib, 2);
The images appear and work perfectly in both the WP8 and Android apps. iOS seems to be the only one with an issue rendering the ImageButton. Does anyone know what may be causing the issue?
Instead ib.Image = "account.png", change to ib.Source = "account.png"; and add to your AppDelegate class inherits from XFormsApplicationDelegate.
At the moment, I am in the process of trying to convert my iOS app over to Windows Phone 8, however, in my iOS app, I used the UIImagePicker's allowsEditing method to get what happens in the image below.
In the image below, the user can resize the picture they have selected so they can use only the part of the picture they selected in the app, while also the picture they select gets cropped into a square for the app to easily use too.
My question is, now that I am making the app using the Windows Phone 8 SDK, is there a simple method to get this same functionality, or will I have to program this functionality in myself?
Thank you very much.
Jon.
You should use the PhotoChooserTask with the PixelHeight and PixelWidth properties:
photoChooser.PixelHeight = 612;
photoChooser.PixelWidth = 612;