FAQ Database Discussion Community


cordova misreporting screen.width and screen.height

javascript,cordova,screen,samsung-mobile
I have this code in the beginning of my cordova android app document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { alert("screen width is " + screen.width + " screen height is " + screen.height); } but it is not working as intended: Galaxy Note 3 is total garbage: (should report 1920×1080) Hisense...

How do I disable activity notifications in byobu with the screen backend?

screen,byobu
In a recent ubuntu update, my byobu screens started highlighting the window names when there's been activity. This is annoying me, I'd rather just have active/inactive displayed (as it did before the update). How can I disable it? I've found instructions for how with tmux, but I'm using the screen...

Pygame Black Screen - Won't Show What I've Written

python,image,background,pygame,screen
I have begun coding in with Pygame but everytime I run my script, the Pygame window appears completely black, even though I have filled the background with white and added a spider image onto it. Everytime I exit the window, the white background and image briefly appear, then the window...

Draw a fill rectangle dynamically on screen in C#

c#,screen,draw
I would like to draw a fill rectangle dynamically on my screen, with an opacity at 0.1. The problem is that when i move the mouse, the previous rectangles aren't clear. This is the drawing methods. private void OnMouseDown(object sender, MouseEventArgs e) { isMouseDown = true; x = e.X; y...

Android - Unity3D freeze in splash screen on some phones

android,unity3d,screen,freeze,splash
I have a problem with Unity3D. I created a game with Unity 4.6.2f1. My problem is, game crashes after splash screen(Like trying to open itself constantly). The weird part is, game works on my phones and my tablets perfectly. I have Nexus 5(With Android 5.1.1) , Iocean X7S(With Android 4.2.2)...

How to detect whether screen is touched in a background service in Android Studio?

android,service,touch,screen,detect
I am working on a project on android studio. I need to detect whether the screen is touched or not in a background service (and pop up a message for that). But, I have problem detecting whether the screen is touched or not in a background service without affecting user...

Error on running “adb shell wm density 240” for changing Android device density

android,resize,screen,adb
I want to resize the screen on Android device. When I run the following commands: adb shell wm density 240 or adb shell wm size 800x480 I get error: /system/bin/sh: wm: not found. Why? How can I resolve that? I should mention that my device is rooted and its model...

Does an html element require focus to be read by screen readers

screen,wai-aria,reader
If I show a modal somewhere on the screen, and I want the screen reader to read it at some point, does setting the aria-live to one of the values suffices, or do I also have to explicitly focus the element when I show it?

Is there a way to code Ctrl+a :multiuser on when using screen?

linux,bash,screen
I want to run a script that sets up a screen session and then automatically makes it into a multi-user and also adds one of the users on my system. So far, I have a script that creates the screen session, but I have to manually make it into a...

Screen does not save its progress when switched

android,libgdx,screen
So, this is too hard for me to explain this in short, so the title looks so creepy. Well, I am writing a small android application and i have like three screens: the main-menu one, and two in-game screens. I can switch between the last two ones with a switch...

Android Tablet Only app can be downloaded on Phablets

android,screen,android-manifest
I've initially developped an android tablet-only app by adding the following declaration in the app manifest as described in the official documentation: <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600" /> The problem is that my app was release quite a long time ago and now, we have some customer who are...

How to prevent PHP pushed HTML tables exceeding the length of the page

php,html,css,screen,html-table
I am still a novice and would appreciate any assistance you can provide. I am trying to prevent an HTML table from exceeding the length of the page. I am currently parsing a csv with PHP and looping the array information into an HTML table. The table is to be...

Android Screen Densities: how many densities?

