[android-developers] = Returning images to the Quick Search Box Asynchronously =

2011-03-22 Thread ClarkBattle
The images returned to the cursor in the QSB seem to require an image on the device. My images live on a remote server that would have to be downloaded to the device asynchronously with callbacks. This would be prohibitively slow returning search results. Is there a way that the QSB can retrieve

[android-developers] Re: == How to Toast or Notify in response to ACTION_VIEW without showing my app ==

2011-03-15 Thread ClarkBattle
The big problem here seems to be that the target of the Intent thrown from selecting a search suggestion in the Android Quick Search Box must be an Activity. If it could be a Service then I could simply show a toast from that if offline or start the appropriate activity if not. Nope. If its not

[android-developers] Re: == How to Toast or Notify in response to ACTION_VIEW without showing my app ==

2011-03-15 Thread ClarkBattle
Nope. That doesnt work either. Here is my code for the activity that responds to the QSB. You'll see that I am using the application context for the toast. My app shows with the toast over it. If it is possible to show a toast over the QSB then how? (Example code) public class GlobalSearchAct

[android-developers] Re: == How to Toast or Notify in response to ACTION_VIEW without showing my app ==

2011-03-15 Thread ClarkBattle
cision as to whether to show the Toast > message or instead of "starting" your App (seems your App is already > started, though, since you've created a QSB...). > > On Mar 15, 11:32 am, ClarkBattle wrote: > > > > > > > > > When a user clicks on

[android-developers] == How to Toast or Notify in response to ACTION_VIEW without showing my app ==

2011-03-14 Thread ClarkBattle
When a user clicks on a cached Quick Search Box shortcut it takes the user to an activity that they should not see if they are in airplane mode. I would like to show them a toast or a notification from within the QSB, without showing my app. The message will be "You can not view this content whil

[android-developers] Quick Search Box - Getting results in "All"

2011-03-10 Thread ClarkBattle
I can get search results in my app's search area (selecting the app icon in the 2.3 quick search box to restrict the search to my app). However, i dont see any of my results when All is selected. Does android just deprioritize them? What determines what search results show up in the All category

[android-developers] Re: ==Making "back" return to the app that launched the current activity

2011-03-04 Thread ClarkBattle
aunching point with a task break to other apps. > > > > On Fri, Mar 4, 2011 at 5:04 PM, ClarkBattle wrote: > > If I do that then when my task is started from within my app (rather > > than the quick search box) wont the affinity defined in the manifest > > mess it up

[android-developers] Re: ==Making "back" return to the app that launched the current activity

2011-03-04 Thread ClarkBattle
. On Mar 4, 4:45 pm, Dianne Hackborn wrote: > Use android:taskAffinity="" (or some other name like ":searchtask") for that > activity. > > > > On Fri, Mar 4, 2011 at 4:37 PM, ClarkBattle wrote: > > I have some results that I am returning to the And

[android-developers] ==Making "back" return to the app that launched the current activity

2011-03-04 Thread ClarkBattle
I have some results that I am returning to the Android Quick Search Box. When a result is selected it takes the user into my app. However, when the user presses "back" at this point I want them to return to the Quick Search Box, not to the previous activity in my app. Currently I am starting the

[android-developers] Re: == Populated MatrixCursor returned to the Global Search shows wrong results ==

2011-02-18 Thread ClarkBattle
The reason this happens is that Google hasn't updated their docs for search in a long time and they are now completely out of date with what the ACTUAL requirements are for cursor rows returned to the Global Search Box. Also, they changed the required columns and uniqueness requirements in 2.2 and

[android-developers] Re: == Populated MatrixCursor returned to the Global Search shows wrong results ==

2011-02-11 Thread ClarkBattle
Oops. My searchable is this. http://schemas.android.com/apk/res/android"; android:label="@string/search_label" android:hint="@string/search_hint" android:searchSuggestAuthority="com.rhapsody.content.GlobalSearchProvider" android:searchSuggestSelection=" ?" android:searchSuggestThreshold

[android-developers] == Populated MatrixCursor returned to the Global Search shows wrong results ==

2011-02-11 Thread ClarkBattle
I am trying to populate results for the global search box. I can currently type in the search box and have my debugger stop in query() just as I would expect. Just as a test I am populating a MatrixCursor manually to return from the query() method. Here is the test code... public class GlobalSe

[android-developers] Re: === My ContentProvider.query() can not populate a Cursor. ===

2011-02-09 Thread ClarkBattle
Cool! Thanks. On Feb 8, 10:58 pm, Kostya Vasilyev wrote: > Take a look at MatrixCursor. > -- 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 g

[android-developers] === My ContentProvider.query() can not populate a Cursor. ===

2011-02-08 Thread ClarkBattle
I am making a ContentProvider to provide results of the android global search box. I am supposed to @Override query() to return my results in a Cursor. The problem is that my results do not come from a database. They come from a server that gives me a populated List. Perhaps I need to manually

[android-developers] Re: Receiving hard search button broadcasts within an app

2011-01-20 Thread ClarkBattle
Thanks! -- 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+unsubscr...@googlegroups.com For more options,

[android-developers] Receiving hard search button broadcasts within an app

2011-01-19 Thread ClarkBattle
When the hard search button is pressed while my app is active I want it to open my search activity. I have tried this in the manifest: along with: public class Ha

[android-developers] == Type ahead search timer ==

2010-11-17 Thread ClarkBattle
I am implementing a type ahead search so that results are returned as the user is typing. I want to have a timer so that the search is not sent to the server until the user stops typing. "Stops typing" is defined by a number of milliseconds. I figure that I can use a Timer to start the search in

[android-developers] Re: Buggy sample code for an interview

2010-11-17 Thread ClarkBattle
An Activity that runs an AsyncTask but fails to terminate it or carry it > over during orientation changes. > > -- Kostya > > 16.11.2010 22:08, ClarkBattle пишет: > > > I think too many interviews are of the "write new code" variety and > > not enough of th

[android-developers] Buggy sample code for an interview

2010-11-16 Thread ClarkBattle
I think too many interviews are of the "write new code" variety and not enough of the "analyze this code" variety. I would like to ask a candidate to analyze some android code. I am looking for a good example with some bugs or potential optimizations in it that can be improved. Does anyone have

[android-developers] Re: === IllegalArgumentException: View not attached to window manager ===

2010-11-09 Thread ClarkBattle
ning activity has been destroyed.  This could be > because of it being restarted due to a config change, or could just as well > be it being destroyed after the user pressed back to finish it.  In either > case, you should make sure to dismiss such dialogs yourself before the > activity is de

[android-developers] Re: === IllegalArgumentException: View not attached to window manager ===

2010-11-08 Thread ClarkBattle
There are about 10 different dialogs and they are are all a little different. I have no idea which one it is coming from. I think this is a non-error. Dismissing a dialog that has already been destroyed by android is not really a problem. I'll just try-catch the exception at every dialog.dismis

[android-developers] === IllegalArgumentException: View not attached to window manager ===

2010-11-08 Thread ClarkBattle
I am getting this error automatically sent to me from a lot of beta users. java.lang.IllegalArgumentException: View not attached to window manager at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java: 355) at android.view.WindowManagerImpl.removeView(WindowManager

[android-developers] Programmatically resizing a custom view?

2010-09-28 Thread ClarkBattle
I am trying to programmatically resize a custom view in android. The custom view contains a Button and an EditText in a LinearLayout. I want to make several instances of this custom view and alter the width of each one slightly narrower than the last so that they overlap each other. At what point c

[android-developers] Re: TextView resets its location after an animation

2010-09-20 Thread ClarkBattle
The answer is that it needs to have animation.setFillAfter( true ); in order to persist the animation after its end. Strange that this is not true by default. On Sep 17, 3:09 pm, ClarkBattle wrote: > Ive tried several interpolators and many different values.  It always >

[android-developers] Re: TextView resets its location after an animation

2010-09-20 Thread ClarkBattle
The answer is that it needs to have animation.setFillAfter( true ); in order to persist the animation after its end. Strange that this is not true by default. On Sep 17, 3:09 pm, ClarkBattle wrote: > Ive tried several interpolators and many different values.  It always >

[android-developers] Re: TextView resets its location after an animation

2010-09-17 Thread ClarkBattle
Android Mobile Phone Application Developer > Database Administrator > .net Web Specialist > > -Original Message- > From: android-developers@googlegroups.com > > [mailto:android-develop...@googlegroups.com] On Behalf Of ClarkBattle > Sent: Friday, September 17, 2010

[android-developers] TextView resets its location after an animation

2010-09-17 Thread ClarkBattle
I am using a Translate animation on a text view. TranslateAnimation animation = new TranslateAnimation( TranslateAnimation.RELATIVE_TO_SELF, 0.0f, TranslateAnimation.RELATIVE_TO_SELF, 0.8f, TranslateAnimatio

[android-developers] Re: A hand of cards

2010-09-16 Thread ClarkBattle
Thanks! On Sep 15, 5:42 pm, Mark Murphy wrote: > Use a RelativeLayout (for the overlapping cards) and a > TranslateAnimation (for the movement of a card). > > On Wed, Sep 15, 2010 at 8:33 PM, ClarkBattle wrote: > > Imagine that you had five overlapped playing cards horizont

[android-developers] A hand of cards

2010-09-15 Thread ClarkBattle
Imagine that you had five overlapped playing cards horizontally fanned so that you could see the top card and the right edges of the other four. Now you slide over the top card until its right edge is on the left of the screen, revealing the body of the second card with the right edges of the rema

[android-developers] Re: Eclipse debugger is skipping instructions!

2010-07-26 Thread ClarkBattle
Great insights. I had broken everything out onto separate lines just to force the compiler to evaluate each separately. I never figured that it would get all smart and ignore what I wrote. I refactored the code and now it runs as expected. Clark -- You received this message because you are s

[android-developers] Eclipse debugger is skipping instructions!

2010-07-23 Thread ClarkBattle
I am debugging an app that tests an API I wrote. There is a section of code that simply reads a DB cursor like this: Cursor row = mDatabase.query("properties", null, where, null, null, null, null, null); if( row != null ) { if( row.moveToFirst() ) // A { int n=row.getColumnIndexOrThrow

[android-developers] Re: All of the sudden => IOException java.net.UnknownHostException: Host is unresolved: www.google.com:443

2010-07-21 Thread ClarkBattle
Strangely, I restarted eclipse and the problem went away. -- 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-develop

[android-developers] All of the sudden => IOException java.net.UnknownHostException: Host is unresolved: www.google.com:443

2010-07-21 Thread ClarkBattle
I have a method that I use to get the auth token for a user. I have been using it for months with no problem. All of the sudden today it stated failing with: IOException java.net.UnknownHostException: Host is unresolved: www.google.com:443 The manifest contains The code has not changed since

[android-developers] Re: Unseen GridViews in a ViewFlipper dont inflate?

2010-02-08 Thread ClarkBattle
Of course, i still dont know why. -- 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+unsubscr...@googlegr

[android-developers] Re: Unseen GridViews in a ViewFlipper dont inflate?

2010-02-08 Thread ClarkBattle
The problem appears to be that findViewById() returns null when looking for the views within the GridView, until the ViewFlipper has flipped a few times. -- 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] Unseen GridViews in a ViewFlipper dont inflate?

2010-02-08 Thread ClarkBattle
Hello, I am having a problem with a calendar app i am writing. I have three GridViews within a ViewFlipper . Each GridView shows a month. The ViewFlipper responds to flings in order to flip to the next or previous month GridView and update the unseen GridViews. The problem is that while the fir

[android-developers] Re: Equally spaced TableLayout grid

2010-02-03 Thread ClarkBattle
I think you just have to use GridView -- 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+unsubscr...@goog

[android-developers] Re: How can a parent handle touch events BEFORE its children?

2010-02-02 Thread ClarkBattle
Brilliant! Thanks :) On Feb 2, 3:15 pm, Romain Guy wrote: > Just override dispatchTouchEvent() in your custom view A and don't > call super.dispatchTouchEvent(). > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don

[android-developers] How can a parent handle touch events BEFORE its children?

2010-02-02 Thread ClarkBattle
I have a custom view (A) that contains a ViewFlipper, which flips between three custom views (B1, B2, B3). Each B view is a LinearLayout containing a TextView and a GridView. The problem is that i need touch events on the GridView to be handled by the A view. This is so that fling events on any G

[android-developers] Equally spaced TableLayout grid

2010-01-29 Thread ClarkBattle
I have a TableLayout where each cell of the table contains a single button or textView. I want to make sure that every cell has the same height and the same width. In other words all column widths are the same and all row heights are the same. Of course, it has to do this while resizing the Tabl

[android-developers] Re: View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
gt; On Thu, Jan 28, 2010 at 2:50 PM, ClarkBattle wrote: > > I have an app with the following code using android 2.0.1 > > > int[] loc = new int[2]; > > > Button btn = (Button) findViewById( R.id.btn3 ); > > if( btn != null ) > >    btn.getLocationInWindow( loc); &

[android-developers] Re: View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
Sorry, in that first example I meant; Log.i("Where?","x=" + loc[0] + " y=" + loc[1] ); not Log.i("Where?","x=" + where[0] + " y=" + where[1] ); Copy/paste user error :) -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this gro

