screen-size

Butterknife with Different Layouts for Phones and Tablets

醉酒当歌 提交于 2019-12-04 14:23:13
I am having a bit of an issue with using the Butterknife library in my current project. I am currently optimizing the project for both phones and tablets and there are sometimes slight differences between the layout files for the two for example layout/layout_example.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Text1/> </LinearLayout>

How do I find the display size of my system in Emacs?

梦想的初衷 提交于 2019-12-04 12:07:33
I use the same .emacs across multiple machines, operating systems and platforms. I would like the default frame size of Emacs upon invocation to be relative to the available screen size (e.g. 96 lines work very well on a 1600x1200 desktop screen, but on an 1280x800 laptop I need to specify no more than 68 lines). Is there an emacs-lisp expression that returns the width & height of the system's screen? Update: I just found a similar question , but for some reason neither (x-display-pixel-width) nor (display-pixel-width) can be found in my GNU Emacs 23.2 on Windows XP system. Continuing to

Designing for different screen sizes using ConstraintsLayouts

▼魔方 西西 提交于 2019-12-04 10:53:18
I have started to dive into the Constraints Layout that were announced on the IO this year. This looks very promising and makes your layouts very efficient. I have seen the codelab excersize provided by Google. However I have the following questions that I would like to resolve. How can ConstraintLayouts be used to design the layout for different screen sizes? Currently I design the layout and set the views' margins and paddings etc for a specific device/screen group. Save those values in the dimens.xml file. This is a REALLY painful method to design the layouts. Does the Android

Android compatibilty settings in AndroidManifest.xml

左心房为你撑大大i 提交于 2019-12-04 09:46:46
I have an app to release which works on all android screen-sizes (except smaller) and densities above SDK version 2.0. It will also run on extra large screens. Currently I have added this: <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="false" android:anyDensity="true" /> But I also need to add android:xlargeScreens="true" , to allow it visible in android market on extra large screen devices, since by default it is false. But to add android:xlargeScreens I need to change my eclipse targetsettings to 2.3 as this attribute was added from API level

CSS: How to set the width and height dependent on the screen/window size?

对着背影说爱祢 提交于 2019-12-04 07:54:19
Following up this question here I am trying to get a good rendering of a floating 3D cube using three.js. The camera proportions are window.innerWidth / window.innerHeight and since I am using a rectangular div container, I get a flattened cube. Something like this . I tried to get my div container to be in proportion with my screen or window size and it worked! For example for a 1367x768 screen: CSS: #render { width: 450px; height: 250px; } But! I want to have this worked out also for different size, e.g. for smartphones too! It would be perfect to make this fully responsive. Is it possible

Getting the physical screen size in inches for iPhone

有些话、适合烂在心里 提交于 2019-12-04 03:31:46
问题 How can I get the screen size programmatically in inches(for example iPhone 4, 3.5 inches). I found a way to do it by detecting the iPhone/iPad model but hard coding is not what I want so I am not looking something like that. 回答1: This will find the diagonal screen size of a device: float scale = [[UIScreen mainScreen] scale]; float ppi = scale * ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? 132 : 163); float width = ([[UIScreen mainScreen] bounds].size.width * scale); float

Why 2 devices of same size, same resolution, claims different density? [closed]

旧城冷巷雨未停 提交于 2019-12-04 03:26:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Please take a look at Material IO's device metrics: Pay attention to Google Pixel and HTC One M9. These 2 devices have the same physical size, same number of pixels, but claimed to have different pixel densities. This contradicts with my understanding of pixel density. Which of the following is true? My

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

自古美人都是妖i 提交于 2019-12-04 03:22:36
On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something? BTW I am hand coding the GUI, so there is no XIB. Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox. Note that including this Default-568h.png is only allowed when building an app using Xcode 4.5 and the iOS 6 SDK

App size is too big because of too many images

落爺英雄遲暮 提交于 2019-12-03 17:00:03
I'm creating an universal app. For one screen, I'm displaying 6 images (png format) in a grid using this control. Also this screen supports both portrait and landscape orientation. I've created a set of images in different resolutions for all the iDevices and named them using the correct naming convention as follows. name~iphone.png name@2x~iphone.png name~ipad.png name@2x~ipad.png name-568h@2x~iphone.png (iPhone 5) And I had to create another set of these images since I support both orientation and I can't use the same images as above because in landscape it would stretch. Now I have close to

<compatible-screens> in Android

北城以北 提交于 2019-12-03 14:32:05
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 size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android