Android :: Avoiding Softinput Specifically In One Activity?
Sep 29, 2009
I want to avoid softinput specifically in one activity in a very specific case.
When i *long press "menu" button *softkeypad is coming irrespective of the activity.
How can i avoid this? i have tried "stateAlwaysHidden" etc for that activity. But did it work.
Al other cases ok. Just this case* long press "menu" button*.
View 6 Replies
Sep 17, 2009
I have the following situation. I have a task with the following activity stack -- A - B - C I have a menu item that allows me to start activity D; so my activity stack looks like this -- A - B - C - D Then I could select a menu item that allows me to start an activity C, which would cause my activity stack to look like this: A - B - C - D - C Then I could go back (via the menu item) to activity D, making my activity stack look like this: A - B - C - D - C - D Doing this a few more times, it would wind up looking like this -- A - B - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D This seems kinda stupid to me. I'd like it to simply re-use an activity, or pop the activity below to be on top (which goes against the nature of a "stack"). So, what I mean is if I had this activity stack: A - B - C - D And I started activity C (from the menu), I would get: A - B - D - C And if I then started activity D (from the menu), I would get: A - B - C - D Is there a way to do this without keeping some global list of activities and doing gross things to them to reorder them?
View 3 Replies
View Related
Feb 24, 2010
I am currently showing a notification. When the user clicks this noticiation, the application is started. The notification persists, to indicate that the service is running in the background.
CODE:..............
However, I have detected a case where a bug appears. If the user starts the application through clicking the normal icon, and while the activity is running clicks the notification, then a new activity is started without the earlier one exiting, the later being on top of the earlier. And that is not all: Further clicks on the notification will create additional activities and place them on top of those already running. How can I prevent this? Is there a nice check to do to see if a certain activity is currently being shown or is loaded?
View 1 Replies
View Related
Mar 19, 2010
I would like to pausing or putting the application on background when pressing the back button, I don't want the application to go through the destroy state. Things are when I override onKeyDown and when I force to pause or stop the application by using onPause, I have some issuees with the wakelock and application crash, but when I press home button I go through onPause method and I have no exception, it's weird!
View 1 Replies
View Related
Jun 2, 2009
We have a dialog box that includes an EditText field. We'd like the softkeyboard to already appear in the dialog when the dialog opens instead of the user first having to touch the EditText field. I've read other posts and tried to incorporate the suggestions but there's something that I'm missing.
Here's my code from onStart (you'll notice that I'm calling several similar methods because from the documentation it's not clear : Code...
View 3 Replies
View Related
Dec 26, 2012
Just like the subject says, is there an app to transfer files (specifically mp3 files) from android to an ipod? I have used Google search to try and find an app and I have used Bump, Bluetooth, and Bluetooth file transfer.
SCH-I500
View 2 Replies
View Related
Sep 15, 2010
I'm looking to get an Android based phone and I thought I had decided on one, but since then I keep seeing other options and I'm not sure what to go with any more. It would be nice if anyone could point me to the best option for me. The only things I'm looking for in an android phone specifically is the ability to call, text (very little chance this won't be included :P) and GPS. I do not want a high-end one, and I certainly don't want one which has an enormous screen/form like the Desire, Galaxy S or likewise. I'm looking to spend no more than �250, but would prefer the option to be sub-�200 and possible to buy in the UK. I'm not looking for a contract or branded, and want to buy it outright, so importing can be an option assuming it's not troublesome. It's important that the tech be powerful enough that the UI isn't sluggish and is fairly responsive. A nice plus would be to have WiFi capability, with it being possible to tether. The phone I was originally looking at was the HTC Wildfire, and the only downside I could find about the phone was the screen resolution. Then I seen an announcement for the new LG Optimus One and became unsure and thought there may be another better option around.
View 2 Replies
View Related
Nov 11, 2009
Is there an Android Google group specifically for games development, especially using OpenGL ES?
View 2 Replies
View Related
Jan 26, 2010
If I installed a update.zip (icons specifically) and my phone didn't like it, can I flash something instead of doing a Restore?
View 1 Replies
View Related
Mar 27, 2013
How to activate Swype on the LG Spectrum 2 specifically? I had it on my LG Vortex and my wife has it on her Galaxy Tab 2.
View 1 Replies
View Related
Dec 18, 2009
What is the easiest way to create some kind of test harness for Android apps and to be able to visualize (even on the emulator) what is going into the db? I want to test things like constraints, look at the data, unit test methods, etc. Is there any kind of GUI tool that I can hook up to the emulator to be able to look at the db of a particular app while I'm developing/testing, or are my only options the adb shell and creating test Activities within my app?
View 1 Replies
View Related
Sep 29, 2010
Apparently you can't have a file in "assets" larger than 1MB (except for certain file types) because it's considered too large to uncompress. But I'm finding mixed info about how to circumvent this limitation. Some say that you can put the files in "raw" and avoid the limitation but others say that files in "raw" are compressed too.And there's the -0 aapt option that can be used to turn off compression for certain file types, but there's no way to specify aapt options in Carbide. I realize that I can break the file into pieces, but that's error- prone on both ends.And using one of the known uncompressed file types not only confuses things but also runs the risk that the Android PTB will decide to start compressing that file type.
View 6 Replies
View Related
Jul 3, 2010
I want to download an image from the 'net and set it as the users background. This works great over wi-fi, and some 3G networks, but others (T-Mobile UK, for sure) seem to compress the images before sending them. This effect is noticeable when using the browser, too - however, if you long press on an image and save it, when viewing in the gallery it is either not compressed at all, or substantially less so. I want to be able to do this in my own app.I assume it has something to do with the HTTP headers, but of the ones I've modified, none has made a difference.
View 2 Replies
View Related
May 18, 2010
Since yesterday I got an idea running around my mind but I don´t know first if it would work, and then how "hack" it would be.
People who develop audio processing/recording/playback apps for Android know how hard it is to maintain GC away from our critical paths: playing and recording audio. Processing must be as optimized as possible not only to save battery and use less CPU, but also not to create new objects/allocate new memory spaces ... this all to avoid GC at all cost. Well, we have knowledge and this we can handle (mostly). But what about all the other processing that happens from and for user interaction? Media players display images, some apps display ads, ... and sometimes we have to avoid releasing features to the users just to maintain our critical paths free from GC.
Yesterday I stumbled upon an article about remote services and this led me to a doubt: if they can run as a different process, would a GC call from my activity impact the performance of my remote service? I really don´t know how GC works on the Dalvik so this may be a dumb question. If so, I apologize.
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 4 Replies
View Related
Sep 4, 2010
I have a HTC desire and have my hotmail set up in the standard mail app. i have noticed that some of the mail that lands in the junk mail folder on hotmail itself goes straight into me inbox on my phone. can i avoid this at all?
View 3 Replies
View Related
May 6, 2010
I'm traveling to the Bahamas. Does anyone know if i can you my wifi to avoid charges for instant messenger like yahoo and aim and sending and receiving text messages and which app to download for it?
View 2 Replies
View Related
Apr 10, 2010
I just read the article 'Avoiding memory leaks' in android blog written by Romain Guy. http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.
View 4 Replies
View Related
Apr 6, 2010
When I start my application initially, I get a black screen which stays for a few seconds before my main activity starts. In case of iphone an image with name default is displayed for that split second. I am not sure how to do the same in android. I tried as below in vain
<activity android:name=".Index" android:label="@string/app_name"
android:screenOrientation="portrait" android:theme="@drawable/defaultimage">
<intent-filter> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </activity>
View 1 Replies
View Related
Jun 22, 2010
I need to use some open source code with GPL3. As usual I don't want to open source code for full application.
Now what I understand is if I make two separate process one with my main application code and other as a service or something with Open source library then in that case I have to open source code only for the other one.
Now the question is what is the best way to do so in Android. Suppose My Main App is A Open Source code is B. So A will give some data to B. B will process this and sends data back to A. B may not need to have any UI.
1. Is it possible to install 2 seperate applications / processes from one APK? 2. What is the best way ?Should B be a service? How will be the communication between A and B ? 3. Is it possible to run/call B from A?
View 22 Replies
View Related
Dec 28, 2009
On Android 1.5, using the Allocation Tracker I see that every time I call TextView.setText() with a StringBuilder as first argument, a String gets allocated from the following call stack (first line is last call):
java.lang.AbstractStringBuilder toString java.lang.StringBuilder toString android.text.TextUtils stringOrSpannedString android.widget.TextView setText
I tried specifying the buffer type with setText(strBuilder, TextView.BufferType.NORMAL) but it doesn't change anything.
Is there a way to avoid this allocation?
View 2 Replies
View Related
Jun 8, 2010
I've read this in a few articles, that one should avoid floating point operations within the physics update of a game.
But how do you really achieve this? Surely all half decent games are going to involve this kind of maths?
Does it mean, convert all your variables to int, or use double instead, or simply just cut it out as much as possible?
View 9 Replies
View Related
Dec 28, 2009
I'm drawing a rect to a surfaceview. Nothing special, just a test like this, in the surfaceview-extended class:
private int mPosX = 0; private Paint mPaint = new Paint(); Code...
the rect just bounces around the screen. I'm watching DDMS, I still see the garbage collector being called, even with this simple draw loop. There is no other application code being executed.
I'm wondering if it's realistic to expect the gc to not be called at all if we take care to not allocate any objects during our draw loops. I'm trying to extend this example to do some smooth animations, but every once in awhile the gc is called and you can see the drawing stutter. Although none of my application code is allocating any new objects, I don't know what the underlying API is doing inside surfaceview etc, and I doubt we can control that. Just wondering if this is not possible, I'd prefer to abandon this game idea up-front if we can't guarantee smooth animation.
View 5 Replies
View Related
Jul 5, 2010
I have Gmail set up on my Nexus One (personal email). I also have Microsoft exchange setup (work email) and both work fine. The problem is that under my contacts there are duplicate entries both for Gmail and Microsoft exchange. That is causing some problems with my SMS app (duplicate contacts) and wanted to see how I could avoid syncing Microsoft exchange and delete it from my contact but still keep it on my phone. I have already unchecked the box to not sync my contacts but did that after adding it.
View 3 Replies
View Related
Nov 17, 2010
I have to manage several Bitmap in a ListView where each row is composed by one thumbnail and one textview. This ListView can be very long, over 500 rows...
There are two problems I have to solve:
1) it is better if I cache all the bitmaps, maybe using SoftReferences in a HashMap. I've tried this way, but I noticed a strange behavior with the SoftReferences. It seems that the GC clean them too fast. Why?
2) In order to implement the cache correctly I'd also like to understand which is the best practice you suggest me to realize a "image lazy loading". For example... I'm thinking to load all the data for first and then to load only the thumbnails, but only those really visible on the device screen at the and of the scroll action.
View 4 Replies
View Related
Aug 25, 2010
I have some images in my drawable folder and they have landscape versions in drawable-land. However I want some of the landscape images to be shared, as it seems a waste to duplicate the file with a different name. Is it possible to make a sym link (shortcut) or something for one of the duplicated files to prevent wasting space
Folder explanation below as I'm not great at explaining myself:
/drawable
> image1.png
> image2.png
/drawable-land
>image1.png <-- This image
>image2.png <-- is identical to this file
View 1 Replies
View Related
Nov 7, 2010
I am currently working on a multi-threaded game application for the Android platform. so far so good. I just got over a bug in my application which caused it to restart on orientation change (fixed by designating a specific orientation depending on the availability of a hardware keyboard or not, which is important 'cuz it is an online game with chat capabilities), and that works. BUT now i am trying to avoid the same problem when the user simply slides open the hardware keyboard. I'm not quite sure how to go about avoiding the restart of my application or the saving of the state of my application. Any solutions/suggestions?
View 1 Replies
View Related
May 9, 2010
My first android game is nearly ready and its already in the market.
I hope you could give me some good feedbacks.
QR - Code:
http://fs01.androidpit.info/aqr/x76/370976-1272358669695.png
Little screen with explanations:
http://fs01.androidpit.info/ass/x70/200570-1273055185311-160x240.jpg
It has global highscore.
Game discription:
The goal is to collect boxes using the touchscreen to control the avoider, while avoiding the red smileys that move around the map to avoid death.
(100 Boxes comes with the next update in 2 days)
You have to collect the 100 boxes that appear one at a time on screen using the avoider. Each time a box is hit with the avoider a new box will be revealed at a different place on the field. With every box picked however,a red smiley will materialize as well. These move across the screen in various speeds and directions. Every box collected gives 1 to 5 points, depending on the time taken to pick it and increase the red smiley speed. Apart from getting less points when being slow, the avoider will also slowly grow bigger if it doesn't pick a box. It regains its original small size after picking up a box.
Every 15 boxes a green smiley will appear from the left hand side of the screen. When the avoider touches it, it goes into 'rage', meaning it will temporarily change into a big evil avoider that can eat the red ones, who now are the grey ones. The rage lasts for about 3,5 seconds, with every red smiley eaten counting as a point, which makes the game easier after the rage.
If you kill more then 15 boxes in a row, you gain the difference between the kills and 15 as bonus points for each pointbox. It will be shown next to the box. One important feature is the 'slowmo'. With every eaten pointbox a bar fills to a maximum of 10 seconds. You can activate it anytime by making an doubletab everywhere on the screen. The red smileys will move very slowly, allowing the avoider to maneuver easily.
The last feature is the bomb. You have one at start and about ~ 50 eaten point boxes it will appear an new bomb falling down the screen. You can only have one bomb at time. You activate it by making a doubletab on the bomb icon. Is has the affect, that all smileys die instantly.
*add I hope you enjoy it. Now I have implemented a integrated highscorelist (scoreloop)
Scoreloop Community | Avoiding. Have fun!
View 8 Replies
View Related
Oct 27, 2009
Is there a forum (not a sub-forum) specifically dedicated to the Sprint Hero?
I had a Pre and precentral.net was a great site that tons of people visited.
It seems like this site and Androidcentral.com don't get much traffic.
View 7 Replies
View Related
Feb 27, 2014
I have a ME172V tablet I'm trying to connect to my PC via wi-fi.
I got an PQI Air Pen Express WAP and when I first connected with my tablet all was fine. Since then I'm getting a "Temporarily avoiding poor connection" error. My Motorola Edge phone connects with no problem. I've reset the WAP and the tablet, the signal strength is excellent, and I've disconnected & reconnected.
From the number of posts I found when searching this is a common Android problem. One suggested solution is to uncheck the "Avoid Poor Connection" option in wi-fi settings. Unfortunately there appears to be no such option on the ME172V. Other proposed solutions involved flashing or other techniques I'm not familiar with.
View 4 Replies
View Related
Nov 17, 2010
I'm writing an Android application that allows a user to maintain a list of products. In the EnterProductData activity, the user can enter information about the product into form fields, which will then save the info to a SQLite DB. The EnterProductData activity also allows the user to initiate a barcode scan via the Barcode Scanner app in order to capture the UPC code. The problem I'm facing is trying to set the value of the UPC text field in onActivityResult() once the barcode scan activity is complete and returns the value.
What is ending up happening is my onResume() method is calling a function (populateFields()) that sets the values of the text fields to whatever is currently saved in the DB. And this seems to be happening after onActivityResult() is called. This means the scanned UPC is set as the text field value, only for an empty value to be set to it immediately after. The line of code to blame is commented with asterisks next to it. I imagine that if I immediately save the scanned UPC to the DB in the onActivityResult() method, I can avoid this problem, but that doesn't seem to be the best practice, in my opinion. Can someone advise me on what I should do?
EnterProductData.java
public class EnterProductData extends Activity {
private Button mScanButton;
private EditText mUPC;
private Button mSaveButton;
private Long mRowId;
private DbAdapter mDbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDbHelper = new DbAdapter(this);
mDbHelper.open();
setContentView(R.layout.enter_product_data);
mUPC = (EditText) findViewById(R.id.UPC);
mScanButton = (Button) findViewById(R.id.scanButton);
mSaveButton = (Button) findViewById(R.id.saveButton);
mRowId = (savedInstanceState == null) ? null :
(Long) savedInstanceState.getSerializable(DbAdapter.KEY_PRODUCT_ROWID);
if (mRowId == null) {
Bundle extras = getIntent().getExtras();
mRowId = extras != null ? extras.getLong(DbAdapter.KEY_PRODUCT_ROWID): null;}
populateFields();
mScanButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
IntentIntegrator.initiateScan(EnterProductData.this);}});
mSaveButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
setResult(RESULT_OK);
finish();}});
}private void populateFields() {
if (mRowId != null) {
Cursor product = mDbHelper.fetchProduct(mRowId);
startManagingCursor(product);
mUPC.setText(product.getString(
product.getColumnIndexOrThrow(DbAdapter.KEY_UPC))); //******}
}@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
saveState();
outState.putSerializable(DbAdapter.KEY_PRODUCT_ROWID, mRowId);
}@Override
protected void onPause() {
super.onPause();
saveState();
}@Override
protected void onResume() {
super.onResume();
populateFields();
}private void saveState() {String upc= mUPC.getText().toString();
if (mRowId == null) {
long id = mDbHelper.createProduct(mRowId, UPC);
if (id > 0) mRowId = id;
}} else {mDbHelper.updateProduct(mRowId, UPC);
}}protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(requestCode) {
case IntentIntegrator.REQUEST_CODE: {
if (resultCode != RESULT_CANCELED) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
if (scanResult != null) {
String upc = scanResult.getContents();
mUPC.setText(upc);
}}break;
}}}}
View 1 Replies
View Related