tablet

4x4 appwidgets are detected as 3x3 on tablets

假装没事ソ 提交于 2019-12-01 05:12:09
问题 I create an 4x4 appwidget with minWidth and minHeight set to "250dp" as it is suggested in App Widget Design Guidelines: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html It is ok on every phones and phone-sized emulator I have tried but if I test it on a tablet (Xoom or Nexus 7) or on an emulator (resolution: 1280x752 with dpi 160) then the launcher detects it as 3x3 widget. What am I doing wrong? Thanks, Tamas 回答1: Try grid size = (74*n) - 2 for older api level.

xml background don't change when i use tablet

梦想与她 提交于 2019-12-01 04:16:29
I have an xml that declare the button background: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@color/selector_pressed" /> <item android:state_focused="true" android:drawable="@color/selector_focused" /> <item android:drawable="@android:color/transparent" /> </selector> On my phone Samsung Nexus S (android 4.0.3) , this xml work perfectly, when i press the view the background color change. But I got a problem on tablets (Samsung Galaxy tab, Android 3.2), the button is clicked but i don't see any changes for the

Android - detect small tablet vs big phone?

寵の児 提交于 2019-12-01 03:57:10
问题 The app I'm developing contains 2 separate layouts: one is for the regular phones, other for small tablets such as NOOKcolor. The decision which is which is made based on the screen width resolution (currently 600dip). It looks great on Nook but terrible on HTC Rezound, which has a 720 x 1280 display. On the latter, regardless of higher resolution, everything (text, images, etc) look much larger so it gets all bunched up. What would be a good approach to pick the right device? Perhaps detect

onclick event is not working on ipad and tablet

混江龙づ霸主 提交于 2019-12-01 02:58:37
问题 onClick event not working on tablet,ipad? it is perfectly working on Pc browser but not working for touch events , i tried .binding(),.on() and many thing but they are not giving 100% result. How can I make it work on ipad , tablet?? <div id="id1" alt='div1' class="sliderImage" width="300" height="360" onclick="" style="visibility:hidden;background-image:url('img/img1.jpg'); border:solid; border-color: black;">You've styled the div to have a set width of 100px. At a reasonable font size, that

Supporting resources for tablets and mobiles

佐手、 提交于 2019-12-01 01:59:00
问题 I need to support an application for bith mdpi, hdpi and xhdpi mobiles and 7' and 10' tablets I have to admit that I'm a bit lost. So far I only did the tablet version and what I did is : one single folder called "layout" 3 different folders called "drawable-sw600dp", "drawable-sw800dp" and "drawable-sw1200" containing images of 600px large, 800px large and 1200px large. I have the impression that I messed it up and that I should have the created standard "drawable-mdpi", "drawable-hdpi" and

How do I lock screen orientation for phone, but not for tablet? (Android)

核能气质少年 提交于 2019-11-30 17:24:58
I have been working on a Android project, that is intended to be compatible with both the Android phones and tablets. On the tablet the app is working great and looks good too. However, on the phone we have been running into issues both programmatically and layout wise (working with a 10.1 inch screen is a lot easier than a 4 inch screen). To solve some of these problems we have decided to deactivate screen orientation but only for the phone version, atleast temporarily. The question is simple, how do I deactivate the screen orientation for Android phone, while keeping it active for the

How to detect a tablet device in Android?

谁都会走 提交于 2019-11-30 15:57:16
问题 I am trying to port my application developed for smartphones to the tablets with minor modifications. Is there an API in Android to detect if the device is tablet? I can do it by comparing the screen sizes, but what is the correct approach to detect a tablet? 回答1: I would introduce "Tablet mode" in application settings which would be enabled by default if resolution (use total pixel threshold) suggests it. IFAIK Android 3.0 introduces real tablet support, all previous versions are intended

How to detect a tablet device in Android?

て烟熏妆下的殇ゞ 提交于 2019-11-30 15:26:22
I am trying to port my application developed for smartphones to the tablets with minor modifications. Is there an API in Android to detect if the device is tablet? I can do it by comparing the screen sizes, but what is the correct approach to detect a tablet? I would introduce "Tablet mode" in application settings which would be enabled by default if resolution (use total pixel threshold) suggests it. IFAIK Android 3.0 introduces real tablet support, all previous versions are intended for phones and tablets are just bigger phones - got one ;) I don't think there are any specific flags in the

how to resize physical android screen from terminal/shell

馋奶兔 提交于 2019-11-30 10:37:02
问题 A while ago, I was able to resize the screens on Android. For example, I had a Xoom, and was able to run a command from ADB which shrunk it down to a 7" screen (leaving a black border around it). Granted, it was a little buggy because the home/back/app-switch buttons disappeared, but I know it's possible. It's a 1 line command where I input the new screen resolution in X and Y pixels for the Xoom. I was wondering if anyone was familiar with this, and knows how to do it. (and if anyone says it

how to resize physical android screen from terminal/shell

China☆狼群 提交于 2019-11-29 20:41:48
A while ago, I was able to resize the screens on Android. For example, I had a Xoom, and was able to run a command from ADB which shrunk it down to a 7" screen (leaving a black border around it). Granted, it was a little buggy because the home/back/app-switch buttons disappeared, but I know it's possible. It's a 1 line command where I input the new screen resolution in X and Y pixels for the Xoom. I was wondering if anyone was familiar with this, and knows how to do it. (and if anyone says it's not possible, I can assure you it is) (and I want to do this so I can test apps in various screen