Skip to main content

Posts

Showing posts with the label resolution

Custom AlertBox in Android

in main.xml file: < ?xml version="1.0" encoding="utf-8"?> < LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > < Button android:id="@+id/button1" android:layout_width="120dp" android:layout_height="wrap_content" android:text="Button" /> < /LinearLayout> in dialog.xml :(xml for custom dialog box) : < ?xml version="1.0" encoding="utf-8"?> < LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > < ImageView android:id="@+id/imageView1" android:layout_widt...

Working with images in Corona

Loading an Image : syntax: display.newImage( filename [, baseDirectory] [, left, top] ) example: newImage = display.newImage( "image.png", 10, 20 ) myImage2 = display.newImage( "image.png" ) Image Autoscaling: The default behavior of display.newImage() is to auto-scale large images.To control manually we can use boolean value. syntax: display.newImage( [parentGroup,] filename [, baseDirectory] [, x, y] [,isFullResolution] ) example: newImage = display.newImage( "image.png", 10, 20, true ) Images with Dynamic Resolution : syntax: display.newImageRect( [parentGroup,] filename [, baseDirectory] w,h ) example: newImage = display.newImageRect( "Image.png", 100, 100 )