[android-developers] Re: same app one tablet and phone with differnt gui

2011-09-12 Thread jjoe64
this is possible with a few tricks. have a look at my blog post: http://www.jjoe64.com/2011/07/universal-app-for-smartphones-and.html -- 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@

[android-developers] Re: How can i remove item in listview

2011-09-12 Thread jjoe64
you have to delete the item in the content provider. set a notify url to your cursor and notify change from content provider after deleting. the list will automatically be updated. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post t

[android-developers] best practice for testing complex app

2011-08-01 Thread jjoe64
For me it's unclear how to test my activity. My Activity works together with my ContentProvider. To test the functionality, I need to restore for every test a test scenario (fixtures) on my SQLite database. At the moment I'm doing this so: *MainActivityTest#setUp*: contentResolver = getInstrume

[android-developers] how to force restart activity from intent

2011-07-26 Thread jjoe64
hello. my MainActivity has the lauchMode="singleTask" now I want to start the activity from a notification with special intent data. in MainActivity#onResume I access the given intent data... the problem is: When the activity already exists, and I click on the notification, the activity comes t

[android-developers] correct use of Loaders with ExpandableListView (honeycomb)

2011-07-12 Thread jjoe64
Hello. For honeycomb I'm refectoring my app to use the new Loader classes introduced here: http://developer.android.com/guide/topics/fundamentals/loaders.html This example uses a simple ListView with *SimpleCursorAdapter*. But my app uses a *ExpandableListView* with *SimpleCursorTreeAdapter*.

[android-developers] Aw: List with checkboxes problem

2011-07-12 Thread jjoe64
try to use android.R.layout.checkable list item or something like that. have a look to the source code... -- 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 unsubscri

[android-developers] Android SQL problem on app similar to notepad tutorial:CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

2011-07-04 Thread jjoe64
The content Provider returns null if there was a SQL error. Have a look in logcat. If you send me your source Code i could take a closer look into your Problem. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send em

[android-developers] Android SQL problem on app similar to notepad tutorial:CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

2011-07-04 Thread jjoe64
The content Provider returns null if there was a SQL error. Have a look in logcat. If you send me your source Code i could take a closer look into your Problem. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send em

[android-developers] Aw: CursorAdapter over multiple columns

2011-06-29 Thread jjoe64
i don't understand your problem. did you joined your two tables? -- 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

[android-developers] Aw: Finishing Activities

2011-06-29 Thread jjoe64
I'm not sure about your problem, but maybe something like that will help you: - start the activity LOGIN from activity HOME with the method startForResult - LOGIN-activity: when back pressed set the result to -1 - HOME-acitivty: check the result and if it's -1 call finish again. -- You received

[android-developers] Aw: Shared preference

2011-06-22 Thread jjoe64
the best practice whould be, if you create a custom content provider (with sqlite). then you can insert every new lat/lng dataset. and the listview gets the data from the content provider (listadapter) -- You received this message because you are subscribed to the Google Groups "Android Develop

[android-developers] Aw: Persistent

2011-06-22 Thread jjoe64
just hold these data in memory, or if this is much data or you want to be sure that they persist, you can cache it, see documentation: *Saving cache files* If you'd like to cache some data, rather than store it persistently, you should use getCacheDir()

[android-developers] Aw: WebSerivce Integration

2011-06-21 Thread jjoe64
parse it in background and as a stream. never read it with a buffer, don't create objects for every node/attribute ... -- 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

[android-developers] Aw: Please help ----> geting error to send httpPost to server

2011-06-20 Thread jjoe64
you have to encode your url. Something like that: url = URLEncoder.encode(url, "UTF-8") -- 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

[android-developers] Aw: SQLiteOpenHelper

2011-06-20 Thread jjoe64
hi first, you should have a look at logcat. did you set up your db helper properly (constructor must call super-constructor, oncreate must create the table(s))? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send e

Aw: Re: [android-developers] Aw: Object Structure

2011-06-18 Thread jjoe64
yes. if you do a query on your content provider (though listview/adapter or manually with content resolver), it returns only a cursor (pointer) to the data, that's the reason why the memory space is saved and performance will increase. -- You received this message because you are subscribed to

[android-developers] Aw: Display tearing Issue

2011-06-17 Thread jjoe64
is there anything relevant in the logcat? -- 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...

Aw: Re: [android-developers] Aw: Object Structure

2011-06-17 Thread jjoe64
oh that's really bad practice. your listview has to use a listadapter (e.g. ResourceCursorAdapter) that adapter connects your content provider and there you can perform SQL queries to read the data from db. first it looks a little bit complicated but you should really use this, not only for perf

[android-developers] Aw: Object Structure

2011-06-17 Thread jjoe64
hi you shouldn't hold munch data structure in objects because of the low memory on mobile devices. Instead you should use the sqlite feature and query, update, delete through a Content Provider. Don't work with Lists of Maps (List>) or something like that for data storing. I'm currently refacto

[android-developers] Aw: how to change image in android while switching between activities

2011-06-17 Thread jjoe64
hi when you click the back button and the activity A comes, the code method ActivityA#onResume will be called. maybe that helps you. furthermore you should have a look at the method Activity#startActivityForResult http://developer.android.com/reference/android/app/Activity.html#StartingActiviti

[android-developers] Aw: layout background image with full display

2011-06-17 Thread jjoe64
Did you set the property *android:layout_height* to *fill_parent* for the linearlayout? -- 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

[android-developers] Aw: click on component of ListView items

2011-06-17 Thread jjoe64
hi, just set the onclicklistener for the image view in the list adapter. something like that: ResourceCursorAdapter adapter = new ResourceCursorAdapter(getApplicationContext(), R.layout.list_events_entry, cursor, true) { public void bindView(View view, Context context, Cursor cursor) { I

[android-developers] Re: how to unit test drag n drop - honeycomb

2011-05-10 Thread jjoe64
, 0); instrumentation.sendPointerSync(event); instrumentation.waitForIdleSync(); On 6 Mai, 10:06, jjoe64 wrote: > hello, > > since honeycomb (api level 11) there is a the feature "dragging and > dropping". > I wrote a very small and simple app to get inv

[android-developers] unit testing app widgets (AppWidgetProvider)

2011-05-09 Thread jjoe64
Hello, I have created a simple app widget: One Button and one TextView. When I click on the button, the text in the textview changes. Now I whould like to test this functionality in a junit test, but the framework only provides test helper for activities (ActivityInstrumentationTestCase2, Activit

[android-developers] how to unit test drag n drop - honeycomb

2011-05-06 Thread jjoe64
hello, since honeycomb (api level 11) there is a the feature "dragging and dropping". I wrote a very small and simple app to get involed with this new feature. Now I'd like to unit test this. I tried two ways to test it: 1. Robotium: solo.drag(...) 2. TouchUtils.dragViewBy(this, img, Gravity.TOP

[android-developers] how to test activity in portrait orientation - honeycomb

2011-05-05 Thread jjoe64
Hello. I would like to unit test my app in portrait orientation. (For honeycomb the default orientation is landscape.) First I set the orientation to portrait by calling the method getActivity().setRequestedOrientation(...) So far so good. Now I simulate a click on a button and then a new activi