screen-size

How I can do a button with left/right side as rounded as circle

老子叫甜甜 提交于 2019-12-11 00:33:23
问题 I'm trying to do a button with the sides rounded, but when I change the size of screen the button sides left to be rounded as circles, doesn't mantain the aspect ratio (I think). I want to have the next togglebutton in everysize. How I can do an XML with the sides rounded for every resolution? I've read this, but is not a solution (How to make the corners of a button round?) 回答1: The other answers are correct... almost: if you will set corners to some value (let's say 20dp), but your button

Set Screen size in PhantomJS/CasperJS

随声附和 提交于 2019-12-10 19:10:14
问题 I'm automating access to a web site to collect data from it. Unfortunately that page detects the screen size and doesn't give me the desired page if the screen is too small. When running the script from a non-interactive context (IIS web application) the Screen object seems to return a size of 1024x768 pixels. Even though I set the viewport size to 1300x1000 pixels which affects screenshots but not the web page's JavaScript. How can I tell PhantomJS or CasperJS (I'm using the latter but that

How to prevent mobile device to resize and use proper css file

北慕城南 提交于 2019-12-10 15:51:57
问题 to prevent horizontal scrolling in my web pages, I have used 3 different stylesheets for mobile, tablet, and desktop devices. I try to tell the browser to use the proper css file with the following tags in the head of the html file: <link href="static/css/cssL.css" rel="stylesheet" type="text/css" media="(min-width:1000px)" /> <link href="static/css/cssM.css" rel="stylesheet" type="text/css" media="(min-width:551px) and (max-width:999px)" /> <link href="static/css/cssS.css" rel="stylesheet"

Screen Dimensions in Visual Basic

自作多情 提交于 2019-12-10 04:18:46
问题 How can you access the dimensions of the screen in Visual Basic? I have looked online and it says to use Screen.width and Screen.length, but it doesn't recognize those properties... any tips? 回答1: In VB you can use Screen.Width and Screen.Height . They're not in VBA but you can use an API call instead. Add these declarations: Public Declare Function GetSystemMetrics Lib "user32.dll" (ByVal index As Long) As Long Public Const SM_CXSCREEN = 0 Public Const SM_CYSCREEN = 1 Then use like so:

iPhone app is running at iPhone 4 size with black bars after update

瘦欲@ 提交于 2019-12-10 03:09:04
问题 Previously the app supported the iPhone 5s/SE screen and iPhone 6-8 screens (not the plus sizes), this was done using launch images. So on Plus sized devices and iPhone X* devices it would display black bars above and below the app. We then released an update where among other things a launch storyboard was added. All through the development of this update the screen size worked perfectly on every device we had. However after releasing the update on the App Store, for some users, the app now

Android Resources Folders by Screen Size

孤街浪徒 提交于 2019-12-10 00:18:26
问题 I've deloped an Android game which supports almost resolutions in the market (240x320, 320x480, 480x800, 480x854, 600x1024). My problem is when I'm trying to support tablets, I don't understand why Android divide the resources in different folders (hdpi, ldpi, mpdi, large-mdpi, ...) when that qualifiers isn't useful! I have several graphics sets (according width) but I'm going crazy, for example, with the tablets 480x800 with density mdpi or ldpi! It's is impossible reach every device. So, do

How to detect the android screen size programmatically ( the 4 standard sizes)?

吃可爱长大的小学妹 提交于 2019-12-09 23:46:15
问题 I know there are 4 standard screen sizes for android : xlarge,large, normal and small How to know the running device which screen size has from these 4 sizes ? 回答1: int screenSize = getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK; switch(screenSize) { case Configuration.SCREENLAYOUT_SIZE_LARGE: Toast.makeText(this, "Large screen",Toast.LENGTH_LONG).show(); break; case Configuration.SCREENLAYOUT_SIZE_NORMAL: Toast.makeText(this, "Normal screen",Toast

<compatible-screens> in Android

我们两清 提交于 2019-12-09 11:44:44
问题 Good day, I am trying to restrict screen sizes to only handsets (i.e. not tablets) in google play. After I found this article I added this to my manifest file: <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal

Multiple MODAL VIEW controller change base modal to FULL SCREEN after ROTATION

心不动则不痛 提交于 2019-12-08 19:15:45
问题 This has been troubling me for quite a while, and I have done so much research on this, but could't find an answer. My first time posting a question here, please correct/forgive me if I make a mistake. Environment: iPad, iOS 6.0 Problem: Base modal view change to full screen after rotation. Description: I have a full screen application running currently showing a modal view controller. From the showing modal view, I display another modal view by doing: vc.modalPresentationStyle =

Android maintain same proportion for all different screen sizes and resolution

▼魔方 西西 提交于 2019-12-08 13:02:36
问题 I want my application components to look in a scaling mechanism. Means image size must look in proportion with screen size. I know that to use 4 different drawable folders. Considering hdpi as base (480 x 800) ratio would be: mdpi 66.66% hdpi 100% xhdpi 133.33% however xhdpi size accoring to above ration is 640 x 1060. But samsung s3 screen size is 720 x 1280 So suppose If I have image of 100 x 100 in hdpi, and so 133 x 133 in xhdpi But after applying above rule, Image in samsung s3 not