android-screen-support

Different Layouts to support different screens in android [closed]

岁酱吖の 提交于 2019-12-12 03:47:03
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . When I use different layouts to support different screens , should I use dp or px . 回答1: Always use dp instead of px. There are three distinct but linked concepts to understand here: screen density (pixels per

Multiple APK support for phone and tablet android

浪尽此生 提交于 2019-12-12 03:09:33
问题 I have 2 APKs with same package name. I want to upload 1 apk to support for android phone only(min sdk version 8) and different apk to support for tablet only(min sdk version 11). for phone I have declared below code in manifest: <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="false" android:resizeable="true" android:anyDensity="true"/> And for tablet: <supports-screens android:largeScreens="true" android

Block and unblock screenshot of some Fragment

♀尐吖头ヾ 提交于 2019-12-11 16:38:07
问题 It is known to all that to block an Activity/Fragment we can use: window.setFlag(WindowManager.LayoutManager.FLAG_SECURE, WindowManager.LayoutManager.FLAG_SECURE) But this flag blocks the View from Activity. If you have one bootomNav with 3 Fragments and needs to block just the tab 1. In the moment setFlag is bloked all Fragments. There is any FLAG_XXXXX for unblock the screenshot? 来源: https://stackoverflow.com/questions/59036381/block-and-unblock-screenshot-of-some-fragment

Saving and restoring text when rotating

情到浓时终转凉″ 提交于 2019-12-11 15:21:15
问题 I have seen a few examples on how to achieve this but still I can't get it working. I followed this example, but the TextView is empty in OnCreate and when I rotate the screen. Here is how I implemented it: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout

dimens.xml for multi window mod

五迷三道 提交于 2019-12-11 14:47:06
问题 My app supports multi window feature. I want the app to take dimensions from different dimens.xml files when the app is in normal mode and multi window mode. I have declared the minWidth = 255dp and minHeight = 600dp. I have declared the dimens-h600dp.xml and dimens.xml files but the app takes the values from only dimens-h600dp.xml in any mode. How can I make the app to take dimensions from different dimens.xml files when the app is in normal mode and multi window mode ? 回答1: You are

Load images for different screen sizes from the server using picasso?

爱⌒轻易说出口 提交于 2019-12-11 14:35:01
问题 Hello i am making an android app in which i am getting images from the server and for that i am using picasso library now my question is that as there are different densities of screens with different sizes including (ldpi, mdpi, hdpi, xhdpi )required for different devices now i want to know in background does picasso itself do something so that if i will open an high density pic on an small screen size mobile then it will not get blurred or something or hang my phone or anyway so that it can

Why does Android's Nexus 7 virtual device not load my “large” layout resources?

限于喜欢 提交于 2019-12-11 10:36:24
问题 Using the Nexus 7 in AVD, my layout-large resources are not being loaded. I thought that 7-inch devices fell into the "large" category. I have a physical device, the Galaxy 3 Lite, which is 7 inches and loads my "large" resources. I would post some XML, but I feel it should be a straight-forward "7 inches is considered large" issue... Thanks! EDIT: The expected "large" layout is used in my Genymotion emulator. So why not in the AVD? 回答1: I had the same problem and the solution exists : you

Android Different Values Folder For Different Screen Sizes

强颜欢笑 提交于 2019-12-11 04:17:08
问题 i have an issue for my application. I want to define different view width and height dimensions or different text sizes for different screen sizes. I've defined different values folders for screen resolution as other question and Android documentation said. But i have a problem for this way. For example Samsung Galaxy S5 uses "values-sw320dp-xxhdpi" folder and Samsung Galaxy S3 Mini uses "values-sw320dp-hdpi" folder according to my tests. If i don't have sw-320dp-xxhdpi folder, i expected

Different width for Navigation Drawer in Tablet and Phone

余生颓废 提交于 2019-12-10 10:02:15
问题 I was trying to implement material design for one of my project and here, the following is mentioned, The maximum width of the nav drawer is 5 times the standard increment (56dp on mobile and 64dp on tablet). So I would like to know how to implement these width for navigation drawer for mobile and tablets. I want to make different width to respective devices, either phone or tablets. I would love to use XML even if this also can be done using Java. Thank you. 回答1: Create values-sw600dp folder

Supporting Multiple Screens in android? [duplicate]

折月煮酒 提交于 2019-12-08 10:28:18
问题 This question already has answers here : multiple screen support in android (5 answers) Closed 4 years ago . In my application, I am setting multiple screen support. In my layout am using layout-normal it supports 320x480 and 480X720hdpi(I think, because it takes it from layout-normal)every layout fit to both resolution perfectly, But pop up window not fit for 480X720 resolution. Please refer my image 320x480 screen image and 480x720 screen image will know the problem. How to solve the