[android-developers] Developing a dictionary
Dear all, I am currently learning to develop Android applications, and to do this I have decided to develop a dictionary application. The UI, and search facilities are no problem to implement, but my question is, what is the best way to store the entries and definitions for the dictionary? Would XML be the best approach? I would be looking to include 500 - 1000 entries. Thank you for your help Angus Rose -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
[android-developers] Re: Developing a dictionary
OK, thanks for the swift reply. I'll give it a go. Regards Angus On Mar 23, 10:01 am, timo prill wrote: > hi, > > best way is to use a database to store your data. > have a look at > this:http://developer.android.com/intl/fr/guide/topics/providers/content-p... > > cheers. > > angushir...@googlemail.com schrieb: > > > > > Dear all, > > I am currently learning to develop Android applications, > > and to do this I have decided to develop a dictionary application. The > > UI, and search facilities are no problem to implement, but my question > > is, what is the best way to store the entries and definitions for the > > dictionary? Would XML be the best approach? I would be looking to > > include 500 - 1000 entries. > > > Thank you for your help > > > Angus Rose -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
[android-developers] AlertDialog in Android 1.5 and 2.0 / 2.0.1
Dear all, I am using AlertDialogs in an Android application, and find that when I run them in an emulator that's configured for Android 2.0 or 2.0.1 SDK they appear fine and function as I intended. However, running them in emulators configured for the Android 1.6 SDK or lower, then nothing appears when it should. Is this a bug in the emulator, or are there major differences in the SDKs when it comes to using AlertDialogs. Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ERROR/AndroidRuntime(703): java.lang.VerifyError
Dear all, I'm using the Android Development Toolkit (ADT) in Eclipse Galileo. I've created a project in which to develop some util classes, which I intend to use in several upcoming Android projects. However, when I come to use these util classes (deployed as a jar and included in the Android project as a user library), I get a java.lang.VerifyError during the startup of the emulator. Can I force the verification of these library files, or do I need to include them as part of the Android project, and not as an external jar? Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is ViewFlipper startFlipping() random?
Dear all, I'm developing an application that can take an arraylist of images of varying length and display them in the order in which they are added to the arraylist. I use viewFlipper.addView() to add each image. When I call startFlipping() the images are displayed, but not in any particular sequence, and they are then repeatedly displayed in a random sequence and not in the original sequence. Has anyone else found this? If so, what's the work around? Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.
[android-developers] Dialog display duration
Dear all, I need to display an alert message for no more than a half a second. As I understand it, Toast only has 2 available durations, with no way to alter them. Correct me if I'm wrong. Which leads me to sing the AlertDialog. What would be the best way of displaying a dialog for 500ms and then dismissing it? Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Hotspot in ImageView
Dear all, how can I implement an imageview that has touch-sensitive hotspots so that when the user touches one, a dialog or something similar appears. Thanks in advance Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How many Android phones have touchscreens?
Hi all, a simple question from a beginner - how many of Android phones support touchscreen applications? Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] View not refreshing
Hi all, I've extended the View class to create a custom View that draws a shape in the onDraw method. The dimensions of the shape are derived from calling getMeasuredWidth() and getMeasuredHeight(). This works fine when I create one and add it to an alert dialog using builder.setView(). However, if I create an arraylist of customviews and add one at random to the alert, the actual shape is not drawn. In the logs, the getMeasuredWidth() and getMeasuredHeight() show as 0 initially, but after adding them to the alert they become 236 and 345, which is fine. However, the shape does not appear. I've tried all the suggested methods such as invalidate() but to no avail. Any suggestions? Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ViewFlipper problem
Dear all, I'm using a viewflipper in an application. At start up I load 50 views into the viewflipper but the viewflipper child count stays at 3. This is obviously not what I want. Any suggestions as to how I get the viewflipper to hold more than 3 views? Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] One clicklistener for many buttons.
Dear all, I'm implementing an app that has 12 buttons placed in a grid. When one is pressed, the number that the button displays (through button.getText()) has to be retrieved and passed to a common method. I've gone down the route of implementing OnClickListener e.g. public class WordRecall extends Activity implements OnClickListener and then overriding public void onClick(View v) to handle events. However, what I want to avoid is having to repeat the following lines 12 times : Button btn4Button = (Button)findViewById(R.id.fourWords); btn4Button.setOnClickListener(this); Is there a way in Android 1.5 of avoiding this as there is in 1.6? Am I better off using 1.6 for development instead of 1.5? Regards Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Launching an activity using Linkify
Dear all, I'm not sure if this can be done, but is it possible to launch an activity from text that has been Linkified? I'm basically providing an illustrated glossary, and when the user clicks on a highlighted term, I want the activity that handles display of the image and associated text to fire up. I also need to pass in some parameters to the activity being launched. Thanks for any help Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Launching an activity using Linkify
Top answer. Thanks for that. Now just need a neat and tidy way of passing arguments into the activity being called. On Jul 22, 9:21 pm, Matt wrote: > Yes. > > 1. Create a class which inherits ClickableSpan. See URLSpan for an > example. > 2. Your action will go into onClick() of this class. > 3. Set the text with setSpan(). > > I have an example here, although this is using a URLSpan, you would > need to change URLSpan to your custom ClickableSpan class. > > /** > * Adapted from the {...@link android.text.util.Linkify} class. > Changes > the > * first instance of {...@code link} into a HTTP link with the given > {...@code > * url}. > */ > public static void linkify(TextView view, final String link, > final String url) > { > CharSequence text = view.getText(); > String string = text.toString(); > > URLSpan span = new URLSpan(url); > int start = string.indexOf(link); > int end = start + link.length(); > > if (start == -1) > return; > > if (text instanceof Spannable) > { > ((Spannable) text).setSpan(span, start, end, > Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); > } > else > { > SpannableString s = SpannableString.valueOf(text); > s.setSpan(span, start, end, > Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); > view.setText(s); > } > > // Adapted from Linkify.addLinkMovementMethod(), to make links > clickable > // > MovementMethod m = view.getMovementMethod(); > if ((m == null) || !(m instanceof LinkMovementMethod)) > { > > view.setMovementMethod(LinkMovementMethod.getInstance()); > } > } > > On Jul 22, 3:13 pm, "angushir...@googlemail.com" > > > > wrote: > > Dear all, > > I'm not sure if this can be done, but is it possible to > > launch an activity from text that has been Linkified? I'm basically > > providing an illustrated glossary, and when the user clicks on a > > highlighted term, I want the activity that handles display of the > > image and associated text to fire up. I also need to pass in some > > parameters to the activity being launched. > > > Thanks for any help > > > Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dictionary application.
I am currently developing a small dictionary application of 1000 - 2000 terms and their definitions. What would be the best way of inserting this data in SQLite? In the code or read in from XML and then inserted? Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Embedding appwidget in activity
Hi all, I need to implement a reusable view for use in several Android applications. Would it be possible to develop an appWidget that can be embedded in an activity, or am I best off providing a customised component? Thanks in advance Angus -- 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, visit this group at http://groups.google.com/group/android-developers?hl=en