General :: Drawing Buttons At Different Times?
Dec 2, 2013
I am writing a calculator app as my first android app.
I have a mode button on the calculator that changes the buttons to make new functions available.
When mode switches, certain buttons get changed to a different drawable with different colors, and all the text gets updated on all the buttons.
Each mode has a new string array corresponding to the text for that mode.What I am currently trying to achieve is having a delay between the time that each button is updated, a sort of cascade effect. I have not successfully implemented this.
In the following code I have a toggleLabels method which attempts to do this. It has three if blocks corresponding to the three modes, which each gets a new set of text and buttons. There are two nested for loops in each running i=width and j=height.
To create the cascade effect I grabbed system time, and then subtracted from current time to see that 100ms had passed.No cascade effect takes place, and when I hit the mode button, there is a long delay then all of the buttons switch at once. The delay seems to be exactly 2 seconds, which corresponds to the cumulative delay of 100ms per button X 20 buttons.
I also tried an alternate method of Thread.Sleep() which yielded the same result, and which I read was bad practice to implement in your UI thread.Basically I am doing..
loop through each button
{
Change button drawable[code]......
View 1 Replies
Feb 14, 2012
I have searched for this a bunch of times, but have not found anything directly allowing me to annotate pdfs in android.
I am aware of one method where one converts your .ppt file into .pdf and can draw on it directly with ezpdf reader.
However, it would be nice to be able to draw on the powerpoints natively.
Any application which supports this on android?
(For the record, this app will be used on a Galaxy Note (me) and sideloaded onto a Kindle Fire (girlfriend)). We haven't rooted the KF yet but would consider doing so to get that functionality. (I know sideloading doesn't require root but not all applications seem to work).
The GNote has an active digitizer but the Kindle Fire will be using a capacitive stylus, so we will see about accurately.
Specifically, my girlfriend will be editing powerpoint lectures for Biochem, so she needs to be able to draw structures, circle things etc.
I remember taking the class and being quite envious of classmates doing the same with their ipads... they seemed to have no problem doing these types of basic things with a capacitive stylus.
View 1 Replies
View Related
Jun 18, 2013
I have an HTC One X and for the last day or so, it has begun to reboot itself randomly and quite often. There is no specific time of use before it reboots. It's completely random. It can just be sitting there idle, and just all of a sudden reboot itself.
The battery is not dead or dying.
The phone is not overheating.
I have no updates available and my last update was a few months ago and it was fine up until the last day or two.
The phone is not rooted.
View 2 Replies
View Related
Aug 2, 2012
What I would like to do is to run 2 instances of an application or more. The issue is that I am using an RDP program that allows me to attach to a single connection, the kick is that I need the ability to toggle between those machines and the app does not do that natively. I can also see it being useful for a situation when you need to toggle between two documents that are both open with the same application.
I know that it is really not made to do this natively but if there is are ROMs that include that functionality or a way to alter android to do this. In addition, it would be great to be able to tell the system which applications can and can't function that way.
I currently have a nexus 7, transformer prime and transformer infinity to test this with.
View 3 Replies
View Related
Aug 23, 2012
I'm running CM10 on my EVO 3D and I really love the expanded notifications. The thing is I tend to have a maximum of 2-3 notifications at a time. Is there a way to have all the notifications expanded at all times?
View 1 Replies
View Related
Jul 29, 2009
I am not able to find out the perfect layout(viewgroup) to place four buttons as shown in the attached image. Basically, i want to place four buttons near the top/left/bottom/right edge of the screen. AbsoluteLayout helped, but it is deprecated (It is also better to avoid AbsoluteLayout as it is not very flexible for orientation changes)
View 2 Replies
View Related
Aug 17, 2013
I have an S4, it does have a built in option to turn the wifi on and off at specific times, but i was wanting an app that would allow me to set a few more rules, as the built in options only allow 1 on/off rule, i would like to set at least 2, one time for week days and one time for weekends.
View 1 Replies
View Related
Feb 11, 2013
When i started my dapeng a75 it started with the update screen(automatically)
I leaved the phone 10 minutes and shutted down when i camed back.
I started it again and the android loading screen showed 60 times.(normally 5 times till load)
I plugged in the pc and showed this""Installing driver: MT65** phone"""
I dont have any root or clockwork or something like that.
View 3 Replies
View Related
Apr 16, 2013
Is there an app or other way to see how many times you have flashed different roms, mods, themes etc?
I tried triangle away by chainfire but it didnt show exactly how many times device have been flashed.. (exellent app otherwise)
If it matters device is GT-I9300, GT-I9250, GT-I9000 (Galaxy S3, Galaxy Nexus, Galaxy S)
View 7 Replies
View Related
Jul 7, 2013
Much of the time I get a text message from an iPhone it either:
1) Comes through multiple times (this happens with AT&T iPhones)
Or
2) Comes through chopped up into individual messages that are also displayed out of order (usually from Verizon iPhones)
I have a screenshot of issue No. 2 but the AC app is not letting me upload it for some reason (never had an issue before) and I can't get the link to work from the desktop (grrr)
Are these issues because of iMessage and what looks like its inability to play well with anything non-Apple? LG-E970
View 7 Replies
View Related
Apr 25, 2014
From time to time, I'm getting a random volume down stuck. What this means is that my phone lowers the volume by itself, not by me accidentally pressing the volume down key. The problem is solved by pressing the volume up key, and only then, trying to swipe the volume does no good because the phone still continues to lower the volume. After that, you can't use the power button nor the volume down button, it's like they're disabled, you press them and nothing happens. You wait some time, and then you can use them again.
It seems to happen the most when phone is charging and when the battery goes low, but, to be honest, I just couldn't figure out the main cause for this type of behavior. Today I was taking some pictures and suddenly the volume slider came up, showing the volume lowering down rapidly. I've had this problem ever since I first rooted my phone, but it's time to try and figure out the underlying problem.
Phone's hardware checks out, it's perfect (I've had had my doubts in the past, but wherever the phone had been taken, it checked out fine) everywhere I take it it's said that that's a software issue.
View 2 Replies
View Related
Mar 30, 2013
I have recently installed Facebook Application for my Tablet PC. It is working on 2.2.2 Anroid version and Facebook app version is 2.3
When I enter my info it says that Login failed and that the operation timed out (after I hit the Login button, the error appears after cca. 15 seconds).
I am using pretty good Wi-Fi connection to connect my Tablet to the internet, so I don't think that it's up to my connection. I tried already with clearing data, uninstalling, rebooting and reinstalling, but it didn't work.
View 3 Replies
View Related
Mar 26, 2012
I was just surfing the Google Play Store on my laptop, just browsing some apps, when I noticed my phone HTC ADR6425LVW showed up 3 different times when it prompted which device to download the app, too.
I am rooted, I have the HTC Rezound and a couple days ago, the desktop Google Play Store showed 2 different versions of my phone. I didn't really make anything of it because I exchanged my phone for a new one during the 14 day return period. Why this would happen, unless it occurs when I flash new ROMS. But I've flashed at least 6 ROMS over the course of at least 20 different times. Would this cause warranty issues if I try to have a replacement done if something happens to my phone?
View 1 Replies
View Related
Jun 25, 2012
In the Google Music app my songs are showing up 3 times, same when I try to set an alarm with a song. Only the last of the 3 of any song will play. I'm unsure what I need to clear to fix this. I wiped my cache's in CWM and rebooted but it didn't change anything. They were coming up the same in PlayerPro but I did a refresh tracks in app and it fixed it. App that are giving me problems are Google Music, N7 & the stock Samsung player. So I'm assuming it's not an app issue as it does it on different ones. I'm running the latest Perfection ICS rom.
View 2 Replies
View Related
Nov 22, 2011
My phone is the Droid X.
1. The main thing is that my texts won't send anymore when I turn my screen off or even exit out of the text message window. I have to keep my phone on and on that screen for at least 5 minutes until it finally sends. Before this, I could just text, send it, turn my screen off, and put it in my pocket and not worry about it sending. With my job and my life, I can't be doing this. I need a fix for this if possible.
2. This problem isn't as big as the other two but someone will send me one text and I will receive 2-6 times. I'll either receive all of them at once, or I will receive one text, and then 5 minutes later get it again, and then again 5 more minutes, and so on and so on. Now this can get very annoying when I am quickly texting and I keep getting texts like 15 times. I need a fix for this as well if possible.
3. One of the most annoying things about all this is my keyboard is not typing. I'll click on the "insert message here" box and start typing but the letters won't appear. The word suggestions will appear and whatnot acting like I am typing but it won't. My only temporary solution to this is exiting out and going back into the text but it doesn't seem to actually work as I am finding myself sitting there for about 10 minutes exiting and entering back into the texts over and over.
View 9 Replies
View Related
Mar 31, 2012
I'm writing an app part of whose functionality is to record audio through the microphone. The recording seems to stop as soon as the screen times out and the phone enters what I think is sleep mode. I've noticed that some apps(Tokasiki's Voice Recorder, for one) don't seem to have this problem on this phone(Motorola Atrix) and continue to record audio long after the screen has faded to black. I've tried using a partial wake lock but it doesn't seem to maintain the recording. Should I use AudioRecord instead of MediaRecorder? Voice Recorder seems to get by without using AudioRecord.
View 1 Replies
View Related
Nov 22, 2013
I recently rooted, and unlocked the bootloader on my atrix hd (ATT)
Since then I tried installing cm10.1 multiple times on the secondary "Rom slots" within the bootloader, without any success. So I finally decided to go for it and install cm10.1 in the "stock rom" slot, Prior to doing this I did a back-up using Rom manager. Aand now I seemingly can't even boot into recovery mode, every time I restart my device it simply goes to the cyanogenmod blue ring thingy and gets stuck! (I have left it for 15-20 mins thinking it might be some kind of installation process..) I have both windows 8 and Ubuntu installed on my pc, just saying.i've even tried holding down all three physical buttons and it simply takes me back to the same screen!!!
View 1 Replies
View Related
Jan 6, 2010
I have touched on this question here, where Christopher gave an answer to this, but I dont really get it so I thought its time to make it a real question, not just a "follow up" =)
As it stands, the application Im writing has 4 different screens:
1. Screen 1 - list of nodes (main screen)
2. Screen 2 - options menu, tableLayout with buttons
3. Screen 3 - navigation
4. Screen 4 - text details on version etc
These screens can be navigated to/from using a "header" View that is placed on top. the header then has 4 different buttons:
+--------------------+
| menu with buttons |
+--------------------+
| |
| |
| |
| C O N T E N T |
| |
| |
| |
+--------------------+
The header is just an XML-file (header.xml) with a few buttons. That header.xml is the included in the Layouts using the include-markup. For example, the main.xml has the line:
<include layout="@layout/header"></include>
The header show up alright, but the question is - what is the correct approach to attach OnClickListeners for the buttons in the header?
Christopher pointed out that you could create an Activity class and do the hooks there, like this:
CODE:............
First, I cant make it work since the method setupHeaderButtons isnt accessible from FirstActivity.
Secondly, is this the right way to go at it?
View 3 Replies
View Related
Jul 21, 2010
What is your best drawing app?
I've tried Draw!, Draw(er), and MagicMarker, but I dunno, they each have their pros and cons and can't find one that suits me well. I'm not looking for Photoshop on my phone, but something better than a colored line. So what is your best drawing app?
View 3 Replies
View Related
Feb 8, 2012
I am running CM7.2 on Samsung Galaxy Ace and i am looking for a way to get the ics on screen buttons.
View 4 Replies
View Related
Nov 5, 2010
This is more of a question about animating than a specific problem coding. i need to fill in the broad strokes left by the research i've been doing.
What i'm trying to do:
The activity should load with only the a togglebutton visible. when the button is touched, a png will be animated to a certain position relative to the togglebutton. also, another button will slide in from off screen and slide off if/when the togglebutton is pressed again.
What i can't figure out:
I can draw an image, but only via xml. creating an imageview and setting the background programmatically does nothing.
When i draw from xml, i can't move the image when the togglebutton is pressed like i want to. when i call getPositionOnScreen() i get a null pointer, even though the complier can see i'm referring to the imageview described in both xml and in code.
I'm calling getPositionOnScreen because via xml, i have the image positioned behind the togglebutton so that it's not visible until the button has been pressed and the image starts moving. the idea is that with different screen sizes i won't know exactly where the view is until runtime. getPostionOnScreen allows me to get the coordinates of the imageview so i know where it has been positioned. when i have a start position, can tell it to "move up" on the screen from behind the togglebutton by simply adding to x or y until it's where i want.
This is the code to draw the image (inserted in the onCreate method).
CODE:.......
This is the code i'm using to animate. when the button is clicked, it calls this method on the view from the listener.
CODE:...............
I'm well aware that this is horribly wrong and won't work. what i need to understand is why.
View 1 Replies
View Related
Apr 18, 2010
I'm trying to learn about Android programming by rewriting a C app I've moved from DOS to X-windows to Windows as a learning tool. It's just a silly little app that draws symmetrical 'game of life' patterns on the screen in a kaleidoscopic fashion. It's structured so that the patterns do their own animations. I.e. there's a 'Life' class that produces the next generation and redraws itself from the center outward, inserting delays to produce a kaleidoscopic effect.
I've got it so that the patterns draw - I took the LunarLander sample as a starting point, and an drawing on a SurfaceView. But my problem is with timing the 'animations'. I'm not doing traditional animation, where I build a whole frame and then draw it, but the surface seems to want to draw itself completely on each iteration of my loop, so my inserted sleep's don't insert delay in the right places.
So my questions:
1. Is there a more direct way to write to the screen than via a SurfaceView? If I did that, would the various steps of my 'animation' occur as I drew them, producing the desired effect. 2. If such a drawing method exists, would I be wasting my time learning how to use it? 3. What's the 'standard' way to do this kind of animation?
View 3 Replies
View Related
Oct 8, 2010
Is there any api for drawing financial chart in android.
View 2 Replies
View Related
Oct 28, 2011
I'm trying to draw on a map using markers. The problem I'm having is when I try to add lots of them, then I can't get it to run. To illustrate my problem, let's say I want to draw a square made of 900 smaller squares (30x30).I'm trying to add the markers to an itemizedoverlay, then drawing it.
Code:
public class MyItemizedOverlay extends ItemizedOverlay{
private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
private Context mContext;
[code]....
View 7 Replies
View Related
Aug 27, 2013
Any way of completely disabling the physical volume up/volume down buttons (specifically on an SG Mega 6.3)? I never, ever use them, other than to put the volume backup having accidentally depressed volume down! If there's any kind of app or tweak that will disable them that would be great. The only caveat is that my device isn't rooted.
View 1 Replies
View Related
Dec 23, 2011
I have the Galaxy Skyrocket and want to move one of the menu buttons (Email). I perfer the Social Hub and would like for it be on menu bar. Is it possible to do this without rooting?
View 1 Replies
View Related
Mar 14, 2012
i have beats headphone and Motorola razr.I want to know if it's possible to run the 3 buttons on my headphones with my smartphone or other mobile android? it's a hardware or software problem?
View 4 Replies
View Related
Aug 5, 2013
I have an android device running gingerbread (2.3.6) my power button (which also serves the purpose of unlocking the device) is broke so basically what am trying to do is to wake the device up using volume buttons instead of power. The things I've tried so far:
*a few apps from store like - button saviour /proximity unlock etc some of them do work but they drain battery like hell moreover are useless in waking from homescreen
*a Google search showed me many a guides on button remapping so i tried modifying /usr/keylayout files but there seems to be no effect whatsoever
What am looking for :
*i think remapping via kernel is ma last hope so I've synced sources and setup the environment but don't know how to proceed.
View 1 Replies
View Related
Feb 18, 2013
I can't seem to find an app to disable volume buttons ?
I can manually do it and reboot by editing gpio.kl but I need a quick way,
A way to set it to change and auto reboot with a click or an app that does it without any reboots would be what I need
View 1 Replies
View Related
Oct 29, 2010
Trying to draw a circle at a longitude/latitude position. The circle below doesn't show up, does anybody know why?
View 5 Replies
View Related