Fullscreen Activity in Android?
How do I make an activity full screen? Without the notification bar. 38 s 38
How do I make an activity full screen? Without the notification bar. 38 s 38
In an Android application, how do you start a new activity (GUI) when a button in another activity is clicked, and how do you pass data between these two activities? 27 s 27 Easy. Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class); myIntent.putExtra(“key”, value); //Optional parameters CurrentActivity.this.startActivity(myIntent); Extras are retrieved on the other side via: @Override protected … Read more
I know how to get the root view with View.getRootView(). I am also able to get the view from a button’s onClick event where the argument is a View. But how can I get the view in an activity? 12 s 12 If you need root view of your activity (so you can add your … Read more
I know that Activities are designed to represent a single screen of my application, while Fragments are designed to be reusable UI layouts with logic embedded inside of them. Until not long ago, I developed an application as it said that they should be developed. I created an Activity to represent a screen of my … Read more
I am trying to work on sending an object of my customer class from one Activity and display it in another Activity. The code for the customer class: public class Customer { private String firstName, lastName, Address; int Age; public Customer(String fname, String lname, int age, String address) { firstName = fname; lastName = lname; … Read more
How can I pass an object of a custom type from one Activity to another using the putExtra() method of the class Intent? 35 s 35
The activity hosting this fragment has its onActivityResult called when the camera activity returns. My fragment starts an activity for a result with the intent sent for the camera to take a picture. The picture application loads fine, takes a picture, and returns. The onActivityResult however is never hit. I’ve set breakpoints, but nothing is … Read more
I want to create a transparent Activity on top of another activity. How can I achieve this? 24 s 24 Add the following style in your res/values/styles.xml file (if you don’t have one, create it.) Here’s a complete file: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <style name=”Theme.Transparent” parent=”android:Theme”> <item name=”android:windowIsTranslucent”>true</item> <item name=”android:windowBackground”>@android:color/transparent</item> <item name=”android:windowContentOverlay”>@null</item> <item name=”android:windowNoTitle”>true</item> <item … Read more
In my activity, I’m calling a second activity from the main activity by startActivityForResult. In my second activity, there are some methods that finish this activity (maybe without a result), however, just one of them returns a result. For example, from the main activity, I call a second one. In this activity, I’m checking some … Read more
In my Android application, when I rotate the device (slide out the keyboard) then my Activity is restarted (onCreate is called). Now, this is probably how it’s supposed to be, but I do a lot of initial setting up in the onCreate method, so I need either: Put all the initial setting up in another … Read more