[android-developers] problem with spanish characters in android app

2011-05-18 Thread bobetko
I have issue with spanish characters in java string. I have a content RSS feed and when i try to transform it to java object using InputStreamReader, I get outputs like cómo which should be cómo. This is happening with other spanish characters like á = á é = é í = í ó = ó ú = ú and more..

[android-developers] Re: Problem with using back button when on home activity

2011-01-21 Thread bobetko
Thank you. Will try this. -- 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

[android-developers] Problem with using back button when on home activity

2011-01-20 Thread bobetko
I am sure this is easy, but can't find solution for this. My app structure is something like this: HomeActivity subActivity subSubActivity subSubSubActivity On each activity (except home) in top left corner I have Home Icon which creates new Intent and starts home activity with StartActivity.

[android-developers] How to implemennt OnZoomListener on MapView

2011-01-18 Thread bobetko
I would like to have onZoomListener on my MapView. The code below is what I have done. It registers if zoom buttons are tapped. Since all new phones now supports pinch to zoom, this is useless. Does anybody have idea how to do real onZoomListener? Thanks. OnZoomListener listener = new

[android-developers] Re: How to implemennt OnZoomListener on MapView

2011-01-18 Thread bobetko
I had to subclass MapView and override dispatchDraw Here is the code: int oldZoomLevel=-1; @Override public void dispatchDraw(Canvas canvas) { super.dispatchDraw(canvas); if (getZoomLevel() != oldZoomLevel) {

[android-developers] Problem with large number of markers on google map

2011-01-17 Thread bobetko
I am working on an Android app that already exists on iPhone. In the app, there is a Map activity that has (I counted) around 800 markers in four groups marked by drawable in four different colors. Each group can be turned on or off. Information about markers I have inside List. I create a

[android-developers] Re: Problem with large number of markers on google map

2011-01-17 Thread bobetko
You are right about populate() calls. I've picked up implementation of ItemizedOverlay from some online example and didn't question its validity. Now, when I pay attention, It makes sense what you said. The posted code is run only when user touch an option to do so. Thanks a lot TreKing... --

[android-developers] Re: HeaderView in ListView causing ClassCastException

2010-12-14 Thread bobetko
Kostya, I tried to do as you suggested. and non of it worked. 1) Don't want to add my header view into list's parent. It simply doesn't achieve what I want to do. I would like to add it to the parent that holds list view items. I have parent available in adapter's GetView method. When I tried to

[android-developers] Re: HeaderView in ListView causing ClassCastException

2010-12-14 Thread bobetko
Thanks, I tried this. I got ClassCastException when adapter.notifyDataSetChanged() was executed. Thanks anyway. -- 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

[android-developers] How to set top margin off the first item inside listview?

2010-12-14 Thread bobetko
I would like to add Top Margin on the first item in the ListView. Is that possible? Or, how can I reference first list item in the List View? I tried lv = (ListView)getListView(); View myRowItem = lv.getChildAt(0); This probably doesn't work because at the moment I executed it, list items

[android-developers] Re: How to set top margin off the first item inside listview?

2010-12-14 Thread bobetko
Can you please explain how to add topMargin to listView item at position 0? For example, I can add topPadding on first item using parameter position. Test if position is equal 0, add padding, if not, remove padding. (I sort of not like this, but it seems it is the only way) The thing is, I cannot

[android-developers] Re: How to set top margin off the first item inside listview?

2010-12-14 Thread bobetko
a header view. In that case, set android:paddingBottom on the header view. -- Kostya 14.12.2010 20:27, bobetko пишет: I would like to add Top Margin on the first item in the ListView. Is that possible? Or, how can I reference first list item in the List View? I tried lv

[android-developers] Re: How to set top margin off the first item inside listview?

2010-12-14 Thread bobetko
Here is my GetView method. public View getView(int position, View convertView, ViewGroup parent) { LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); lp.topMargin =

[android-developers] Last night I posted question in this group and it is gone???

2010-12-12 Thread bobetko
Is it gone or actually it never appeared because it was not approved. Is there some moderation process behind the scene? If it is, I would love to be let known that my question is thrown into junk. This is really annoying. It happened to me before. I actually thought I was drunk or so, so maybe I

[android-developers] Re: Last night I posted question in this group and it is gone???

2010-12-12 Thread bobetko
Groups doesn't find the message: http://groups.google.com/group/android-developers -- Kostya 12.12.2010 18:13, bobetko пишет: Is it gone or actually it never appeared because it was not approved. Is there some moderation process behind the scene? If it is, I would love to be let known

[android-developers] Re: onSaveInstanceState problem while making oAuth request

2010-12-12 Thread bobetko
I thought about that. But, then another question come to my mind. Why wouldn't I always use SharedPreferences to save my activity state? For example: I passed groupID and itemID values into activity. In onCreate, I save both values to SharedPreferences. Latter, when activity is restarted (for any

[android-developers] Re: onSaveInstanceState problem while making oAuth request

2010-12-12 Thread bobetko
Thanks Dianne, I've look at logs and my app is crashing because my RowID value is null. RowID is record ID that is needed to query sqlite database. I could post here all my code, but I doubt it would be very useful... I'll try explaining better with some code snippets: This is what I execute

[android-developers] Re: onSaveInstanceState problem while making oAuth request

2010-12-12 Thread bobetko
Sorry. Yes. You are right. onCreate runs first, then onResume next. (I am still learning about Android activity cycle :-) Here is my onResume method that handle this data that comes from Twitter. See lines 5 and 6. If 6 is true I am extracting token and secret and saving them to SharedPreferences.

[android-developers] onSaveInstanceState problem while making oAuth request

2010-12-11 Thread bobetko
In my app at some point I am making oAuth request to authorize user with Twitter. App opens WebView in which user enter his credentials. Upon user pressing Allow button, twitter sends Intent (which contains token and secret) back to my app so user can start when he/ she left of. The problem is my

[android-developers] HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
I have added a view to the header of my ListView by following way: ListView lv = (ListView)getListView(); View TopSearch = (View) View.inflate(this, R.layout.search, null); lv.addHeaderView(TopSearch, null, false); And everything is fine until I make changes to data

[android-developers] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
Here it is: 12-10 11:35:28.111: ERROR/AndroidRuntime(25364): FATAL EXCEPTION: main 12-10 11:35:28.111: ERROR/AndroidRuntime(25364): java.lang.ClassCastException: android.widget.HeaderViewListAdapter 12-10 11:35:28.111: ERROR/AndroidRuntime(25364): at

[android-developers] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
, the code doesn't produce any error if I comment 2 lines where I add header view. Thanks, On Dec 10, 11:42 am, TreKing treking...@gmail.com wrote: On Fri, Dec 10, 2010 at 10:37 AM, bobetko bobe...@gmail.com wrote: Any suggestions? When do you set your adapter

[android-developers] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
line 130 is this: ((Filterable) adapter).getFilter().filter(s); -- 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] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
I call setHeaderView in onCreate, before I set myAdapter. -- 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] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
Yes. myAdapter implements Fliterable -- 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] Re: HeaderView in ListView causing ClassCastException

