Android trouble in proceeding the activity - java

I am new to Android development. I have seen a few tutorials and some textual references also. So I have a basic idea of Android. I am currently facing a problem while writing the JAVA code. I am unable to grasp the concept of what should be my next step while writing the code. Eg. I want to create an application for online attendance. I decided to have a text box for roll number and a 'submit' button to submit the attendance. Now in my Main.java file , after creating a button object, I am not following what my next step should be.
Similar situations arise when I try to make a jump from one page to another page.

I assume that you have managed to add a click listener to the button so, now you have to use intents to transition between activities.

Related

I could do two different NavDrawers in the same Android App?

my problem is that:
I want to make a login service in my application and depending on which user logs in, go to a different NavDrawer activity. In Android Studio when you create the NavDrawer activity that comes by default, it generates one perfectly. But when I want to generate a different one, having the same name doesn't create anything.
The only way I have found is by refactoring everything generated by the Android Studio wizard and changing all the names of the layouts.
I would like to know if there is an easier way to create another NavDrawer without having to refactor so much and without so many errors.
Thank you!
NavDrawers Generated
Conceptual Scheme
Its Solved, you only need to make an instance of one of these nav drawers and then extend that to another one.

Clear Network tab using Selenium Java

I am trying to load a page, and I am automating the process of checking for a POST request after a button is clicked.
In order to do this, I need to clear the Network tab of all previous entries before the button is clicked, otherwise it will not show up on the list for some reason.
Is there a way to do this via logging or some other means in Selenium Java?
As far as I know, there is no way to interact with Chrome's dev tools as you intent to. Alhough, if you are interested in obtaining/parse data from the Network tab in Chrome you can do that following their quick tutorial in their website here.
I don't know what is you idea but here I leave you 2 cents.
Perhaps you could access this data and work it elsewhere instead of constant refreshing.
Here is a similar question to yours.

How to Identify a button that doesn't get identified through Android uiautomateviewer?

I am trying to automate an Android app with Android UIAutomator. When i tried to identify objects via android uiautomateviewer it doesn't list details of all the objects on the page, rather it gives me the details of the main frame. Buttons that are located inside that frame does not capture through Android uiautomateviewer.
Question: Is there are way to identify buttons that were located inside that frame ?
Can we use UiSelector method for this purpose? If yes how?
Is the a web app or a web page? If so, UiAutomator can't read those.
If it's a normal app (it happened to me with one app I had on my phone), then it's a problem with the app itself (not sure what exactly).
In order to fully answer your question: if it's not visible/detected by UiAutomatorViewer then it's not visible/detected by UiAutomator.
One example of this: when a pop-up is opened we usually can still see the contents behind it. However, for UiAutomatorViewer and UiAutomator, that pop-up is the only thing that's currently on the screen.

java open web page without focus

I made a small program in java
is like a rss checker but when find something I launch this,
java.awt.Desktop.getDesktop().browse(URI.create(relHref));
But now I have a problem,
every time this event trigger i lose focus on the page/program. I wanna open the page without loosing it. Is this possible?
For instance: If I'm watching a movie and the event start i get the focus on the page and I have to stop/restart the movie.
This is almost the same problem i have
Java open html in background but is without a solution :-(

Tab problems in Android/Eclipse

I am new to android development/eclipse and have run into a problem. I have 3 working apps that I programmed that work by themselves. One of these is a app that simply displays 2 tabs that when clicked don't really do anything. What I need to do is integrate my three programs together so that when you click on the tabs they start the other 2 apps. My biggest problem right now is the layout. I have them all together and compiled with no errors, but when I run it everything is displayed with the tabs and its a mess. My question is, how can I make it so that only the right stuff displays only when a tab is clicked. My xml file is a jumbled mess with like three different LinearLayouts. I am so new I don't know where to start. Any help would be greatly appreciated!
Brian
What is displayed on the screen at one time is called an Activity. Looks like you want 3 activities, but what you have is only one Main Activity. You should display the 2 tabs on the Main Activity and then use an Intent to change between activities, when you press on the tabs.
For a reference, you can refer to the android developer site: http://developer.android.com/training/basics/firstapp/starting-activity.html
I hope this helps!

Categories

Resources