[android-developers] View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
I have an app with the following code using android 2.0.1 int[] loc = new int[2]; Button btn = (Button) findViewById( R.id.btn3 ); if( btn != null ) btn.getLocationInWindow( loc); Log.i("Where?","x=" + where[0] + " y=" + where[1] ); This logs "x=0 y=88" but R.id.btn3 is in the middle of the

[android-developers] Re: Why aren't ACTION_UP and ACTION_MOVE Touch Events passed through to custom views?

2010-01-20 Thread ClarkBattle
to handle events. > > > > On Wed, Jan 20, 2010 at 12:49 PM, ClarkBattle wrote: > > I have an activity defined as: > > > public class MyDemo extends Activity > > { > >       �...@override > >        public void onCreate( Bundle savedInstanceS

[android-developers] Why aren't ACTION_UP and ACTION_MOVE Touch Events passed through to custom views?

2010-01-20 Thread ClarkBattle
I have an activity defined as: public class MyDemo extends Activity { @Override public void onCreate( Bundle savedInstanceState ) { super.onCreate( savedInstanceState ); setContentView( R.layout.main ); } @Override pu

[android-developers] Re: findViewById doesnt work directly after inflate() !! Why?

2010-01-20 Thread ClarkBattle
I ended up changing extending a View to a FrameLayout. This way I can use it as the root in inflate because it is a ViewGroup. I think the problem was that having a null parent in an inflate doesnt actually render the views. I may be wrong about this but it worked for me. Caching the subviews

[android-developers] findViewById doesnt work directly after inflate() !! Why?

2010-01-19 Thread ClarkBattle
I have an activity defined as: public class FlipperDemo extends Activity { @Override public void onCreate( Bundle savedInstanceState ) { super.onCreate( savedInstanceState ); setContentView( R.layout.main ); } } With this in main.xml

[android-developers] CircularLayout for HorizontalScrollView ?

2010-01-15 Thread ClarkBattle
I am writing an day planner that requires fling gestures to horizontally scroll to the next & previous day. Each day contains text and buttons and whatnot. I would like to use HorizontalScrollView for the scrolling. The problem is that a horizontal LinearLayout is bounded at creation. In other

[android-developers] Re: Implementing a touchable calendar

2010-01-12 Thread ClarkBattle
Thanks for your help! On Jan 12, 5:25 pm, Mark Murphy wrote: > ClarkBattle wrote: > > So if I use the 42 buttons approach then is it better to enclose them > > in a TableLayout or a GridView? > > TableLayout, since you don't need selection or scrolling, which are key &

[android-developers] Re: Implementing a touchable calendar

2010-01-12 Thread ClarkBattle
So if I use the 42 buttons approach then is it better to enclose them in a TableLayout or a GridView? Thanks! On Jan 12, 3:50 pm, Mark Murphy wrote: > ClarkBattle wrote: > > Is my "42 buttons is too many" assumption correct? > > If the "assumption" is that it

[android-developers] Implementing a touchable calendar

2010-01-12 Thread ClarkBattle
I am creating a small calendar control that will be part of an application that runs on a larger-than-phone-sized screen. The calendar will simply display the current month and allow users to touch-select a day with an iPhone keyboard style popup bubble indicating which day is chosen. The problem

[android-developers] Re: Android Bug: Time.parse3339 crashes BEFORE it throws a TimeFormatException!

2010-01-08 Thread ClarkBattle
I just confirmed that this is fixed in 2.0.1! -- 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+unsubscr

[android-developers] Android Bug: Time.parse3339 crashes BEFORE it throws a TimeFormatException!

2010-01-08 Thread ClarkBattle
Here is some code I write to parse a 3339 time that I get back from Google's gData: try { Log.d("setUpdated", newTime ); Time time = new Time(); if( time

[android-developers] Re: Why is my eclipse up to date with 2.0.1 but no android tools appear in the UI?

2010-01-05 Thread ClarkBattle
works the same as Vista and 7. > > On Jan 4, 11:24 pm, ClarkBattle wrote: > > > I am installing on Windows 7. > > > Window > Preferences...> Android is not there, even though the tools > > are installed.  Reinstalling Eclipse does not fix the problem. > >

[android-developers] Re: Why is my eclipse up to date with 2.0.1 but no android tools appear in the UI?

2010-01-04 Thread ClarkBattle
I am installing on Windows 7. Window > Preferences...> Android is not there, even though the tools are installed. Reinstalling Eclipse does not fix the problem. On Jan 4, 1:10 pm, ClarkBattle wrote: > I was completely set up with android 2.0 and eclipse.  Everything > worked f

[android-developers] Why is my eclipse up to date with 2.0.1 but no android tools appear in the UI?

2010-01-04 Thread ClarkBattle
I was completely set up with android 2.0 and eclipse. Everything worked fine. Then I tried to upgrade to 2.0.1 and now eclipse wont show any of the android plug in stuff. There is nothing in the IDE relating to android anymore. No AVD, no android projects, nothing. If I go to Help -> Install N

[android-developers] Re: Launching an external activity from a widget

2009-12-23 Thread ClarkBattle
! Clark On Dec 22, 6:12 pm, Mark Murphy wrote: > ClarkBattle wrote: > > The other developer is sitting right next to me.  Its the same > > company. > > Well, that certainly simplifies matters... :-) > > > He just implemented an intent-filter in his manifest to l

[android-developers] Re: Launching an external activity from a widget

2009-12-22 Thread ClarkBattle
button still does nothing. Any ideas? Examples? Thanks On Dec 22, 5:29 pm, Mark Murphy wrote: > ClarkBattle wrote: > > What code do I need to start up an external activity from a widget? > > That would be a fine question to ask the developer of the external > activity. If

[android-developers] Launching an external activity from a widget

2009-12-22 Thread ClarkBattle
I have written a widget that cycles through a series of movie poster images with next/prev buttons. This works. There is another button on the widget that needs to launch an external activity, sending it the name of the shown movie. The other activity is not in the same namespace, package or ecl

[android-developers] How do I create a jar containing the .class files in bin?

2009-11-19 Thread ClarkBattle
I am making an API for my own use. It is an Android project in eclipse. An Android activity project in the same workspace uses it to do stuff. Or at least, thats the idea. The problem is that when i try to export the API as a jar that can be used by the activity the JAR wizard only shows me sour

[android-developers] CalendarService -> ExceptionInInitializerError

2009-11-05 Thread ClarkBattle
I am trying to use the CalendarService in an android app to add events to my google calendar. I get a ExceptionInInitializerError when instantiating the class. CalendarService myService = new CalendarService( "MyCalendar" ); Is this not supported in android? If not then how do you do it? I als

[android-developers] Re: Eclipse Layout Editor Not Showing

2009-11-03 Thread ClarkBattle
This happened to me too. Thanks! On Oct 29, 6:40 pm, Open wrote: > Figured it out myself.  I had to specify the Android Layout Editor as > the default for Android XML files under Preferences -> General- > > >Editors->File Associations. > > On Oct 29, 7:33 pm, Open wrote: > > > > > > > Relative

[android-developers] AVD with a custom resolution

2009-11-03 Thread ClarkBattle
I created a new AVD in Eclipse for Eclair with a custom skin resolution or 1024x600 (called BigEclair). When I run apps on it the AVD crashes. [2009-11-03 11:54:47 - Timer]Android Launch! [2009-11-03 11:54:47 - Timer]adb is running normally. [2009-11-03 11:54:47 - Timer]Performing com.icd.timer.T

[android-developers] Re: Need an invitation to google Wave?

2009-11-03 Thread ClarkBattle
I'd love one! Thanks On Oct 31, 10:20 pm, Auguste Lunang wrote: > Hi, > i have some google wave. invits to share. tell me if u want .. > thx -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-dev

[android-developers] Re: Example Needed: a view containing a reference to its activity

2009-10-28 Thread ClarkBattle
e custom view used the saved reference to your activity class to > call back into your activity class when you need to. > > -- > RichardC > > On Oct 28, 7:40 pm, ClarkBattle wrote: > > > I have a custom view that needs a reference to the activity that > > created

[android-developers] Re: Example Needed: a view containing a reference to its activity

2009-10-28 Thread ClarkBattle
But my activity never explicitly calls the view's constructor. The activity simply calls: setContentView( R.layout.main ); in its onCreate() method, and the custom view is specified in the main.xml. I think the constructor is called when the device is booted. Is there another way to set the

[android-developers] Example Needed: a view containing a reference to its activity

2009-10-28 Thread ClarkBattle
I have a custom view that needs a reference to the activity that created it. Dianne Hackborn said in another thread: >Give your view a reference to the activity (or a Java interface it implements) >and call back through that. >Much much MUCH more efficient than sending a broadcast. >See all of t

[android-developers] Re: Architecting a count down timer

2009-10-26 Thread ClarkBattle
CountDownTimer! Thanks again. On Oct 22, 6:44 pm, Mark Murphy wrote: > ClarkBattle wrote: > > TimerActivity.onCreate() inflates the TimerView (allowing the user to > > set the time and hit the start button) and starts the TimerService. > > Creating a custom View is certainly poss

[android-developers] Architecting a count down timer

2009-10-22 Thread ClarkBattle
I am writing a timer application that counts backward from a time and notifies when the timer reaches zero. It is intended to allow the user to start a timer that continues to tick and will notify them when complete even after the activity is backgrounded. Also, it will show the correct in-progr