screen

android How to stretch rows in the gridview to fill screen?

泪湿孤枕 提交于 2019-12-17 10:53:06
问题 I have simple GridView (with one column and six rows), that displays ImageView with TextView in the cell (I create adapter). How to stretch rows to fill entire screen height?? Now I have some space below cells... main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <LinearLayout android:layout_height="fill_parent" android:layout_width="150dp" android

How to read the physical screen size of OSX?

最后都变了- 提交于 2019-12-17 10:43:29
问题 I would like to know the physical screen size under Mac OSX. But NSDeviceResolution is always reporting wrong value (72), so the calculation result of resolution / dpi is wrong. Inside "About This Mac", there is a Mac model string there, mine is "15-inch, Early 2011". So I'm wondering should there be a way (in obj-c probably), to read that string and then I can use that as the physical screen size. Any help is appreciated. 回答1: You can use CGDisplayScreenSize to get the physical size of a

Magento How to debug blank white screen

牧云@^-^@ 提交于 2019-12-17 10:39:12
问题 I have an error in my Magento backend that results in a blank screen (WSOD). I have set errors to on in admin but there is nothing being created in var/logs/. (I have checked permissions for that directory and all is correct). I have also ini_set('display_errors', 1) in index.php and Magento is set to developer mode. I have also enabled apache and php error logs. No errors are being logged though?! Anyone have a clue as to why errors aren't being shown? As I'm confused! Thanks 回答1: This is

Android screen size HDPI, LDPI, MDPI [duplicate]

感情迁移 提交于 2019-12-17 06:20:21
问题 This question already has answers here : Android splash screen image sizes to fit all devices (10 answers) Closed 5 years ago . I have a background that I need fit in all screen sizes. I have three folders, hdpi , ldpi and mdpi for drawables, but in the emulator there isn't any referense to what resolution hdpi is and what mdpi and ldpi are. 回答1: You should read Supporting multiple screens. You must define dpi on your emulator. 240 is hdpi, 160 is mdpi and below that are usually ldpi. Extract

How to check an Android device is HDPI screen or MDPI screen?

穿精又带淫゛_ 提交于 2019-12-17 05:22:20
问题 I want to check this to fetch different images by internet. How to do that? 回答1: density = getResources().getDisplayMetrics().density; // return 0.75 if it's LDPI // return 1.0 if it's MDPI // return 1.5 if it's HDPI // return 2.0 if it's XHDPI // return 3.0 if it's XXHDPI // return 4.0 if it's XXXHDPI 回答2: You can check the screen density with: switch (getResources().getDisplayMetrics().densityDpi) { case DisplayMetrics.DENSITY_LOW: // ... break; case DisplayMetrics.DENSITY_MEDIUM: // ...

Changing screen brightness programmatically (as with the power widget)

泪湿孤枕 提交于 2019-12-16 22:25:09
问题 I was searching how to change the brightness of the screen programmatically and I found this it is very good solution and it works nice, but it works only while my app is active. After my application is shutdown then the brightness is returned back the the same value as before I start my app. I want to be able to change the brightness just like when I press on the brightness button from my power widget. In the power widget that comes from android there are 3 states. One very bright one very

UNITY touch position to world position 2D

只愿长相守 提交于 2019-12-14 03:47:50
问题 How can I transform the touch position (On phones) to world position. For instance if my phone's screen size is 1440 by 2560 and my touch position on the phone is X 600 Y 700. How can I transform that position to world position on unity? I need that so I can know where the user put his finger. 回答1: There is a method that already does that for you. Have a look at Camera.ScreenToWorldPoint. Once you have a reference to the desired camera you can use it like this: Vector2 touchPos = Input

Is there an iOS screen recorder framework for recording demos? [closed]

爱⌒轻易说出口 提交于 2019-12-14 03:37:36
问题 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 7 years ago . I want to record a demo of my app on the device. For the purpose of recording an in-app demo, is there a framework which can be dropped into an app to record the screen? Of course this framework would be removed prior to submission to the App Store. 回答1: if your device is jailbroken, try this: I dont know about

Fill the dessert in my head with “dimens” [xml]

大兔子大兔子 提交于 2019-12-14 03:28:29
问题 Hello guys and girls. As i already asked, is someone here who can give me a hint how to calc the right ammount of dimens? As far as i know: dimens "small" support devices with a <=3,4 inch screen dimens "normal" from 3,4 to 5,0 dimens "large" from 4,5 to 7 dimens "xlarge" from 7 to + these are relative to the physical screensize in inches and NOT the correct numbers. Got it from a graph on this website without labeling: https://developer.android.com/guide/practices/screens_support.html also

Screen locker in Qt

强颜欢笑 提交于 2019-12-14 02:35:03
问题 Are there any Qt based screen lockers on linux systems ? i.e. 4 pin digit or password screen locker ? Any reference will be greatly appreciated. 回答1: On linux, the screen locking is done by the screensavers, and the password is the one from the user linux account. You can use QProcess to run a command line and check if it was successful: gnome-screensaver-command --lock xscreensaver-command --lock qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock qdbus org.gnome.ScreenSaver /ScreenSaver