this is image
I want to create an app to test the touch screen as shown in the above image.
so i need guideline to create this is there any github link ?
You cant test your touch screen using program.
Touch screen can be tested only touching your screen. App just sending request to OS to press point on the screen.
Related
I am writing an Android application that needs to calculate the height of screen to display content correctly. But the height I got in Mi devices (Mi 9 SE) wasn't correct when switching to full screen gesture mode.
How can I get the real height of the screen, or check if user turned on full screen gesture mode in Mi devices?
I have tried these suggestions.
How to detect full screen gesture mode in android Q
Android: detect navigation bar visibility
Check for navigation bar
After searching and experimenting, I have found the only solution: How to detect full screen gesture mode in android Q.
Instead of using ViewCompat.setOnApplyWindowInsetsListener() function, I just have to create a WindowInsets instance for the current context, then check the getSystemGestureInsets() for each edges. This is how I implemented to make a React Native's native module.
If you need a listener to detect every changes, the solution above has done well on Android app. If you want this listener for React Native, you might want to find another approach, since I haven't made it work.
A very simpler answer:
Don't use DisplayMetrics. Just make any view take full width and height of the screen (MATCH_PARENT) then get it's dimensions, it well give accurate numbers.
So, I have an application that uses a canvas and animated a moving block. What I would ultimately like to do is have the camera running capturing the user's face without showing the camera screen on the app or have a box at the bottom right of my screen that showing what the camera sees.
Is it possible to have a mini screen at the bottom right of my app that is displaying the camera or does the camera have to take the full screen?
Or if it is possible just to quickly snap a picture and display a bitmap without losing my application, that would be fine also.
Any help would be great!
Thanks.
Is it possible to have a mini screen at the bottom right of my app that is displaying the camera or does the camera have to take the full screen?
It is possible, See the 1st Screenshot here. Theirs is in top left instead of bottom right, but it should work just the same. In this Qik application the full screen shows the other person you are talking with, and the small box shows the live view from your camera.
I wouldn't know how they did that, but I imagine if you follow along with Building a Camera App in the docs it would get you most the way there. You just need to adjust the size of the preview canvas, and figure out how to use the front camera instead of back.
I want my images which will be moving on the screen to get blasted,say I am writing an application where a balloon is moving on my emulator from bottom to top and on touching, the balloon,it should burst. Is that possible for me?If so how do I write the code for the bursting of the image on touching it? (here image is balloon).Any help would be appreciated,I am in real need of it..
I've been facing a problem. How do I set a wallpaper in Android, without stretching it across 5 home screens. To be clear, I have a resource images with resolution 320x480px and when I set it as wallpaper in Android, it gets stretched across 5 screens, but I want it to show up only in 1 screen (or the same image in all screens), got it?
I'm not interested in using a livewallpaper.
Only way to have an app do that is using a live wallpaper.
There are two types of wallpaper, static and live. The scrolling of a static background is controlled by the launcher app. This is why LauncherPro and ADW can control the scrolling. When the user chooses a live wallpaper, the launcher simply displays whatever the LWP wants to render, so the LWP controls the scrolling, if any. This is how MultiPicture LWP solves the problem.
So your only options are to implement a custom launcher (which I doubt you want to do for such minor functionality) or implement a live wallpaper.
And BTW, setWallpaperOffsetSteps is an internal method called by the launcher on a live wallpaper, so the LWP knows where it's supposed to be drawing. You can't call it directly, but you can listen to onOffsetsChanged within your LWP to facilitate your own scrolling implementation.
Tap and hold your screen when you get popup "add to home screen"
select "wallpapers"
select "home screen wallpaper"
when you've selected a picture from gallery or explorer you get a screen where you can crop your Image to fit home screen.
On the bottom you can select 2 type of crops.
A big crop for setting it accros 5 screens and a small crop to use the same BG on all 5 screens.
see screenshot:
select the latter, crop your picture and save.
Not possible. May be there are any private libraries for it.
Apparently it's not native Android functionality. You can, however, get apps that do it. "Launcher Pro" and "ADW EX Launcher" can both disable scrolling but you may need to create a landscape rectangular image with empty borders at the right size.
Alternatively, the app "MultiPicture Live Wallpaper" may do what you need. A reviewer wrote: "Lets me use a picture sized the same as my phone's screen as the background on all pages of the launcher. Not sure why that isn't part of Android."
EDIT: have a look at tdtje's post before you try these. If that works, then awesome. I'm not sure which version of Android that became available in, as I'm using 2.1 without that feature.
FURTHER EDIT: In the comments below, Martyn gives us a first hand opinion!
I went to Settings and clicked on home screen. Then went to wallpaper. I selected my picture and cropped using the gallary app. This had a setting on the top to either stretch or not. I'm running Android 4.4.
I wanted to put together a few screen shots for an app to use in a "walkthrough". I have finally got the Android Debug bridge to work and can bring up the screen capture feature.
What i am wondering is this.
Is it possible to capture a screen press in the screen shot? For example in the picture below you can see the screen option " Home Button Launch " is highlighted, I would like to accomplish this same thing, as I press the buttons, ex : Menu>WallPaper> and so on.
two options:
if you spin the mouse wheel, it will cycle through the views (including button views) so you can make it appear as if it were pressed
Or just temporarily change the image of the button you want to appear as depressed to be your depressed image.
In the sample picture you linked I think that the person is not actually capturing a "screen press" they just used the scroll ball / d pad to navigate to that item in the list (which puts it into "selected" mode which with the default selector item as the background generally makes it look some shade of orange on most(but not all) devices. Then they took the screen shot while that item was selected. To do this you need a device with a scroll ball or d/pad that will let you navigate around the screen like that (the newer tablets don't have this ability that i've found, everything is touchscreen only, If you are using one of these devices you'll have to edit your code a little bit to call .getFocus() for each view you want to be highlighted one at a time.) Then just highlight a view and save the screen shot and repeat for every view you wish to have a screen shot of.
Edit: I am pretty sure the evo doesn't have any sort of scrolling device (track ball or d-pad etc).
if you spin the mouse wheel, it will cycle through the views (including button views) so you can make it appear as if it were pressed
Doesn't work for me on Moto Xoom, do you do it after you press the screen capture button while the picture is displayed in the window inside of eclipse? This would make this process much quicker and easier if I could get it to work, thanks for the info.
Unless you can get that mouse wheel to work I think the easiest way to do it is override one of the hardware buttons temporarily (back, or volume up/down would work I think) to cycle focus through all of the views in your layout. that way you don't have to call getFocus() one by one and recompile and run it for every different view you want a highlighted pic of. Then just use that button to cycle through the views and save a pic of each.