screen

Android app: Support all screen sizes

浪尽此生 提交于 2019-12-05 01:18:52
问题 According to this there are four size screens, small, normal, large and xlarge. So these qualifiers correspond on specific screens. For example, normal qualifier is a 3.7inches screen and small is a 2.7inches screen. So, what happens with the others sizes? How does my app cover other sizes, like 3.3inches or 3.2inches for example? 回答1: The screen sizes you mentioned are meant to be ranges. For instance, a 3.3 inch screen would probably fall into the 'normal' category , as it is bigger than

Screen Capture in Java not capturing whole screen

烈酒焚心 提交于 2019-12-05 01:13:24
问题 I have a small piece of code that I use to keep track of time - very simply it takes a picture of my desktop every four minutes so that later I can go back over what I've been up to during the day - It works great, except when I connect to an external monitor - this code only takes a screen shot of my laptop screen, not the larger external monitor I'm working from - any ideas how to change the code? I'm running OSX in case that's relevant... import java.awt.AWTException; import java.awt.Robot

Screen capture from code

梦想与她 提交于 2019-12-05 00:53:18
问题 I need to capture the screen shot of the present screen so I adopted the code below on the protected void onPause() { // TODO Auto-generated method stub super.onPause(); LinearLayout v = (LinearLayout) findViewById(R.id.mainLayout); v.setDrawingCacheEnabled(true); // this is the important code :) // Without it the view will have a // dimension of 0,0 and the bitmap will // be null v.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec

Is there any way to port ffmpeg command to Android without root the device?

拜拜、爱过 提交于 2019-12-04 22:28:14
This link http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/ talks about port ffmpeg command to Android. Can anyone describe more detail? My purpose is to record user's behavior on Android device and save as video file which contains user's sound. user370305 Build FFMPEG for android as a shard library and using Android NDK use this in your android application, for this you don't need a root permission on device. It works like other buils library. Look at this SO Question FFMPEG on Android FB file /dev/graphics/fb0 is owned by root and group is set to graphics.

Android layout on emulator vs device

匆匆过客 提交于 2019-12-04 22:02:35
I've created my app using all the neccessary things to support different screen sizes/densities (relative layouts, dip etc.) I've created all the neccessary layout files (ldpi,mdpi etc) and images for this support. I've tested the app on all the available emulator skins using Eclipse, and they all appear like the should. I then tested this on a real device (Samsung Galaxy SII) and it looked great. Then I tested it on a Galaxy Tab (7") and the layouts were a bit wrong, and the text sizes were wrong too, making it look really bad on the tablet. I'm really confused by this, because it was tested

后台执行好工具--screen

↘锁芯ラ 提交于 2019-12-04 21:53:23
1.敲入命令screen 会创建一个跑着shell的单一窗口, 在这里面 你可以跑你所需要的程序 2.新建后台的screen,并带有名字,screen -dmS XXXX, 然后Ctrl+a d退出刚创建的窗口(回到进入screen前的环境), 然后再敲入命令screen创建新的终端窗口, 就这样 你可以建立多个有shell的窗口(这些窗口里都可以跑你自己的应用), 这样即使你退出远程管理窗口(进入screen的环境), 你的screen窗间的窗口都不会关闭, 里面跑得应用自然也不会当掉 3.用screen -ls可以看所有的screen sessions 4.用screen -r sessionid可以进sessionid指定的特定的screen session(或者screen -r 会话名) 5. screen session不再使用的时候, screen -r sessionid进去, exit退出即可 6.在每个screen session 下,所有命令都以 ctrl+a(C-a) 开始。现在让我来简单介绍基本的命令C-a c -> Create,开启新的 window C-a n -> Next,切换到下个 window C-a p -> Previous,前一个 window C-a C-a -> Other,在两个 window 间切换 C-a w ->

using Windows Media Encoder to record screen

僤鯓⒐⒋嵵緔 提交于 2019-12-04 20:20:59
Is it easy to write some .Net code to record screen and audio (from computer mic), then output to an wmv file. Any reference code? BTW: I searched all codes from WME SDK, no such sample code. thanks! George Microsoft and the content mafi^H^H^H^Hindustry are trying their best to make this impossible. You will be far better of searching for "open source screen audio capture" than browsing any officially supplied documentation/example code - I would be seriously surprised if Microsoft provided anything relevant. Check out the SDK that's available for Techsmith Camtasia : Camtasia is a full-screen

How to get screen DPI (linux,mac) programatically?

喜你入骨 提交于 2019-12-04 20:15:03
问题 I need to know active screen DPI on Linux and Mac OS. I think on linux xlib might be useful, but I can't find a way how to get currect DPI. I want this information to get real screen size in inches. Thanks in advance! 回答1: In X on Linux, call XOpenDisplay() to get the Display , then use DisplayWidthMM() and DisplayHeightMM() together with DisplayWidth() and DisplayHeight() to compute the DPI. On the Mac, there's almost certainly a more native API to use than X. Mac OS X does not run X Window

Cocos2D-x - Issues when with using CCFollow

断了今生、忘了曾经 提交于 2019-12-04 18:26:42
I've got a problem with CCFollow in Cocos2D-X. I want to follow my a Sprite, which is referred to a Box2D-Body. When i call this->runAction(CCFollow::create(playerSprite)); in the init method of my GameLayer, the lower left corner of my usual screen is centered on my device and although the emulator. May anyone help me with this issue ? :/ Best Regards, stotheg ССFollow is often not enough for your own purposes. One way out of this situation is to create your custom ССFollow action or adding the required logic in the game loop. Please read this article, there's a lot of useful information for

After the screen rotation, the language of my application will be changed

心已入冬 提交于 2019-12-04 17:00:21
问题 I have created a bilingual (having two languages) android application. I have inserted my resource strings in two files: For Persian language (default) values/strings_locale.xml‬ For English language values-en/strings_locale.xml‬ I my first launching Activity I have inserted the following code: Configuration c = new Configuration(this.getResources().getConfiguration()); c.locale = new Locale("fa_IR"); this.getResources().updateConfiguration(c, this.getResources().getDisplayMetrics()); So