android,layout,screen
I am developing an Android app that downloads images from an S3 bucket and displays them full screen on the phone. How many different densities should I create in the S3 bucket for each image, in order to include both phones and tablets? What about for Apple devices (again, both...

Libgdx sprite size matching screen size

java,libgdx,size,screen,scaling
So i have a created a background which is 1920 x 1080 in size. And i have a window that is 1280 x 720 (will not always be this size) Now when i render the sprite using this code: @Override public void render(float delta) { Gdx.gl20.glClearColor(0.2F, 0.5F, 1F, 1F);...

How can I start a screen session using a specific config file?

bash,screen,config
I would like to be able to start a screen session using a certain config file. I know that I can use -c and then the file path to the config file but if I do that, then the sh script I am using does not work. You can see...

Prevent other applications form capturing/recording screen

android,screen,capture,recording
Basically i want VIDEO PIRACY PROTECTION My application has video streaming and I want to protect my video streaming from other applications. Other applications should not be able to capture screen while my video is playing. Any suggestions how can i achieve this.. Thanks in advance....

How can I set element for entire width of the page? (Android)

android,width,screen,relativelayout,resolution
I want to set the "layoutAtendenteBalao" element for the entire width of the page. I tried to set it to <item name="android:layout_width">match_parent</item>, but it did not work. styles.xml <!--<style name="layoutAtendente"> <item name="android:layout_width">560px</item> <item name="android:layout_height">400px</item> <item name="android:layout_alignParentRight">true</item> <item name="android:layout_alignParentBottom">true</item> </style>--> <style...

Window.Current.Bounds throws HRESULT E_FAIL has been returned from a call to a COM component

c#,windows-phone-8.1,screen,dimensions,windows-universal
I'm building a Windows universal SDK that will retrieve user and device dimensions and I'm trying to get the screen size of the device from a non XAML (or related) class. When trying to get the bounds I receive "HRESULT E_FAIL has been returned from a call to a COM...

Can I send commands to an already open tmux session?

vim,screen,gnu,tmux
I've started using vim a couple of months ago and I'm loving it. I mostly code on a vim pane (using iTerm2 on OS X) and I keep an ipython console running inside a screen session on another pane. I've managed to find a way to send lines of code...

Xcode run code and black screen

ios,xcode,screen
I have a problem. I write code in button touch event. Run project and click button. Then i get a black screen. (Sorry my English.) - (IBAction)ff:(id)sender { SecondViewController *viewController = [[SecondViewController alloc] init]; [self presentViewController:viewController animated:YES completion:nil]; } ...

vb.NET Screen Location

vb.net,location,screen
I'm working with a multi monitor setup. I know that you can do Screen.AllScreens(x) to get a specific screen, but is there any way to identify which screen is in which position? I.E. Screen 0 is on the right, screen 1 is on the left, screen 2 is in the...

Background image cover whole screen

css,background,screen,cover
On the homepage of http://www.jeroenvanderwaal.com i'm trying to get the background image to cover the whole screen. I am unable to find out why it isn't covering but leaving an empty space at the bottom. The code so far: .page-id-4 #main { background-image: url(http://www.jeroenvanderwaal.com/wp-content/uploads/2015/03/achtergrond2.jpg); background-repeat: no-repeat; background-attachment: fixed; background-position: center...

Android: screen cropped at bottom when phone at landscape mode

android,screen
I created screen using eclipse for Android. screen display correctly in portrait mode, but when we mobile rotate to landscape screen area in RelativeLayout cropped. I tried the same by removing RelativeLayout, but all vain. screen cropped at bottom when phone at landscape mode *<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout1"...

How I set the width of RelativeLayout to screen width?

android,width,screen,relativelayout,resolution
I have this RelativeLayout component and I want to set it to the entire screen width. How can I do that? atendente.xml <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout style="@style/layoutAtendenteBalao" android:id="@+atendente/rltAtendenteBalao"> styles.xml <style name="layoutAtendenteBalao"> <item name="android:layout_width">fill_parent</item>...

How can I clear screen in python cmd? [duplicate]

python,screen,clear,python-cmd
This question already has an answer here: How to clear python interpreter console? 22 answers How can I clear the screen from former results in python cmd? I want to clear the screen in each level of a loop, I mean how to clear the results and print the...

Fast Screen Flicker while NOT drawing on Android OpenGL

android,opengl-es,screen,opengl-es-2.0,flicker
I wanted to save battery life time. My app only needs to be drawn sometimes. So I added this code to my Renderer in the onDraw method: boolean dirty = true; public void onDrawFrame(GL10 arg0) { if (!dirty) return; dirty = false; ..... draw images .... } So my app...

How can I integrate TKinter with Python log in screen?

python,login,tkinter,screen
I am using TkInter to create a log in screen here, at the moment the keep me logged in button at the bottom is redundant and will remain so. What I want to do is use this code: from tkinter import * root = Tk() label_1 = Label(root, text="Username") label_2...

Available Resolutions For a specific Screen

c#,screen,resolution
I might have 2 monitor/screens connected to my machine. I want to know all Avaliable resolutions for a specific screen (I have an instance of type System.Windows.Forms.Screen). I've seen the following: How to list available video modes using C#? List of valid resolutions for a given Screen? but they all...

How do I execute a php file on the server using the screen command?

php,screen,server,background-process
I was looking at this post which is where I got the idea to use screens to execute my php scripts on the server: Running a PHP script completely on server side I was successfully able to execute a php script using: screen php ./file.php However, this did not work...

Sprites not fitting according to different screen resolutions on Libdx

java,libgdx,screen,resolution
I'm testing my sprite that has the game title, and on my Motorola Moto G 2nd generation the dimensions of the sprite looks good but I'm testing also on my mothers phone, a Samsung GT-S5830i, and the height of the sprite looks stretched out. I'm also trying to understand the...

How to find what density bucket the phone is in?

android,screen,dpi,dip
Slightly noob-ish question but I get confused when it comes to calculating what density bucket the phone falls in. I'll take my Galaxy S3 as an example. It has a resolution of 1280 x 720 which means it has 306 dpi. Now, referring to the chart below, my phone falls...

ViewPager for Screen Slides without swipe

android,android-viewpager,screen,slide
I want to use a Screen slide but without swipe. I see this example: http://developer.android.com/training/animation/screen-slide.html , only i want slide pages with the top menu and not with the swipe. How I can do it? Thanks....

How to draw in the screen AndroidStudio? [closed]

android,screen,draw
I am a beginner in develop apps, can someone send a simple code, or explain how can I draw something in the screen?

Which folder will the element receive the params? (Android)

android,screen,resolution
My avd is mdpi and I have an element that is defined in values, values-hdpi, values-large-hdpi, values-xlarge folders. When I run the project, from which folder will the compiler get the element references. Note: this element is not defined in Activity.java.

c# image send improvement

image,sockets,screen,share
im trying to send as much pictures as possible per sec and it's working prettry good on local network,but when im trying it from friend computer or somthning... it works veryyyy slowwww.. i have a prettry good internet,also my friend has.. i have only this port opend..... i think it...

Detecting monitor changes on OSX

osx,notifications,screen
I have an app which asks for notifications about monitor changes so as to reconfigure, and these are currently not getting triggered if I add a monitor: [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(distNotificationHook:) name:NSApplicationDidChangeScreenParametersNotification object:nil]; [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(distNotificationHook:) name:@"com.apple.BezelServices.BMDisplayHWReconfiguredEvent" object:nil]; They used to work.. but no...

setting text color to transparent for hiding accessibility content?

css,screen,accessibility,transparent,reader
I have a bunch of tags with background-images properties that I would like to give some content for screenreaders but I obviously can't give it an alt attribute since they are not <img> tags. Would screenreaders be able to read the content as long as I set the text color...

Preference Screen in SlidingTabLayout

java,android,tabs,screen,preference
I am currently using the example from Google's slidingtablayout in my code. I would like to replace one of the tabs' layout as a preference screen instead of the current linear/relative layout. How can I do this?...

Restrain form to the working area of the screen - better solution

vb.net,forms,screen,movement
I have a working code but when moving form to the screen bounds I sometimes get form flickering. Doesn't look good. Is there a better solution for this? Private Sub Form1_Move(sender As Object, e As EventArgs) Handles Me.Move Dim p As Point p = Me.Location Dim screenWidth As Integer =...

Android layouts size and resize

android,android-layout,layout,android-studio,screen
I am doing a lot of work about android layout I still can't create a layout working in every phone. I am not sure about best the way to create a layout so correct me if I am wrong . There are three things to keep in mind : Screen...

how to launch a second application in a second screen in WPF?

c#,wpf,screen,launcher,launching-application
I actually work on two little wpf application for track, one is on the principal computer, you can wrote the time of the pilot on, the second must display in a big screen connect to the principal computer in hdmi and just display the time to the pilot. I have...

Pygame Screen Collision Troubles, Player Moves Off Screen

python,pygame,screen,collision
I've looked around alot for code to implement screen collision but I can't find any that I know how to adapt to my own code, so I just need some help figuring out how to make my player not go through the screen. import pygame import random pygame.init() display_width =...

Effective use of touch/hover co-ordinates on a View

android,operating-system,screen,coordinate
On Android phone, I get the information of co-ordinates that, user touch on his/her phone screen or device. How do i then, use/pass these X-Y coordinates to run a specific function of mine, and use it in my code

C# (WinForms) - Find Colour of Cursor

c#,winforms,colors,cursor,screen
My Aim: I'd like to have the ability to retrieve the colour on the screen including the cursor, from certain coordinates. In other words, I suppose you could say I'd like to retrieve the colour of the cursor (or at least, a certain point/pixel on the cursor). My Difficulty: I...