C ClassicDancer Member Licensed User Longtime User Oct 21, 2012 #1 Hi, I've created a floating window to edit a record from a database. Just wondered whether there is a way to disable the main activity window from getting focus and finger pressing. Or am I going about it the wrong way. I need a small window on top of the main activity window in order to update a record. Please help. Andy
Hi, I've created a floating window to edit a record from a database. Just wondered whether there is a way to disable the main activity window from getting focus and finger pressing. Or am I going about it the wrong way. I need a small window on top of the main activity window in order to update a record. Please help. Andy
barx Well-Known Member Licensed User Longtime User Oct 21, 2012 #2 Maybe overlay the activity with a clear panel and code to consume the click events. Then set that panel as the parent of the popup window (If it requires one) Upvote 0
Maybe overlay the activity with a clear panel and code to consume the click events. Then set that panel as the parent of the popup window (If it requires one)
C ClassicDancer Member Licensed User Longtime User Oct 22, 2012 #4 I assume you mean this is the answer? (Place a panel between the floating window and the other views, and create a OnTouch handler for this panel (even empty).) I'm not sure how to do this..... Can you explain please? Thanks Andy. Upvote 0
I assume you mean this is the answer? (Place a panel between the floating window and the other views, and create a OnTouch handler for this panel (even empty).) I'm not sure how to do this..... Can you explain please? Thanks Andy.
Informatix Expert Licensed User Longtime User Oct 22, 2012 #5 ClassicDancer said: I assume you mean this is the answer? (Place a panel between the floating window and the other views, and create a OnTouch handler for this panel (even empty).) I'm not sure how to do this..... Can you explain please? Thanks Andy. Click to expand... Placing a panel on screen and creating an empty Panel_Touch handler is very basical. So what's the thing you don't understand ? Upvote 0
ClassicDancer said: I assume you mean this is the answer? (Place a panel between the floating window and the other views, and create a OnTouch handler for this panel (even empty).) I'm not sure how to do this..... Can you explain please? Thanks Andy. Click to expand... Placing a panel on screen and creating an empty Panel_Touch handler is very basical. So what's the thing you don't understand ?
C ClassicDancer Member Licensed User Longtime User Oct 23, 2012 #6 What sounds very basic to you obviously isn't basic to a new android programmer. I have a main activity window and within this activity I have setup a Floating window to update a database entry. When the floating window shows its self the background activity can still receive focus and events. In principle I understand what you are saying, however to implement it I am not sure how to cover the activity window with an empty panel etc.... Regards, Andy Upvote 0
What sounds very basic to you obviously isn't basic to a new android programmer. I have a main activity window and within this activity I have setup a Floating window to update a database entry. When the floating window shows its self the background activity can still receive focus and events. In principle I understand what you are saying, however to implement it I am not sure how to cover the activity window with an empty panel etc.... Regards, Andy
Informatix Expert Licensed User Longtime User Oct 23, 2012 #7 ClassicDancer said: What sounds very basic to you obviously isn't basic to a new android programmer. I have a main activity window and within this activity I have setup a Floating window to update a database entry. When the floating window shows its self the background activity can still receive focus and events. In principle I understand what you are saying, however to implement it I am not sure how to cover the activity window with an empty panel etc.... Regards, Andy Click to expand... Code: Copy Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.Transparent Activity.AddView(pnl, 0, 0, 100%x, 100%y) Code: Copy Sub MyPanel_Touch(Action As Int, X As Float, Y As Float) End Sub If you succeed in using my Floating Windows class, I really don't understand why you're stucked on such a basic thing. Upvote 0
ClassicDancer said: What sounds very basic to you obviously isn't basic to a new android programmer. I have a main activity window and within this activity I have setup a Floating window to update a database entry. When the floating window shows its self the background activity can still receive focus and events. In principle I understand what you are saying, however to implement it I am not sure how to cover the activity window with an empty panel etc.... Regards, Andy Click to expand... Code: Copy Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.Transparent Activity.AddView(pnl, 0, 0, 100%x, 100%y) Code: Copy Sub MyPanel_Touch(Action As Int, X As Float, Y As Float) End Sub If you succeed in using my Floating Windows class, I really don't understand why you're stucked on such a basic thing.
C ClassicDancer Member Licensed User Longtime User Oct 23, 2012 #8 I've already tried that but the panel does not show. Upvote 0
Informatix Expert Licensed User Longtime User Oct 23, 2012 #9 ClassicDancer said: I've already tried that but the panel does not show. Click to expand... ????? You want to show a transparent panel ? With you, I'm completely lost. 1) Add this code between the creation of w(3) and w(4) in my demo #1 (line 122): Code: Copy Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.ARGB(220, 128, 128, 128) MainPanel.AddView(pnl, 0, 0, 100%x, 100%y) 2) Add the event handler sub from the last post and you'll see that some windows are still accessible, others are not. The panel acts as a blocker. I colored it in gray to make it visible. Upvote 0
ClassicDancer said: I've already tried that but the panel does not show. Click to expand... ????? You want to show a transparent panel ? With you, I'm completely lost. 1) Add this code between the creation of w(3) and w(4) in my demo #1 (line 122): Code: Copy Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.ARGB(220, 128, 128, 128) MainPanel.AddView(pnl, 0, 0, 100%x, 100%y) 2) Add the event handler sub from the last post and you'll see that some windows are still accessible, others are not. The panel acts as a blocker. I colored it in gray to make it visible.