android-windowmanager

Out side touch should be enable when we add view in window manager

空扰寡人 提交于 2019-12-24 19:41:31
问题 Out side touch should be enable when we add view in window manager but in my case outside touch disable when i add view in window manager. WindowManager.LayoutParams params; params = new WindowManager.LayoutParams(); params.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS ; params.format = PixelFormat.RGBA_8888; params.gravity = Gravity.CENTER; params.type = WindowManager.LayoutParams

Detect gestures without blocking other apps

好久不见. 提交于 2019-12-24 19:20:47
问题 I want to create system overlay view, which detect gestures without blocking other apps. How can i do it (apps like OmniSwipe, Easy Swipe detect gestures without blocking anything)? Below code, which blocking other apps cause of system overlay view. package com.carxsing.anglelockscreen.GestureDetector; public class GestureService extends Service implements GestureOverlayView.OnGesturePerformedListener{ private WindowManager windowManager; private GestureOverlayView GestureOverlay,

Android: ProgressDialog.show() WindowManager token, not valid

青春壹個敷衍的年華 提交于 2019-12-24 08:13:35
问题 public class MainActivity extends Activity { private static String State = "STOP"; final String address = "http://XXXX.co.uk:9994"; private ImageView Player; private ProgressDialog progress; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); // requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.activity_main); Button Schedule; Button Presenters; Button

Application level floating views with navigation in Android

℡╲_俬逩灬. 提交于 2019-12-24 04:05:30
问题 I have to show a floating button that will be added in WindowManager so it remain on the top of all Activities. (I have done this part using https://github.com/marshallino16/FloatingView) When that button is tapped I have to open screen and show detail view and navigate between other views. To achieve this thing I can do following things either adding 1 - PopUpWindow 2 - Dialog But I cannot provide navigation using either of them. So my questions is. What is the best way to add multiple views

WindowManager.addView ontop(overlay) of soft key OR nav bar

家住魔仙堡 提交于 2019-12-23 05:29:24
问题 I saw an app that overlays whole screen including nav bar (or soft-key that has back, home, etc.) today. it's CF.Lumen(requires android 4.4+) by chainfire. I just remembered this is NOT POSSIBLE on general approach and many SO answers told me. So I looked down smali codes from Lumens apk(sorry chainfire), found 0x7d6 as type specifier, which is TYPE_SYSTEM_OVERLAY . In general, this makes a view overlays on top of lock screen. It looks good however it won't overlays nav bar area. even on lock

Turning screen on and off programmatically not working on some devices

好久不见. 提交于 2019-12-23 01:45:16
问题 I use the code below to turn the screen on and off. Both pieces of code work on most devices (tested on Galaxy Note, Galaxy S2, etc. etc.) but don't work on a few (mostly tablets but some phones as well). On some devices screen on works but screen off doesn't, and the opposite holds for some other devices. I'm not sure what the cause is since it's pretty standard code (and since it works on some devices that means triggering these functions i.e. the function call, is not a problem). Are there

With security keyguard active transition between activities is weird

耗尽温柔 提交于 2019-12-22 10:45:15
问题 I have my main activity A and when the user presses a button i open another activity B. But when this happens B doesn't just appear on top of A: A disappears secure keyguard shows up B appears And when i get rid of B the same thing happens. This is annoying because there's a lot of flickering with no real purpose on the screen. Is there any way to achieve direct transition from A to B while keyguard is active without merging the 2 activities into 1? Here is what i'm doing in onCreate for both

Display DialogFragment content below status bar

▼魔方 西西 提交于 2019-12-20 14:48:53
问题 Im trying to display an DialogFragment with match_parent both for height and width but it happens that on top the DialogFragment is being displayed below StatusBar. The DialogFragment is applying some default value for padding on bottom, right, left, and top. But the top padding should start counting from statusBar and not from the total screen size. How can I set DialogFragment to be match_parent, but have the normal/default padding on top,bottom,right,left? 回答1: By default Dialog would be

Prevent login screen on screen rotation android

痞子三分冷 提交于 2019-12-20 07:12:07
问题 I have an application in which a login screen shows up whenever an activity goes to onPause state. Generally, when screen orientation changes, the activity goes to onPause state, so I somehow prevented login screen when device is rotated. See the code below, protected void onPause() { super.onPause(); WindowManager mWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE); mDisplay = mWindowManager.getDefaultDisplay(); mOrientation = mDisplay.getRotation(); if(mOrientation == 1 ||

add View by using WindowManager, but can back key press

时光怂恿深爱的人放手 提交于 2019-12-18 17:32:31
问题 I've add a View, by using WindowManager. It shows properly what I wanted to do, but I have a problem. this is the problem. back key press doesn't affect under android component(like activity) what I want is my added view can focusable, ( can click the view's inner button ) only when click the view, and outside of the view can process their work. ( for example, if there is a button, can be clicked, and when back key press, top activity was gone ) but if I add a flag - WindowManager