Android :: Change Behavior Of Layout Display When Launching Intents?
Dec 21, 2009
I have an app where pressing button on the screen launches an intent with a new screen and buttons. Everything is working very well, but I'm got one small visual problem. When I press the button on screen on my phone, the new page slides in from the right, pushing the old page off screen left. This happens very quickly, but the overall effect is a bit jarring. Is there a way to stop pages from display this way? If possible, I'd like the page to just appear over the old page, without any scrolling.
Is this possible in Android?
View 2 Replies
Apr 6, 2010
On the market, there's an application called App Protector, which seems to effectively block the launching of configured activities until a password is correctly provided. By default, it blocks access to itself (not very interesting), Settings, and a few others. I wrote my own app to launch settings (rather than doing so through the home screen) and App Protector continued to do the job it claims to do.
When an activity that is protected is started, App Protector's password input activity is shown instead. Once the correct password is provided, the activity that was started comes to the front.
First -- does anyone know how this app is able to get between the rest of the system and the activities it protects? I would like to do something along these lines in my own application as well. Perhaps this app is receiving a broadcast about other activities coming to the foreground, and when the foreground activity is protected, it forces itself to the foreground?
Second -- does anyone know how well this technique will stand up to attack? Are there other ways to circumvent, where start Activity(...) fails to? It seems that one could use adb to un install it, thus removing its protection easily, but if I pursue my plans here, the app will be a part of a device's firmware (which, I assume, offers some protection against its apps being installed?)
View 2 Replies
View Related
Aug 9, 2010
I am implementing a simple app. I need to start an activity based on the state of the Activity. Lets take i am using a button to start the activity.
1. If the activity is not started, I need to start XYZ activity.
2. If the XYZ activity is on focus, then i need to close the activity on the button press.
3. If the XYZ activity is not in focus (like onPause) state then, I need to change the button state.Can you please help me in the flags that i need to use for starting the intent. Is it possible to get the state of activity before I start that activity?
View 2 Replies
View Related
Dec 11, 2009
I realize this might not be the proper place to post this since it's not Android specific, but rather its about integrating with a google app.
I've been trying to find some documentation on launching / controlling the Google Navigation app via Intents or otherwise. I was hoping to find an intent to launch the navigation app with address parameters setup and start navigation immediately.
Can't find anything out there, so I'm still not even sure if it can be done.
View 8 Replies
View Related
Jul 5, 2010
My problem is thus; I am new to programming on the ANDROID platform and have a 'working' application that piggy-backs on the API-Docs example. I wish it to launch three tabs one containing a list of reports, one a form to file a report and the last to show the geo-located reports. It doesn't appear as a separate application, it instead appears as a list to be launched by the API-Docs example.
Below is my manifest code...
View 1 Replies
View Related
Jul 3, 2009
My problem is that I would like a button (e.g. Next) to be at the bottom of the screen, unless the content is larger than the screen, in which case it should be scrolled.
I can achieve having a layout at the bottom (either trough RelativeView layout_alightToParentBottom="yes", LinearLayout with a View with weight="1" and layout_height="0", or a TableLayout expandRow). However, with each one, once it is wrapped with a ScrollView, the button is brought up next to the previous component, and cannot be glued to the bottom. The ScrollView is not active (needed, components height less than the screen height), yet it affects the components in it. Is that a bug? Is there a way around it?
As I resorted to having alternative layouts for Landscape, 320x240 and code.
View 3 Replies
View Related
Mar 6, 2010
I would like to do two things within my Android app: Check if the Google Finance app is installed on the device. Should be pretty straight forward, isn't it ? If yes, launch an intent to Open up Google Finance, displaying a graph on a particular Stock. So I also need to pass the stock ticker to Google Finance in some way... but is this even possible? Any other alternative I could use to display Stock Charts (let's say a 5 days intraday chart) on any stock?
View 2 Replies
View Related
Oct 27, 2010
I want to change the behavior of back button,
I have 3 activity, activity1, activity2, and activity3
another activity, activity4 is a login activity
start ->activity1-----click---->Activity2-----click---->activity3
CODE:......................
Now my question is that, when i click on apps, i want to start activity4. I'm not able to do this, always start of application is opening the activity2 in this case (back button).
View 2 Replies
View Related
Jun 18, 2010
Is there any way i can make my listactivity (rather listview) highlight the List Item when it is clicked (pressed) upon? (...and remain highlighted) The default behavior, simply highlights the item for a moment, and it gradually fades to black... Currently, the highlighting only happens when we use the DPad... It'd be ideal if atleast one list item is "highlighted" at all times. Worst case scenario, i may have to keep track of the "last clicked item" (by default the first) and change its background or something...but i was hoping there was an easier way...
View 1 Replies
View Related
Dec 24, 2009
I wrote a http proxy on Android 1.5 four months ago. It can work properly on both 1.5 and 1.6 emulator, with APN proxy setting to 127.0.0.1. However, when i port this app to 2.0.1, it's not working anymore. Did browser on emulator 2.0.1 change its behavior? It seems that the browser no longer consider APN proxy as http proxy anymore. Or it's simply a bug on emulator?
View 2 Replies
View Related
May 1, 2010
Three Droids in the family, had for approx 1 month, with no real battery problems other than drain with GPS use. Battery usage extremely predictable. Until yesterday. Day before yesterday, wife's phone reported battery charge of ~30% after being on media dock charger all night. Figured it was a connection glitch of some kind. Happened again today, then while I was looking at the phone, battery went from ~20% to 100%. Now seemed more like a status reading problem. Picked up my phone from its media dock - a different one - and surprise surprise, it too was reading ~30% after being on dock charging all night.
(Yes, we have power and the docks are plugged in.) Powering down phone doesn't reset status, still reads ~30%.
View 3 Replies
View Related
Jun 26, 2010
Hello there I have a problem regarding the new HTC Magic I purchased : in my text display where I read the conversations between me and my contacts... it has all of the messages I sent in 1 group together, and all of the messages my contacts have sent together. How do I change this to display the order in which they were sent and received? For example right now it is
ME : blahblahblah
ME : blahblahblah
ME : blahblahblah
You : blahblahblah
You : blahblahblah
You : blahblahblah
View 3 Replies
View Related
May 21, 2010
I have the following linear layout. What I don't understand is if I set the background to another image, the padding information are reset. Is there a way to prevent this?
<LinearLayout android:id="@+id/aPanel"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="@drawable/bkground"
android:paddingLeft="15dp" android:paddingRight="15dp">
<!-- some children here -->
</LinearLayout>
I see the position of the children get shifted when I change the backround drawable of the linearlayout 'aPanel'.
View 1 Replies
View Related
Nov 7, 2009
I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...
View 3 Replies
View Related
Jul 27, 2010
I have a single activity with multiple views that represent different steps in a wizard. I have gotten code working that will save and restore the wizard to the correct screen, but after a save/restore cycle I cannot seem to get setContentView to work. The code executes without throwing any exceptions but the view isn't actually updated. Why would this be happening? SOLVED I was using a handler to change screens, but on restore I wasn't using the newly constructed one, so messages were being sent to a handler that didn't have control of the screen.
View 1 Replies
View Related
Nov 18, 2010
simple question. In a class, if I wanted to set the text to the text value of a string I have, what is the code for that?
I have: TextView textView = (TextView) findViewById(R.string.noFaceFive); textView.setText(textView);
but setText says : The method setText(CharSequence) in the type TextView is not applicable for the arguments (TextView)
is there a set Text to display the text of a string? Serious mind fart on my part.
View 1 Replies
View Related
Mar 1, 2010
I would like to know if it's possible to display an activity inside a layout of my activity. For example I would like to display the Phone application inside a layout of my activity.
View 3 Replies
View Related
Nov 5, 2009
I have a webview I'd like to display as a dialog. I'd like the webview to fill the entire screen, except for a button below it that I'd like to stay at the bottom of the dialog regardless of how much content is in the webview. Currently my webview fills up the dialog just enough to push the button off the screen. I'm sure this is something pretty easy but for the life of me, I haven't been able to find the magical combination of layouts, views and attribute values to get it to play nice. Just to be clear, I've gotten it so the button floats over the webview but I'd like the webview to stop just above the button and scroll, if that makes sense.
CODE:..............................
View 2 Replies
View Related
Jun 8, 2010
any one guide me how can i display remote image in my layout imageView?
View 1 Replies
View Related
Jul 7, 2010
I try to add a table layout from Java code. When there are two fields in a tablerow it displays the first field only. How to display the entire row with all fields?
code... How to do this?
View 1 Replies
View Related
Jun 22, 2009
I'm new in Android. I searched a lot to get a table with borders, but I am not getting result.
I want a table with two colums, borders, white backgroud in table. first colums should be right aligned and second column should be left aligned.
With TableLayout, rest of things can be done, but not I can get table with border in display.
View 2 Replies
View Related
Nov 22, 2010
In Android, I wrote a number of strings in my string.xml I would like to display on a TextView based on a random number...code...
But I know I am not doing it right because I get the error:
The method array50(int) is undefined for the type MAIN. Any ideas?
View 2 Replies
View Related
May 1, 2010
So this is related to a question I asked earlier. I am trying to display an alert using a specified layout. My layout is:
And the code to call and show the alert dialog is..
When I run it I get an error saying:
Uncaught handler: thread main exiting due to uncaught exception
android.view.WindowManager$NadTokenException: Unable to add window -- token null is not for an application
I've looked through the android development site and can't figure it out. I think I'm just missing something obvious but the fix isn't jumping out at me. How can I get this alert dialog to display?
View 1 Replies
View Related
Oct 4, 2010
I want to display GridView (with text and image) and group of text box below grid view.
Problem is my gridview do not have fixed entries. It is varying between 1 & 10. I want to resize it as per count of items in grid view. How can i do that? Where can i get height of gridview in JAVA code?
Also, i want to display my group of text boxes ALWAYS at bottom of activity. How can i do that?
View 1 Replies
View Related
Nov 10, 2010
I need the code to display a label in the layout and attach a timer and keep on updating it. since i am new to android i need some help on this context.
View 1 Replies
View Related
Nov 12, 2009
In my android application, I have an Edit Text. When I click in this field, the soft keyboard appears, expanding from the bottom of the screen. It seems to actually modify my layout, pushing contents up wards. When I dismiss the keypad, it retracts, and I see my layout re-expand to take up the space it previously occupied. Is there a way to get the keyboard to simply appear "on top" of my layout, so that I don't get this somewhat unpleasant relayout animation? The Edit Text is pinned to the very top of the screen, so I don't have to worry about the keypad hiding it.
View 2 Replies
View Related
Apr 22, 2010
I am using a ListView to display my custom item layout, which may contain some TextViews and an ImageView.
This is the item layout I made (post_item.xml):
CODE:........................
I don't put the ImageView initially in the xml layout, but I will insert it when I need to the FrameLayout programmatically (I also put another views in it when needed). So, there will be some items which has ImageView in it and which don't.
I get the image to fill the ImageView from the Internet (through URL), decode it as Bitmap, and keep it as a Bitmap variable in a class represents the custom item layout (class PostItem).
When the activity shows for the first time it looks fine, but as I scrolled through the items then a problem showed up, the items which shouldn't show any image show the image from the other item which should, although they don't have any ImageView (because I didn't insert it).
I am using SDK 1.6 and the emulator. Haven't tried it in real device because I don't have it.
Here is my code for the Adapter:
CODE:..............
And this is the code to prepare the items:
CODE:.........................
Is this the bug in the emulator or there is some mistake in my code (probably memory problem for the Bitmap)?
View 1 Replies
View Related
Aug 3, 2010
If I want to dynamically display graphics or text in layout, can I still use xml or I have to hard code?
View 2 Replies
View Related
Jun 16, 2010
I'm setting background color based on a given state of an object in each row in a list. That part is working just fine but when I set the background color on the outermost layout the row no longer highlights when selected. Probably a specific attribute I'm not setting/changing?
View 3 Replies
View Related
Jul 5, 2010
When I click the ListView in layout1, it will go to layout2 and show some imformation. But when I click the button I designed to back to layout1, I can't see the ListView. Just black background.
Here is the Button code:
CODE:..................
View 1 Replies
View Related