Showing posts with label Display. Show all posts
Showing posts with label Display. Show all posts
Android: PreferenceActivity: dual pane
I have a tablet which has usable width of ~700 pixels, I want PreferenceActivity to show as dual pane which shows only for sw720dp, to do so I override following method:
@Overridepublic boolean onIsMultiPane() {
find similar posts:
Android,
Display,
User Preferences
0
comments
Android: PreferenceActivity: dual pane
I have a tablet which has usable width of ~700 pixels, I want PreferenceActivity to show as dual pane which shows only for sw720dp, to do so I override following method:
@Overridepublic boolean onIsMultiPane() {
@Overridepublic boolean onIsMultiPane() {
return true;
}
find similar posts:
Android,
Display,
User Preferences
0
comments
Android: display dimensions available for Activity
In this tutorial you will learn how to check the space allowed for Activity to draw content in, this is useful when you have to make calculations of UI elements based on width and heigh.
Inside Activity
Display display = getWindowManager().getDefaultDisplay();
In this case I have additional elements on the top and side that limit the 1,280-by-800-pixel TFT display's drawing area.
Inside Activity
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
System.out.println("width = " + width + ", height = " + height);
I/System.out( 2318): width = 1280, height = 752
Note that this gives you available display size without the top bar.
I/System.out( 1900): width = 1004, height = 654
find similar posts:
Android,
Display
0
comments
Android: display dimensions available for Activity
In this tutorial you will learn how to check the space allowed for Activity to draw content in, this is useful when you have to make calculations of UI elements based on width and heigh.
Inside Activity
Display display = getWindowManager().getDefaultDisplay();
In this case I have additional elements on the top and side that limit the 1,280-by-800-pixel TFT display's drawing area.
Inside Activity
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
System.out.println("width = " + width + ", height = " + height);
I/System.out( 2318): width = 1280, height = 752
Note that this gives you available display size without the top bar.
I/System.out( 1900): width = 1004, height = 654
find similar posts:
Android,
Display
0
comments
Subscribe to:
Posts (Atom)
apt quotation..
“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.” by Robert A. Heinlein (author, aeronautical engineer, and naval officer)