Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 28
Registered: ‎03-15-2010
My Device: none
My Carrier: none

Display.isRowwise() - what is this??

I'm using Display.screenshot() to capture the screen. The reference mentions that my target bitmap must match the screen type, and then goes on to list Display.isColor(), Display.getNumColors(), and Display.isRowwise as methods to find out the screen's properties.

 

I want my app to be as compatible as possible with older blackberries so I'm taking steps to support different color amounts (Display.screenshot() exists since API 4.3, so there's no need to monochrome check with Display.isColor(): Blackberries with 4.3 and onwards have color screens, after all). However, I'm worried about Display.isRowwise since I have no idea what "Rowwise orientation" is.

 

Any light on the subject? I don't want a user to get my app to find that it crashes with an unexpected screen type.

Contributor
Posts: 28
Registered: ‎03-15-2010
My Device: none
My Carrier: none

Re: Display.isRowwise() - what is this??

 

 

class topic extends Thread {
	private int despairPoint = 30;
	private int replies;
	
	public topic() {
		this.start();
	}
	
	public void run() {
		while (true) {
			checkReplies();
			try {
				sleep(30);
			} catch (InterruptedException e) {
				despair();
			}
		}
	}
	
	public void checkReplies() {
		if (replies == 0) {
			despairPoint--;
		}
		if (despairPoint <= 0) {
			despair();
		}
	}
	
	public void despair() {
		System.out.println("*DesperationBump*");
	}
}

 

 

 

 

*DesperationBump*

 

 

 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Display.isRowwise() - what is this??

If you create a standard Bitmap, just passing in the size, you should always get one that is acceptable for screenshot.

Highlighted
Developer
Posts: 106
Registered: ‎06-18-2009
My Device: Bold

Re: Display.isRowwise() - what is this??

okay...so I was a bit curious was this is and looked into it.  Maybe this helps.

 

If you look at the JavaDoc of Bitmap, you find two types: ROWWISE_16BIT_COLOR and ROWWISE_MONOCHROME.

 

It explains a bit about and as far as I can tell, it has mainly to do with how the bitmap data is stored.

 

I would think that if you check for isRowwise() and if it is true, then set one of the two types.  It both types actually go with color devices only.  Therefore you will probably also have to check the getNumColors() to figure out if it is 16BIT or MONOCHROME.

 

I think you might still have to check for isColor() because from the types of Bitmap, it seems that even MONOCHROME is considered a color - well I guess it is a one shaded color.

----
If this helped you, press the thumbs up button (on the far right - '+' thumb icon)
If this post solved the issue, click "Accept as Solution"
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Display.isRowwise() - what is this??

Rowwise:

0,    1,    2,   3

4,    5,    6,   7

8,    9,   10, 11

12, 13, 14, 15

 

Columwise:

0, 4,  8,  12

1, 5,  9,  13

2, 6, 10, 14

3, 7, 11, 15

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.