tablet

landscape mode in tablet only

喜你入骨 提交于 2019-12-05 05:56:54
My app has to support landscape/portrait mode only for tablets, phones will only support portrait mode. What is the best way to implement this? Options that I am considering: a) using two apk files, one for phones and one for tablets. The one for phone will lock landscape mode in the manifest 2) using one apk file. Detect that device is a phone, lock landscape mode inside each activity. any advice will be appreciated. Regards Daniel Argüelles You can use a SuperClass for activities and implement this https://stackoverflow.com/a/9629127/710162 on, for example, onCreate(). 来源: https:/

Android app showing black borders overlapping the edges of UI - some kind of compatibility mode?

核能气质少年 提交于 2019-12-05 04:43:39
I've encountered a strange problem with an android app designed for phones when run on a tablet. The UI is scaled correctly to the device, but there's this big black border overlapping the edges, as if it's trying to show some sort of phone-sized version of the screen. Oddly, when using Android Studio's Layout Inspector to try and see what the black border is, it only shows the UI we want to have, with no sign of the black border: I've fiddled with a bunch of settings and tried googling for the issue in every way I can imagine, but can't find anyone with a solution to the issue. Has anyone

Google play says “This app may not be optimized for your device”, when I access app page with my tablet

流过昼夜 提交于 2019-12-04 17:51:43
问题 When I access the page of my app in Google play. I get the following message: "This app may not be optimized for your device" I am testing with a Samsung Galaxy Tab4 10.1 - matissewifikx Android Version 5.0.2 My app is designed for tablet. How can I tell google that my app is for tablet and remove this message? 回答1: This is the same as the old "Designed for phones" message. The guidelines for getting your app marked as good tablet app quality are here. 回答2: Google's quality guidelines say

Detecting tablet PC

╄→尐↘猪︶ㄣ 提交于 2019-12-04 15:36:06
I have a .net winforms application which some users will run on Win7 tablets. For those users, I want to change certain UI elements to make pen input easier, while leaving those items alone for regular users. I've been able to find msdn docs on design guidelines for pen & touch, and nitty gritty on e-ink and such, but nothing on just detecting "Does this machine support a stylus or touch". Any hints? A. Use the Windows GetSystemMetricsAPI and pass in SM_TABLETPC as the value of the index. SM_TABLETPC is defined in Winuser.h. The value of SM_TABLETPC is 86. For web development, you should read

Android Master Detail Flow - Select first item in list on tablet only

耗尽温柔 提交于 2019-12-04 14:41:48
I created a new app relying on the default "Master Detail Flow" template, chosen in the "New Project..." dialog of Android Studio. Then I adapted the application to fit my needs and my data. Works like a charm on handhelds and tablets. The only thing I want to achive ist to autoselect the first item in the list, showing the detail view and setting the list item as selected. In the "ItemListFragment" I called the "onListItemClick(...)" method in the overwritten "onStart()" method. This had following behaviours: When rotating the device, the first item in the list gets selected (not the

System bar size on android tablets

谁都会走 提交于 2019-12-04 14:18:18
问题 I've got the problem that I need the height of the android tablet system bar. It's the same problem as over here, but I cant use this answer, because it gives me the same size as from the DisplayMetrics. At both ways I get the resolution with this bar allready calculated in it. (This problem doesnt appear at my smartphone, just on my tablet). 回答1: // status bar (at the top of the screen on a Nexus device) public static int getStatusBarHeight(Context context) { Resources resources = context

How to work with graphic tablet in Java? [closed]

邮差的信 提交于 2019-12-04 12:45:57
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Couple of weeks ago I have bought graphic tablet Wacom Bamboo. I want to develop small java application that can capture user's actions, process it and draw appropriate picture. Does anyone know how to get specific parameters of stylus, such as power of pressure, in Java? Thanks in advance! JTablet is based on JPen just tried JPen, it half-works maybe you'll have more luck http://jpen.sourceforge.net

How to find out whether a particular device has SIM Hardware support?

社会主义新天地 提交于 2019-12-04 11:00:14
问题 I wanted to disable features related to CALL and SMS in my application based on whether SIM hardware is present or not. Now a beginners approach towards this will be checking the Phone type using : if (telephonyManager1.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) If true then its supported. Everything was fine until i came across Sony Tablet S which has a SIM support only for Data and Messaging. No voice support. So for this device i need to disable only CALL feature but continue with

Android: master/detail flow (dual-pane) using 1 activity

假装没事ソ 提交于 2019-12-04 09:30:59
问题 As reported by the Android guide, dual-pane can be achieved in two ways: Multiple fragments, one activity Multiple fragments, multiple activities I am using the first case (the Android guide only explains the second case). This is what happens on 7" tablets : rotating from landscape to portrait : only the single-pane fragment gets recreated rotating from portrait to landscape : all 3 fragments (single-pane, dual-pane-master, dual-pane-detail) get recreated Question: why is the single-pane

Implementing Gmail Tablet like Navigation Drawer

心不动则不痛 提交于 2019-12-04 07:45:00
问题 I was looking into the tablet design of Gmail application. In that Navigation Drawer implementation is different from others. I have attached image for your reference. And also when I expand the the drawer it should happen like normal navigation drawer behavior. I would like to implement in the same way. I was searching but i found only this link Which is not so helpful. Can anyone give me suggestions how can I do this! 回答1: You can use a SlidingPaneLayout with a margin on the main pane and