Android :: Looping Through Interface Elements?
Sep 2, 2009
This is probably a very "newbie" question as I'm relatively new to the android sdk, but figured this would be good place to ask.
Say you have a layout with several textviews that all have sequential IDs (ie, tBox1, tBox2, tBox3, etc).Is it possible to reference each box in a loop? Something like:
do { iCount++; View tvBox1 = findViewById(R.id.tBox[iCount]); }
View 3 Replies
Sep 27, 2010
I have to give a 20x20 presentation tomorrow and I'm looking for a timer app to help out. 20x20 means that each slide auto-advances after 20 seconds. I'd like to have a timer on my phone that would give me a quick glance of how much time I have left for each slide. Start it at 20 seconds, have it count down and when it hits zero, start over at 20. Seeing as it's just a timer app, I really would rather not pay $2 for StopWatch & Timer, which is the only one I've found that offers a looping timer. Does anyone have any ideas?
View 1 Replies
View Related
Oct 7, 2009
I am testing my wifi application with android and I need to test a lot of traffic over a long period of time. I need at least 24-48 hours for a stress test. I am wondering if anyone knows if I can get a youtube video to loop and replay.
View 1 Replies
View Related
Jul 7, 2013
My Galaxy S3 is frequently getting into hotboot looping state for no apparent reason. The only way to get it out of this state is to wipe the phone or restore a backup of the "data" folder only. After that, it might work for a week, but it might not work for a day (not work = start to hotboot loop). It happens when after the phone screen is locked, it doesn't wake up anymore. It doesn't answers to any calls (like if it's off) or notifications.Forcing a reboot (by holding the power button) or removing the battery able me to reboot it, but enter in hotboot looping state. I can make it go thru the whole booting state and I see the homescreen (And that's weird because I'm supposed to see the lockscreen first). Some widgets animation works but the device doesn't answer to touch (two softbuttons vibrates when touched, they do vibrate but don't render anything on Android) and then hotboots. Keeps doing this forever. Booting into safemode USED to work, but it doesn't work anymore, I don't know why.
After wiping the device or restoring the Data backup, device turns on as expected (restoring data takes it back to working state exactly like it was before the backup, even the same lockscreen pattern). I've tried to leave a terminal running logcat to catch the error, but it doesn't write in realtime, so when the bug breaks out, the logfile is empty.
I even thought it could be the S3 memory issue with firmware, but I'm using the "fixed" kernels. Also, it is recoverable, and not permanently dead.
I suspect of some rogue app, but I have too many apps to just go through installing one by one (and waiting even weeks to install the other one). Is there any way I can get a postmortem logfile or make logcat write in realtime?
View 7 Replies
View Related
Jul 24, 2012
i just bought an HTC EVO 3d GSM x515m few days ago. After unlock from htcdev and instal custom rom my phone was working with a bug in 3d video. By trying to solve it by instaling some custom ROMs download on the net my phone cant boot any rom now even the one working before and cant stop bootlooping. before doing all those things i made an OTA update so my boot became HB 1.53.0.0.7 . i didnt do even one weeks with the phone. I want just to go back to my stock ROM but i cant coz the phone is not booting any ROMs
View 1 Replies
View Related
Jan 3, 2014
I have an Amazon Kindle Fire HD 7" (the 2012 one, not the 2013 one), and I am trying to pre-root the stock software for it (version 7.4.6). I downloaded the update in a .bin format, renamed it to .zip and de-compiled it with 7-zip. I put the su and busybox binaries in "/system/xbin/", and added CWM's Superuser.apk to "/system/app/", and added a couple of more tweaks to it as well.
I adjusted the update-script file accordingly, and re-compiled the ROM. I moved it over to my Kindle, rebooted into recovery, wiped, flashed, and... bootloop and eventual TWRP.
View 1 Replies
View Related
Oct 10, 2012
I have an AT&T Galaxy S2 Skyrocket (SGH-I727) ...I flashed the CM10 Superheavy 5.0 ROM, but I did the Hercules (T989) by accident. Now my model number is (T989). I tried to flash the stock .tar file for I727, but I just kept getting the AT&T boot screen looping. How can I go back to I727 so I can reflash the correct CM10 ROM?
View 1 Replies
View Related
Oct 7, 2010
Just flashed my phone and now its stuck looping boot screen, anyone know where i went wrong??
View 6 Replies
View Related
Aug 4, 2010
Anyone know of a fix with the Sirius satellite radio app looping issue. I've seen that its an issue after getting froyo.
View 10 Replies
View Related
Apr 12, 2010
Im having a problem with boot looping on my rooted and rom'd droid. I dont know what happens to make it occur but sometimes after just running the phone it will start and I cant get it to stop.
What happens is:
1: Anytime i re-mount my SDcard
2: any time i boot
It will sit there and boot loop. Remounting the card causes the phone to crash to boot animation, and when it trys to start it show 'scanning SDcard" or whatever and then crashes... on the 3rd or 4th time it finally will get working. But it extremely annoying when your adding appps or working on the phone during a call. Does anyone know why this happens?
Somethings i know DONT affect it:
Rom im running - ive had it happen on chevy, pete and adam and stock (FML)
Overclock - Had it happen on stock kernal and OC
Re-Root - Ive SBF'd and it will still occur but randomly
SDcard errors - Windows shows no errors on disk
View 5 Replies
View Related
Mar 6, 2010
So I've tried to flash like 3 different ROMs onto my Nexus One and every time I reboot, it just loops the boot up animation. And now when I do a Nandroid Restore, it says WiFi unable to start.
View 5 Replies
View Related
May 12, 2010
I'm using the ROM Manager but I have had this issue too when using the nandroid methods.
When I install just about ANY ROM other than the Cyanogen ROM I have issues with boot looping. Its very odd. If I am running the Cyanogen ROM I have no issues at all. I get the boot loop immediately after loading the ROM. No applications have been installed yet, and I have not even had the chance to do any restores using Titanium Backup.
The latest ROM I attempted was the Steam Dark Edge 1.2. Before that I have tried the Bugless Beast (Prior to 1.0) and with both I have boot loop issues. Also the same with the latest Ultimate Droid and Smoked Glass. So it must be something I'm doing or not doing.
If Im in the ROM manager I choose the option to allow the wipe. I have also booted into the Clockwork Recovery and manually wiped 2 times and attempted the update and again, boot loop.
When I am doing the ROM install from ROM Manager, the phone is running Cyanogen at the latest version. I don't remember ever installing a custom kernel but with all of the ROMS I have messed with over time I may have however that should be cleared with the wipe correct?
View 27 Replies
View Related
Jun 22, 2010
I have a cliq the was returned to our store that is looping even after an attempted recovery. being familiar with rooting would i be able to make that a working demo by rooting the device and flashing a stock rooted rom?
View 2 Replies
View Related
Apr 23, 2010
-power off
-press and hold home
-press and hold back
-press and release power
This will bring you to a menu that gives you the option to erase user data or not, choosing yes will reset firmware to factory and you will lose ALL settings, including wallpapers, ringtones, etc, but your sd card will remain untouched... if you brick your hero this should help, but im not claiming responsibility if it doesnt.
View 2 Replies
View Related
Dec 9, 2011
Just wanted to ask if there are any apps or utilities for android 2.3 devices that can autoplay a video on boot and loop it forever until the user closes the app. (Preferably if it will let me re-start the loop on restarting the app). Its for using a tablet as a display unit.
View 2 Replies
View Related
Nov 10, 2010
I'm trying to modify two TextViews in exactly the same way. I thought I can give them same id and with findViewById() and setText() methods change those TextViews in two lines. But it seems only one TextView is changed.Is there a way to do this?Or I have to make different ids for every element, get every element by findViewById() method and set it's text?
View 3 Replies
View Related
Aug 23, 2010
I could not get any inner elements during the xml parsing. looks like parser see only outer tag A. Could you show me error?
CODE:.......................
View 4 Replies
View Related
Apr 25, 2009
Just wonder what limitations there are for UI elements in AppWidgets? I tried a ListView and was met with an error. I saw the other post that EditText isn't available.Just wondering if there was a full list somewhere?
View 8 Replies
View Related
Jun 1, 2010
I'm having trouble positioning the layout elements. The AutoComplete in my TableLayout and the button after it are expanding the TableRow larger than the width of the screen. Anyone have an idea why? Below is my XML code as well as a picture of the problem...
View 1 Replies
View Related
Sep 1, 2010
In my application I change layouts very frequently with most of the user interactions. Each time when a new layout is drawn, the applications memory size is increasing. I can see this in DDMS. This is absolutely fine. I have analyzed my application with memory analyze tool and it shows that there around 42 Table layouts at some point of time and this number increase as user does more interactions with the app. Now my question is why doesn't the GC collect the stale layout objects. Does GC collect on UI widgets also??? I feel it does but can any one tell me what may be the reason for GC not collecting my UI elements.
View 4 Replies
View Related
Feb 3, 2010
I need to add some parts of my UI programmatically. I'm doing this because I need to set the ids of some elements up in such a way that they can be easily access in a for loop. So far I have this xml:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/attr_row" android:layout_width="fill_parent"
android:layout_height="wrap_content"> <EditText android:id="@+id/attr_name"
android:hint="Attribute" android:layout_width="0dip" android:layout_weight="2"
android:layout_height="wrap_content" android:inputType="textPersonName" />
<EditText android:id="@+id/attr_val" android:hint="Value"
android:layout_width="0dip" android:layout_weight="3"
android:layout_height="wrap_content" android:inputType="textPersonName" />
<ImageButton android:id="@+id/drop_attr" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="@drawable/btn_delete_states"
android:layout_gravity="center_vertical" /> </LinearLayout>
At the moment, I inflate this xml five times like so:
for (int i = 0; i<5; i++) { LinearLayout attrList = (LinearLayout) findViewById (R.id.attr_list);
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(R.layout.attr_row, null);
LinearLayout extraAttr = (LinearLayout) row.findViewById (R.id.attr_row);
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
attrList.addView(extraAttr, i, params); }
The link below shows two pictures - the layout hierarchy and the result in the emulator. http://picasaweb.google.com/bengoldcross/Android?authkey=Gv1sRgCJ785I...
As can be seen, the xml is inflated five times successfully but only one is actually displayed. Inspecting the hierarchy viewer a bit more explains why. The layout being displayed is at location x=0 y=111 all the others are being rendered at x=320 y=111. It would appear they are being displayed a) off screen and b) on top of each other. So, why are they and how do I stop it from happening?
View 3 Replies
View Related
Jun 10, 2010
Here's a quote from Android's Dev Guide: A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Isn't it a bad practice to make an app dependent on other apps?
View 2 Replies
View Related
Oct 1, 2010
I was wandering if there was a easy way to do the following without android layout
place an image central top
place a button center center
place a button left bottom
place a button right bottom
it doesn't sound that difficult no ?
well I can't figure out a way to place the elements as I want using stupid xml layout.
View 1 Replies
View Related
Aug 5, 2010
I have a database filled with records in the following format: . What I want my application to do is select records from an external database, and display those records on the phone screen using a SurfaceView.
Currently, I have an Activity, and a Service responsible for the record-gathering portion of the application. The Activity passes an intent to the Service, and the Service responds by returning the records that need to be displayed. The records are stored in my program as instances of the Data class, and merely have the screen-coordinates of where the element should be drawn in the View (I am just drawing a circle for every record in the DB).
For the sake of brevity, I won't include the service but I will include a skeleton of the Activity class and the Data that I wish to display.
CODE:.................
The problem that I am having pertains to the SurfaceView. I realize that many people are going to suggest that I use just a regular View, but my application involves a lot of elements, so a SurfaceView would be much more suitable for my needs. Below is a skeleton of my SurfaceView class that contains a nested class to manage the threads.
CODE:............
The problem that I'm having is that once I make the initial call to the Panel class, I'm going to be getting new records from the service, and consequently, my Info Map data-structure is going to get updated. However, my Panel class just gets stuck in a loop and never receives any new Data objects. All examples of SurfaceViews I've found have involved updating them methods within the SurfaceView class itself (e.g. touching the screen and creating a new image, etc.) Sadly, I'm stumped on this particular problem. Is there a better approach for designing my Activity/SurfaceView interaction? Is an additional View required?
View 1 Replies
View Related
Mar 9, 2009
From http://d.android.com/guide/topics/ui/declaring-layout.html, it said "Instantiate layout elements at runtime. Your application can create View and ViewGroup objects (and manipulate their properties) programmatically."
Can you please tell me how/where I can find example for that?
For example, how can I convert the following layout into Java code of my MyWidget. So that when I put "<MyWidget...>" in my layout xml file, it will automatically build a Gallery inside the MyWidget? code...
View 3 Replies
View Related
Oct 13, 2010
I am trying to send a list of objects from an android mobile phone app to a j2ee webserver.
I create json objects and then put the objects into an jsonarray(in an order) and then send it. I am able to receive the jsonarray on the server, obtain the objects individually too, but the order of how I inserted the objects into the jsonarray is different compared to the order present in the received array. The order of elements plays a crucial role in my data processing. Could somebody please tell me a workaround for this.
View 1 Replies
View Related
Jun 12, 2010
There's a webpage I pull up with webview, however i'd like to hide the 1 text link at the top. Is there a way to do this? The link is in the body, so I can't hide the body element in whole.
The webpage is all text, and one tiny image at the bottom, but the text is generated each time you load it, so I can't just copy/paste the body.
View 1 Replies
View Related
Jun 27, 2010
When I have a ListActivity and an Adapter how does Android handle a list with 200 elements.
Does it try to load all of them directly how does it wait till the user scrolls and then renders those elements?
Do I have to worry with performance when a list is too long?
View 3 Replies
View Related
Jul 8, 2010
Is there any way to set my sliding drawer on top of other elements in my layout? I have an ImageView which is intended for an album art and I would like to have a sliding drawer overlay at the bottom of that ImageView.
View 1 Replies
View Related
Mar 4, 2010
Is possible to have a separator between elements of a GridView?
View 2 Replies
View Related