2010-12-10 Thread bobetko
Thank you very much Kostya. -- 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] OnKeyListener not working on virtual keyboard

2010-11-25 Thread bobetko
I don't understand why this peace of code is not working. OnlyDelete and Return keys are detected. Listener doesn't fire for any other key. My device is Nexus One. I tried to override activity's OnKeyDown method and that's even worse. The only detected button was hardware back button. I am

[android-developers] Re: TCP problem - hangs when reading server's response

2010-11-14 Thread bobetko
The server app was written for iPhone witch maybe handle some things differently. As a message terminator server app author used OK sequence (I will ask him why), so I definitely couldn't use readLine(). It turned out there was more then one problem. In line 4, I had to replace all characters

[android-developers] Re: Expandable ListView (how to collapse, expand groups and remove groups)

2010-11-13 Thread bobetko
Yes, my ELV is backed by BaseExpandableListAdapter. I had this code in my app: ListView lv; lv = getExpandableListView(); This worked, but I was not able to see all available methods for myExpandableListView. Thanks a lot. -- You received this message because you are subscribed to the Google

[android-developers] TCP problem - hangs when reading server's response

2010-11-13 Thread bobetko
I am trying to write client for Android which is supposed to communicate with PC server application on local network. Server app is written by my friend in C#. Currently there is an iPhone app that is using this server application with no problems. I have very simple code for TCP client: 1.

