Android :: How To Get Rid Of The Extra Gap Between A Button And Other Views
Feb 17, 2010
When I created a button view, Android always create some extra space between this button and other views below it.
In this example below, there is a button above the second button. You can see the gap between these two buttons. How can I get rid of this gap?
CODE:................
View 3 Replies
Aug 3, 2010
I came over to Android from Windows Mobile and hate when typing numbers you have to press an extra button. Is there a way I can have it so I only have to tap one button to type a number?
View 2 Replies
View Related
Aug 19, 2009
I'd like to have code sample (xml & java) of how I can overlay buttons (any view) into a camera video preview. Of course I'd like real Buttons : no bitmap of the button over a video. I need to keep the clicked event, button pressed/up functionality, etc
Where can I find such Tutorial ?
View 3 Replies
View Related
Jan 6, 2010
I have a simple ListView and on that ListView I have placed a number of custom defined Views. The CustomView has ImageView and two TextViews.
The CustomView also has a "stateful drawable" as background, so that the background image (a 9-patch) changes if you press the Row in the ListView. When pressing the Row, the background image changes to a Red-ish thing.
The problem is that when the background changes from the default greyish, all the Views in the CustomView (ImageView and TextViews) still have their greyish background and thus creates very ugly greay boxes on top of the now redish background.
What is the best way to solve that problem? I hoped that such things were handled automatically (as it is done in for example .NET), but I was wrong it seems.
View 1 Replies
View Related
Nov 16, 2010
I am implementing a music player application in Android. My play list selection screen is implemented as a tab selector widget which contains a ListActivity inside each of the tabs: Artist, Albums, Songs.
I want to update the ListView in each of the ListActivity when I delete an item from any of the lists.
i.e. When I long press an item in the Artists list a context menu is drawn with "Delete Artist"
And it should delete all the songs from this artist in the Songs ListView, delete all the albums by this artist in the Albums ListView, and finally delete the entry for the artist in the Artist ListView.
Each of the ListActivity has its own fillData() method, which updates the ListView when the button in the context menu is pressed.
How can I call the fillData() method of the Albums ListActivity after I update the ListView inside of the Artists ListActivity?
View 1 Replies
View Related
Feb 28, 2010
I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content.
I tried using inflator inflate(int,view) method, but at runtime it showed up with error.
Here is the XML code for the layout file defining the table
CODE:.................
View 1 Replies
View Related
Mar 6, 2010
I have the following XML code:.................
The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this.
Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup.
View 5 Replies
View Related
Jun 16, 2010
How do you align views relative to the "middle" part of another view? I think it is best explained with a pic of the UI I'm trying to create in android.
View 2 Replies
View Related
Jan 25, 2010
Is there any way to query a root view of an activity for all of its child views even before the root view or its children have been inflated? I guess what I'm looking for is whether a view knows ahead of time what children it will have before it gets inflated, and can I get that list in some way. Bizarre I realize, but I think it will help me with some unconventional automation testing I'm working on. I haven't found anything in the API like this.
View 1 Replies
View Related
Mar 7, 2010
Let's say I have a LinearLayout, and I want to add a View to it, in my program from the Java code. What method is used for this? I'm not asking how it's done in XML, which I do know, but rather, how can I do something along the lines of (One View).add(Another View) Like one can do in Swing.
View 2 Replies
View Related
Jun 8, 2009
Is it possible to add extra languages to Android? My current Android phone only supports English and Chinese language input. I would like to have Dutch also, as I can use it for word completion. The question on top of that is, how to switch easily between these languages in the text input (keyboard) GUI?
View 5 Replies
View Related
Mar 19, 2009
When I run my app, I see about 8 or 9 icons in the main phone menu. One is to run the app, and the others actually run activities within the app.I want there to only be one icon for users.Any ideas as to why this is happening?My code is structured similar to examples from the book "Android - A Programmers Guide" by JF DiMarzio.How do I hide the other icons so users have to start at the main menu screen?
View 5 Replies
View Related
Jul 26, 2010
I have a iPhone 4G and I wanting to try a Galaxy S Captivate.it should be in soon.is there a way AT&T can give me a normal sim card and I can just turn my iPhone off while I use the Captivate or do I gotta switch the sim cards out?
View 1 Replies
View Related
Aug 3, 2010
I have this code: protected void onListItemClick(ListView l, View v, int position, long id)
super.onListItemClick(l, v, position, id);
Log.i(TAG, "The id of the selected note is " + id);
Intent editNote = new Intent(this, TaskEditActivity.class);
editNote.putExtra(TasksDBAdapter.KEY_ID, id);
startActivityForResult(editNote, EDIT_TASK_REQUEST);
}And this code that retrieves the extra FROM A DIFFERENT ACTIVITY: if (savedInstanceState != null) { id = savedInstanceState.getLong(TasksDBAdapter.KEY_ID); Log.i(TAG, "Id of note = " + id);In the first code snippet, Logcat says: The id of the selected note is 2, but in the second code snippet, Logcat says: Id of note = 0. What just happened here? Any solutions to this VERY annoying problem.
View 2 Replies
View Related
Aug 20, 2010
I've started to write a small app for android. It looks very nice, but there is one thing I don't understand.I've created a new intent in the activity A and I've added a serialized vector intent.putExtra("key", vector).
View 3 Replies
View Related
Oct 15, 2010
Is there any way to put an extra into the intent launched by a shortcut?
View 1 Replies
View Related
Aug 12, 2010
Say an app is 2 dollars, but but does your network also charge you a fee for downloading something?
so its like 2 dollars + a few dollars charged by your network? and this is all using my home WIFI.
View 1 Replies
View Related
Oct 6, 2010
I've built a widget that uses a LinearLayout and I've put two TextViews in the layout.
The gravity of the layout is "top".
The problem is that I get a space between the two TextViews and I can't get rid of it.
CODE:....................
As you can see I tried putting padding 0 and verticalSpacing 0 but I still get a space between them.
View 2 Replies
View Related
Sep 28, 2010
I have the following layout. This defines a row in my ListView. I noticed that the text is not centered in the row. There seems to be extra bottom padding. How can I make the text appear in the center, vertically, so there is no padding? code...
View 1 Replies
View Related
May 25, 2009
So I just bought 2 apps from the market.1 was 1 dollar,1 was 2 dollar.on my bank statement the 66p came out and the 1.32p.but after each transition there is also a 1 pound charge.is there a standing charge for buying apps?or am i getting ripped off?
View 2 Replies
View Related
Nov 19, 2009
How to know the list of available extra for a intent?For example, I want to know all available extra for ACTION_BATTERY_CHANGED. What is the method to know them?I have seen nothing on the official dev guide, reference in http://developer.android.com.I have seen nothing on watching the intent on debugger (on Eclipse)I have seen no methods on the intent documentation, like myIntent.getListExra()
View 2 Replies
View Related
Apr 13, 2010
I'm trying to pass an object from an activity to another activity. In the first activity i do:
Intent intent = new Intent(this, SecondsActivity.class); intent.putExtra("package.class", SerializableObject);
And in the second activity:
Class object = (Class) extras.getSerializable("package.class"); objetc.modifySomething(2432);
Intent intent = new Intent(this, ThirdActivity.class); intent.putExtra("package.class", SerializableObject);
But if i modify the object in the second activity, it fails when i send this object to a third activity.Why does it fail? What am i doing wrong? I just need to pass objects between diferent activities because i have an object which contains many information, and creating a Boundle would be very big and ugly in my code.
View 3 Replies
View Related
Dec 16, 2009
The product I have in mind is a Android phone with 32 GB of internal storage, plus the usual microSD expansion slot.
View 9 Replies
View Related
May 27, 2010
Based on the Searchable Dictionary sample I tried to put extra data to a different activity. In my Map Class Distance is always zero because distance.getSelectedItemPostion() gets the initialized value. How can I put Extra data with a click on a search?
View 1 Replies
View Related
Mar 24, 2010
i'm trying to find out what extra's there are for a specific intent.in the eclipse debug window i can see it has extra's , but i can''t find a list of those extra's. I also can't find a function to get all extra's into a human readable format.
View 4 Replies
View Related
Jun 28, 2010
I have a service that produces as result a SortedSet object. I need to pass it to another Intent that will use it. First is put in the notification area, then when the user actions it it will need to fire the activity.As it it's own SortedSet is not Parcelable nor Serializable so it won't work. One single item in SortedSet is already parcelable and it's used fine, but I need the whole set.How to pass a SortedSet as an Intent's extra?
View 1 Replies
View Related
Aug 23, 2010
I would like to disable/remove some of my unused homescreens. However, I don't want a program that completely hijacks my interface. So far I have tried pando, ahome, and open home. Can anyone suggest a way for me to delete some empty homescreens while not hijacking my interface.
View 1 Replies
View Related
Oct 26, 2010
Or is it essentially the same SDK/APIs as standard Android development?
View 5 Replies
View Related
Oct 30, 2009
I have some external sqlite files I'd like to include with my app. It looks like I can add them to the /assets folder, then read them from there? Is the /assets folder the appropriate location for them?
I've used SQLiteOpenHelper to open databases my app creates at runtime, which just uses a unique db name. Will the sqlite files in the assets folder also be accessible using SQLiteOpenHelper in the same manner?
View 5 Replies
View Related
Jan 31, 2009
Suppose I get a cursor that contains all rows from my database, and I want to show them on a spinner, the following code will work. But I want to show two extra items as the spinner elements, how can I add those two elements?
For example, if the following code can show 4 spinner elements "Orange" "Apple" "Cabbage" "Green Onion", how can I add an element in the spinner saying "All fruit" "All Vegetable"?
CODE:....................
View 2 Replies
View Related