Questions tagged [rootview]
In view based mobile application(iOS/Android) rootview provides interface between window and otherview.
147
questions
0
votes
2
answers
193
views
having problem in a fragment view (View Root) in android studio
'''
public class HomeFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View root =...
0
votes
1
answer
229
views
how do i find the root view in my android studio project?
i'm using a template for a navigation menu provided by android studio and i noticed the main activity sets the content view to a root view but I'm not sure which XML file that would be? I'm assuming ...
1
vote
1
answer
226
views
Compose app - Is it possible to programatically get component tree information from RootView/DecorView?
Our SDK can't be inline with app's code, is there a way to retrieve UI tree info without app developer manually add code snippets to capture the "Component Tree" data without using the ...
0
votes
1
answer
376
views
How can i anchor a Snackbar to the android soft navigation bar?
Thank you in advance!
I decided to implement a Snackbar with this method (which will later be called in onClick method):
public void showSnackbar(int selector, int textSelector){
String sOne = (...
3
votes
1
answer
516
views
Casting UIWindow.rootView to UIHostingController<View> which has environment variables
Casting UIWindow.rootView to a hosting controller like:
window?.rootViewController as? UIHostingController<MainTabView>
works fine, unless it has environmentObjects.
As my MainTabView has been ...
3
votes
1
answer
1k
views
Is there a way to load swiftUI view into NSView?
I would like to know if it's possible to load a SwiftUI view into an NSView.
I was hoping to set the windows content view to aSwiftUI but it seems impossible
window?.contentView = view where view is ...
0
votes
1
answer
296
views
Get specific type of view from parent view
Do you guys know if there's a proper manner to get all specific view types from the parent view as the title says?
I would like to get all the EditText views from my activity, so I wonder if there's a ...
0
votes
1
answer
482
views
Modify launch view when app is running in the background SwiftUI?
I understand that, in SwiftUI, the initial launch view is dependent on the Scene Delegate.
So, with something like this:
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options ...
0
votes
1
answer
905
views
How do I open a view controller from the app delegate?
I want to open the "Menu View Controller", when a local notification is opened from the Notification Center. My problem is that I do not know how I can open a view controller from the AppDelegate. All ...
0
votes
2
answers
487
views
Set root view controller iOS 13
I want to set root view controller after user login successfully. I implement below code and work well on below iOS 13 but when I run in iOS 13 simulator it's not work for me. Please guide how to set ...
0
votes
1
answer
417
views
How to create a service with addView() using WindowManager in Android
I had gone through many solution available online but I didn't fine appropriate.
Basically i wanted to utilize following parameters using service
getWindow().addFlags(WindowManager.LayoutParams....
0
votes
0
answers
118
views
Replacing specific fragment by using fragment transaction
In Android, I have added several fragments in Linear Layout by using Fragment Transaction. Is there any specific way by which a specific fragment in the Linear Layout can be replaced and not all of ...
10
votes
5
answers
13k
views
Set rootViewController iOS 13
After upgrading Xcode a critical part of my application has stopped working.
When my app launches I run a function to check boolean flags and set the correct rootViewController.
But the code I have ...
0
votes
0
answers
36
views
How to Conditional Return inflater in Volley Request - Android
i have a problem in Develop Android in Android Studio. when i try to get data with Volley, i have two root to display in fragment android. and I want conditional return for root view.
this my code
...
0
votes
0
answers
1k
views
android.view.ViewRootImpl cannot be cast to android.view.View
enter code hereI'm trying close popup when touch outside popup.My vode working API level 23+ .but not working API level 17.
Thank You in advance.enter image description here
LayoutInflater ...
0
votes
1
answer
26
views
Android - Getting Objects in Multiple RootView
public class OccuMechanical extends android.support.v4.app.Fragment {
private View v_schedule;
private LinearLayout layout_schedule;
private ImageButton iv_add_schedule;
private int ...
1
vote
1
answer
834
views
tracking all touch events
Situation
I want to implement a timeout in my app. If the user did not touch the screen within 2 minutes an inactivity fragment will be shown.
What i got so far
I am tracking the activity lifecycle ...
2
votes
0
answers
81
views
How to get value from a TextView which is in a ListView without any custom adapters?
I have a ListView with a TextView (which has an integer as string) and a Seekbar.
I need to extract the integer value and set it to the Seekbar.
Unfortunately, when I do this, I get a NullPointer ...
0
votes
4
answers
839
views
What do you mean by root view of an activity?
I have a very trivial confusion regarding the what is the root view of an activity. I searched this throughout google and stack overflow. I got some knowledge about it but didn't come to a convincing ...
0
votes
1
answer
2k
views
Is there any way to get root view of an activity from a service?
I am working on an app in which I have to get all the views of the top most activity. This activity may or may not be of my app.
I am able to get all the views from a ViewGroup(root view).
Now I just ...
0
votes
2
answers
1k
views
Navigation Bar Disappears Change Root ViewController and then reassign
I've made the launch screen the root view while my app makes a request to firebase and then reassign the root view once the request has been completed. Unfortunately when I do this my navigation bar ...
-1
votes
3
answers
1k
views
Can't remove view from root view
i add the view to the rootview in that way
private RelativeLayout addThisView;
private View rootView;
LayoutInflater inflater = LayoutInflater.from(mContext);
addThisView = (RelativeLayout) inflater....
1
vote
3
answers
3k
views
How to go back to the initial ViewController the right way?
I have a few view controllers with navigation bar and tab bar. Then I have an initial view controller with no navigation bar and tab bar. I want to go back to the initial view controller with no other ...
0
votes
0
answers
55
views
How rootview tree's draw method is called in android?
I want to replicate the root tree in android without bitmaps i.e I want the android component to render root tree as many times I need.
For this I want to know where the draw method of RootView is ...
0
votes
1
answer
1k
views
Capture Screen Android, but not my App
Hello everyone I will try to be as clear as possible .... I have a method in which I get the Screen of my App, what I would really like is to be able to use my method to get Screen from other apps, or ...
0
votes
1
answer
265
views
setText does not work in the TextView of the ViewGroup that references xml in the service
this code
...
private LayoutInflater layoutInflater;
private ViewGroup rootView;
int wrap_content = WindowManager.LayoutParams.WRAP_CONTENT;
...
linearLayoutPopup = new LinearLayout(this);
...
0
votes
1
answer
642
views
iOS swift popToRootViewController fire function in rootViewController
In my app I go back to rootViewController via:
self.navigationController?.popToRootViewController(animated: true)
Now i want to call a function from my rootViewController only when i come back using ...
96
votes
8
answers
36k
views
Swap rootViewController with animation?
Im trying to swap to another root view controller with a tab bar; via app delegate, and I want to add transition animation. By default it would only show the view without any animation.
let tabBar = ...
1
vote
1
answer
2k
views
How can I set rootview of a viewcontroller when I have set Tabbar in appdelegate swift?
I have set UITabBarController in AppDelegate and I have set the root view to tab bar object. But I need to set root view to another view controller without losing the functionalities of tab bar. How ...
0
votes
2
answers
67
views
Constantly passing data between two view controllers iOS
I'm new in objective-c. I try to send data between 2 view controllers (for example controllerA and controllerB), but I need this data constantly, so I use _displaylink in controllerB to call method ...
0
votes
1
answer
141
views
How to open a screen from appdelegate.m handleOpenURL method with REFrosted Sliding Menu & storyboards?
I am updating one of my application that uses URL Scheme. I used to have application:handleOpenURL method in appdelegate.m with following code that used to work fine from long time (without ...
-2
votes
1
answer
155
views
Exception: android.widget.LinearLayout cannot be cast to android.widget.ImageView
I need to set the images to grid view dynamically. but i'm getting exception: android.widget.LinearLayout cannot be cast to android.widget.ImageView
I need to get the view of the grid without onclick....
1
vote
2
answers
896
views
Android Screen Capture using root view
I am trying to capture the screen
View decorView = activity.getWindow().getDecorView();
decorView.setDrawingCacheEnabled(true);
Bitmap bitmap = decorView.getDrawingCache();
Everything is ...
0
votes
1
answer
456
views
Root view controller margins being set to odd values
For some reason, my UIWindow's rootViewController is having its margins set to 16 on the left and right, and 0 on the top and bottom. Unfortunately I'm working with a legacy (read: non-storyboard) ...
1
vote
3
answers
3k
views
self.window.rootViewController.presentedViewController returning nil
self.window.rootViewController.presentedViewController
always returning nil though there is viewController available.
Not sure what i am doing wrong.
Below is the full code-
- (...
1
vote
0
answers
374
views
How to avoid Presenting view controllers on detached view controllers
I have 4 storyboards : Intro (Root), Loading, ChooseHouse, Home
If user logged i set Loading as root for loading data of that user like that on my didFinishLaunchingWithOptions method :
func ...
1
vote
1
answer
439
views
How to Change Root View from anywhere in appliction in iOS
I have developed an app without storyboard.
I have a functionality of Logout. When user click on logout then I have to redirect him to the sign in page and clear all navigation stack and make sign in ...
1
vote
1
answer
86
views
Open a View that is not the root one and keep the tabbarcontroller from the root view (swift)
Hi guys I have an application with a view organization like the picture bellow:
Views:
My Application has to open View B (from the picture) when an user opens an attachment (I have another question ...
0
votes
1
answer
142
views
Are there any alternatives to getting the rootViewController besides through app delegate
I am working on a deep linking app where I need to assign the delegate of my deep link manager to my subclass of the tabbarcontroller
How can I return the root tabbarcontroller from inside the ...
0
votes
1
answer
629
views
android get childview from Linearlayout
I try to create My own PinView.i created it but i have one problem.i try to explain my problem
i created four textviews and added it in Linearlayout and this linearlayout added my container (layout ...
2
votes
1
answer
723
views
iOS - Getting black view upon changing root view controller
I am trying to change the root view controller upon the button taps from ViewController1 to ViewController2 and vice versa. Problem is I am getting black screen after I set my second view controller ...
2
votes
1
answer
767
views
Swift Toast message is not display "UIApplication.sharedApplication().windows"
i have add one Toast message first time is working Good , but When i use This code in appdelegate file toast message is not working
Here is my code i am using in app delegate This Code "...
0
votes
1
answer
601
views
How to set properties of a root view controller before being presented?
I have a certain UINavigationController in storyboard I present modally from another view controller:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
...
0
votes
1
answer
201
views
Heyzap Ad Mediation, only work for rootviewcontroller
I started using Heyzap today to integrate multiple ad
networks in my iOS project. The integration went well as shown in the image below.
However, I run into problems while trying to show ads. I get ...
0
votes
2
answers
2k
views
Changing root view controller in the background
I have the following view controllers stack.
First, my app will show an app tour page. (Say TourViewController - super class is UIViewController). Added this controller in AppDelegate as ...
0
votes
0
answers
544
views
when i logout and open the app again it goes into rootview not login iOS
I have made a app with the rootview the inbox. i then logout and it goes to login page which is fine but then when i close the app and open it again it goes to inbox.
i am using parse.com and have ...
2
votes
0
answers
33
views
android rootview malfunctionning
I'm creating a fragment that contains two listviews ,the two in a linearlayout that has as orientation:horizontal;
the second listview is in a horizontalscrollview;
the problem is in the second ...
0
votes
0
answers
89
views
How to call view from DatePickerFragment
package org.jaberrio.personai2;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
import android.os.Bundle;
import ...
0
votes
1
answer
48
views
Add UINavigationController to navigation stack
I have two UINavigationControllers like this:
LoginNavigationController -> LoginView
HomeNavigationController -> HomeView -> ...
From LoginView I navigate to HomeView modally like this:
[...
0
votes
2
answers
260
views
iOS skipping login view with rootViewController causing black bar bug in nested TableViews
I'm skipping my initial view controller (a login page) once a user successfully logs into my app and chooses to store their credentials.
My new root view controller is a TabBarController because my ...