Android :: GestureOverlayView Throwing Exception When Used With Linkify
May 28, 2010
I have a GestureOverlayView over the top of a TextView. The TextView has Linkify.addLinks(tv, Linkify.ALL) called on it.
If you click on an URL in the TextView the following exception is thrown Running 2.2 (apparently a pre-release version)
CODE:...............
View 5 Replies
Nov 20, 2010
Why the following xml file should throw NullPointer exception? If I remove all reference to the array hrs_to_wait_values it is ok.
CODE:..............
View 1 Replies
View Related
Jul 29, 2010
Im trying to get an object form my SQLite database in my Android application. I know that the contact is in the database because when I add it and try finding by ID, it returns the object. When I try finding by first and last name, though, it throws an exception and Im left with a null reference.
Here is the query:
CODE:..........
Ive also tried to find just by first name and just by last name. Same result as above.
The exception is an SQLite exception
no such column: aurelius: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus AND last_name=aurelius
And also happens when trying to select just first or last name
no such column: marcus: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus
View 1 Replies
View Related
Aug 6, 2010
I am accessing a URL that's redirecting me to a URL with spaces in it. (Using HttpClient 4.x) How do I prevent this from throwing an error (replacing the spaces with %20 not +)
CODE:..................
View 3 Replies
View Related
Apr 7, 2010
I'm currently working on an android app that pulls a list of forums from a JSON feed. I'm trying to parse the feed and immediately upon calling getJSONArray a JSON exception is being thrown with no stack trace. The JSON being returned is stored in an JSONObject jobj with the format as follows: However when running the following code, I get an immediate exception without a stack trace: Code...
View 1 Replies
View Related
Apr 6, 2010
I created a TextView and put an url to it, using setText(Html.fromHtml("");. Its opening the web page in the built-in browser and when I press back, its coming back to the application.
I don't want to come back to the application, so in activity's onResume(), I call finish(). Its exiting at the first time. But when I open the application again, its throwing some exception.
Any other way to close the application, other than this way.
View 2 Replies
View Related
Aug 27, 2010
I'm having trouble with a spiner throwing a nullPointerExpression I'm sure I'm missing something stupid? Code...
View 2 Replies
View Related
Jan 25, 2010
I have added this line in my androidManifest.xml <uses-permission android:name="android.permission.INJECT_EVENT"/>
I am trying to execute following code:
CODE:........
Both above lines are throwing exception W/System.err(762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission.
Do we need anything else too to get it working ?
View 4 Replies
View Related
Apr 27, 2010
I have been using some nice tutorials on drawing graphics on my android. I wanted to also add in the cool gesture demo found here:
http://developer.android.com/resources/articles/gestures.html
That takes these lines of code:
CODE:..............
This is fine and dandy yet I realize in my demo i'm trying to build using code from "Playing with Graphics in Android". The demos make sense, everything makes sense but I found out by using: setContentView(new Panel(this));
As is required by the Playing With Graphics tutorials, then the findViewById seems to no longer be valid and returns null. At first I was about to post a stupider question as to why this is happening, a quick test of playing with the setContentView made me realize the cause of findViewById returning null, I just do not know how to remedy this issue. Whats the key I am missing here? I realize that the new Panel is doinking some reference up but I am not sure how to make the connection here.
The: R.id.gestures is defined right int he main.xml as:
CODE:.............
So I did confirm the setContentView(new Panel(this)) is causing the issue. So I know the issue is that I have to figure out how to add the android.gesture.GestureOverlayView to the panel class somehow, I am just not sure how to go about this.
After fighting with this I generally know what I need to do just now how to do it. I think I need either the equivalent of creating a panel in that main.xml OR figuring out how to build whats in main.xml for the gestures in code. I am close because I did this: GestureOverlayView gestures = new GestureOverlayView(this); which gets me a non null gestures now, unfortunately since I am not telling it to fill Parent anywhere I don't think its really showing up, so I am trying hard to figure out layout pa rams. Am I even on the right track?
View 1 Replies
View Related
Aug 24, 2010
I am using GestureOverlayView with ViewFlipper, and it takes about one second for the android to recognize my gesture and flip to next view. However, the Android calendar flips almost immediately. I checked the Android calendar code, and it uses GestureDetector. Is there big difference between these two gesture detecting mechanisms?
I am also wondering what's the difference between these two mechanism of detecting gestures. I know GestureOverlayView came out at 1.6, while GestureDetector was in 1.0. But why didn't they just deprecate GestureDetector when GestureOverlayView came out?
View 1 Replies
View Related
Aug 30, 2010
I have a ListView with GestureOverlayView, when user swipe left, it mark the ListView Item. It is working perfectly. only thing I don't like to see is when user swipe it display the yellow color stroke line. Is there any way I can make it not to display the Stroke when user perform gesture?
View 2 Replies
View Related
Jul 2, 2010
With the XML layout shown below, I have some views wrapped in a GestureOverlayView. As shown below, my first row is blended with the second row, as-if the first row is transposed right on top of the second. Now when I take the GestureOverlayView out of the code and leave everything else as-is, my table looks fine - the rows are separate and not on top of each other..........
View 1 Replies
View Related
Jul 30, 2010
I was informed in a later answer that I have to add the GestureOverlayView I create in code to my view hierarchy, and I am not 100% how to do that. Below is the original question for completeness.
I want my game to be able to recognize gestures. I have this nice SurfaceView class that I do an onDraw to draw my sprites, and I have a thread thats running it to call the onDraw etc .
This all works great.
I am trying to add the GestureOverlayView to this and it just isn't working. Finally hacked to where it doesn't crash but this is what i have
CODE:..........
The onGesturePerformed is never called. Their example has the GestureOverlay in the xml, I am not using that, my activity is simple:
CODE:................
So I am at a bit of a loss of the missing piece of information here, it doesn't call the onGesturePerformed and the nice pretty yellow "you are drawing a gesture" never shows up.
View 1 Replies
View Related
Jul 14, 2010
I created a sql lite database with the following columns:
static final String dbName="demoDB";
static final String tableName="Employees";
static final String colID="EmployeeID";
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL("CREATE TABLE "+tableName+" ("+colID+" INTEGER PRIMARY KEY AUTOINCREMENT, "+
colName+" TEXT, "+colAge+" Integer);");
I want to select all the records in the database like this and display them in a gridview:SQLiteDatabase db=this.getWritableDatabase();Cursor cur= db.rawQuery("Select "+colName+", "+colAge+" from "+tableName, new String [] {});String [] from=new String []{DatabaseHelper.colName,DatabaseHelper.colAge};
int [] to=new int [] {R.id.colName,R.id.colAge};
SimpleCursorAdapter sca=new SimpleCursorAdapter(this,R.layout.gridrow,c,from,to);
GridView grid=(GridView)findViewById(R.id.grid);
grid.setAdapter(sca);but i receive the following exception:java.lang.IllegalArgumentException: column '_id' does not exist.the db table does not have a column with name '_id'so what is wrong with this code
View 3 Replies
View Related
Sep 30, 2010
I have listview and i call intent from the listview onitem selected method but when i get linkfy textview in my listrow than i am not able to call intent from the onItem selected method.
View 1 Replies
View Related
Jul 22, 2010
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.
View 3 Replies
View Related
Jan 1, 2010
I got the @s linkifying no problem with @([A-Za-z0-9_]+) like this:
CPDE:..........
However, when i try to do the same with hashtags the hashtag part is not passed to the link. This is what I tried:
CODE:..........
It is not the matter of the hashViewURL (I tried with %23 etc.), somehow the extracted hash is not appended to the url. The hash tag is properly showing as link but the link only points to raw hashViewURL from above http://search.twitter.com/search?q=#
View 2 Replies
View Related
Jun 7, 2010
I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links:
CODE:......
Here is the code that is calling it:
CODE:.......
I understand what the error is saying but I am not sure how to fix it.
View 1 Replies
View Related
Jul 20, 2010
I am using Linkify with a custom TransformFilter. Is it possible to tell linkify to only match the first occurence of my pattern?
View 1 Replies
View Related
Aug 9, 2010
I have HTML with standard links which correspond to commands I'd like to handle.
This is <a href="CMD:nice">a command</a>.
I populate a TextView with Html.fromHtml()
How can I use the Android Linkify system to convert the links to Linkify'ed ones?
View 1 Replies
View Related
Oct 11, 2010
I'm working with a CheckBox that needs to hace some links appearing as text, not urls. I'm using something like this:
CODE:................
If I understand well, if the text in the checkbox contains "(something here)" it should output "something here" without parentheses.
This is just a test before adding the link ie. (go to google-http://www.google.com)
The thing is the links look like links but they are not modified (still with parentheses). Even if I put a schema or I hardcode the String in transformUrl method nothing happens.
I tried with setting autoLink to none, setAutoLinkMask(0), and maybe some more but still stuck.
View 1 Replies
View Related
Sep 15, 2010
I want to simulate a KEY_UP press on my phone.. but pragmatically can someone tell me the code of a function that can do this? i found some functions searching on www.google.com but all of them are obsolete.
View 2 Replies
View Related
Sep 10, 2010
I'm trying to implement a custom MapView. Inside my MapActivity (named mainmap) I have an inner class which extends MapView:
CODE:........
I have my main.xml formatted to find the inner class like so:
CODE:................
Also, in Androidmanifest.xml, I have the appropriate <uses-library android:name="com.google.android.maps"/> entry.
When I try to run my app, I get (amongst other things) in logcat:
CODE:..............
This is caused by this entry I find in logcat:
CODE:...............
If I understand correctly, my app is crashing because Android is saying it doesn't find the appropriate constructor for my custom MapView (the Lmapview class). As you can see above, however, it is defined and it matches the signature it is looking for.
View 1 Replies
View Related
Mar 27, 2010
I have an empty TextView set for my ListView. When there is no data, it shows the empty text, where I have description that they should go to Contacts application. How can I linkify "Contacts" word so when tapped opens the Contacts application?
View 1 Replies
View Related
Oct 11, 2010
I would make a textview linkable, and i have tried with this code...
View 2 Replies
View Related
Aug 13, 2010
I have a ListView which has a TextView in the row. The TextView has been Linkified and has had setMovementMethod(LinkMovementMethod.getInstance()) set on it.
The ListView is no longer selectable and the ListView's getSelectedItemPosition() always return -1 .
Is there a way to know where the ListView has scrolled to in this case?
View 1 Replies
View Related
Sep 9, 2010
I have a TextView with location data that I want to Linkify. When link will be clicked an Intent should be fired that will start Maps. How should I achieve this effect?
UPDATE:
I have something like "My street 9, My city". Now I want to have all this text to appear like a link and have intent fired with URI: geo:0,0?q=My+street+9,+My+city
Using just Linkify.ALL doesn't work.
View 1 Replies
View Related
Oct 9, 2010
This code works fine if I move the findViewById call in to the Activity. Any hints as to why it doesn't work from inside the LearningView class? I've tried moving the TextView inside the com.example.LearningView tag but no joy. I'd prefer to get the TextView from within the SurfaceView subclass as I feel it's more logical to treat the TV as a "child" of the SV.
This is a contrived example I wrote to figure out the problem in a larger application, but the gist of it is the same, and the stack trace is basically the same.
For what it is worth, the findViewById call is returning null, which obviously threw NullPointerExceptions in some attempts to fix this.
As you can probably gather from my attempts I'm flying blind on this one.
Learning.java:
CODE:..........
main.xml:
CODE:..............
Stack trace:
CODE:......................
View 1 Replies
View Related
Sep 12, 2009
I turned on DEBUG_CHECK_GL_ERROR for my GLSurfaceView to try to figure out why I'm having a problem on pause/ resume/reload everything, and when I turned it on, I got an UnsupportedOperationException when calling GL11.glGenBuffers() (for creating Vertex Buffer Objects).
Why is it saying that operation is unsupported when:
1) The vertex_buffer_object extension is listed on the target device and my code checks for it before trying to use VBOs.
2) VBOs are working correctly (and really well might I add).
This is on a G1. Yes, I know the G1 is only OpenGL ES 1.0 compliant and I'm trying to use a 1.1 extension, but if the phone lists the extension, doesn't that mean I can use it? Also - the extension works! Does this mean that it works but use-at-your-own-risk, kinda like how SoundPool was in Android 1.0?
View 2 Replies
View Related
Jul 15, 2010
I have a ListView that uses Linkify to create a link to another activity in my app. the url looks something like content://com.myapp/activitiy/view?param=blah
This works fine every time.
However, in another view, I'm trying to call some code like this:
CODE:.............
But for some reason this doesn't seem to work. It doesn't trigger my activity (and in fact it blows up if i dont include the setAction() call. How am I supposed to create the Intent such that it acts the same way that Linkify does...?
Now i realize i can setup the extras and then handle it in the activity, but that just seems like duplicated effort.
View 1 Replies
View Related