[android-developers] Re: TCP problem - hangs when reading server's response

2010-11-13 Thread bobetko
And one more thing, Encoding.UTF8 is used. Not sure if that might be important. -- 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

[android-developers] Re: TCP problem - hangs when reading server's response

2010-11-13 Thread bobetko
I tried: input.read(); I also tried to read Reader the same way: Reader in = new InputStreamReader(s.getInputStream()); in.read(); Out of desperation I tried to recompile to 2.2 (now is 2.1). -- You received this message because you are subscribed to the Google Groups Android Developers group.

[android-developers] Expandable ListView (how to collapse, expand groups and remove groups)

2010-11-12 Thread bobetko
In my app I have nice ExpandableListView. I would like sometime, depending of situation, to expand some or all groups. I would also like to be able to remove/hide groups, expand all and basically have (visually) ExpandableListView without groups. I looked at all available methods for

[android-developers] How to set layout_gravity of RelativeLayout programmatically?

2010-11-09 Thread bobetko
I have ScrollView with RelativeLayout as a child of ScrollView. I am trying through JAVA code to set Layout_Gravity to CENTER so my RelativeLayout is centered (horizontally and vertically) in the middle of ScrollView (that covers whole screen). This works fine in XML and produces desired result,

[android-developers] Re: Multiple calls to SimpleCursorAdapater#bindView

2010-11-09 Thread bobetko
I will reply to myself on this one... I learned that if I set my list's layout_height to WRAP_CONTENT, the problem is no more. Wonder 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] Re: How to set layout_gravity of RelativeLayout programmatically?

2010-11-09 Thread bobetko
I tried another approach. I defined my RelativeLayout in XML exactly the way I liked it. Then I used inflater and dynamically added my RelativeLayout to ScrollView It didn't work. It simply ignored all my XML settings. For example, it fully filled the parent (ScrollView) even though I explicitly

[android-developers] Re: Introducing Aproov - A new and better app store for Android and mobile app developers

2010-11-09 Thread bobetko
I wouldn't bet my life on this, but I think in Android case, carriers are those who take 30%, not Google. So, that's why I think Google doesn't care about all these new Android Markets. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: How to set layout_gravity of RelativeLayout programmatically?

2010-11-09 Thread bobetko
Not sure I understand. My RelativeLayout is enclosed in ScrollView and ScrollView doesn't have gravity property. -- 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

[android-developers] Re: How to set layout_gravity of RelativeLayout programmatically?

2010-11-09 Thread bobetko
Thank You Kostya, I did as you said and it works. Here is what I have done: RelativeLayout myRelativeLayout = new RelativeLayout(this); myRelativeLayout.setGravity(Gravity.CENTER_HORIZONTAL); ScrollView.LayoutParams myRelativeLayoutParams = new ScrollView.LayoutParams(

[android-developers] Multiple calls to SimpleCursorAdapater#bindView

2010-10-03 Thread bobetko
I am using setViewValue method of ShowViewBinder to access image inside row of listView. The idea is to load image from internet and display it inside row of listView. To load image, I am starting new image loader thread, but what I discovered when debugging this code, for each row I am actually

[android-developers] How to attach custom map on MapView? Can MapView be used when phone is offline?

2010-07-09 Thread bobetko
I am trying to place my custom map (overlay) over Google map. For example, my MapView will be positioned to look at some building. I want to load custom image(s) that will show building's floor plan. Want to be able to pan and zoom, and place markers (for example, Room 1, Room 2, etc...), in other

[android-developers] Re: How to attach custom map on MapView? Can MapView be used when phone is offline?

2010-07-09 Thread bobetko
I was hoping to use MapView in my application. It seems I will have to come up with something else. Thanks for quick reply. -- 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] problem creating custom dialog...

2009-10-08 Thread bobetko
I am using example for creating custom dialogs on dev.android.com. See code below. The problem is that second line is crashing application (fore close) ## Context mContext = getApplicationContext(); I can make dialog to work if I replace line with ## Context mContext = this; My