Added this to the view pager adapter. Good to go now.
public int getItemPosition(Object object) {
return POSITION_NONE;
}
On Mar 12, 2:00 pm, tatebn wrote:
> I've stopped the crashing by making sure notifyDataSetChanged is
> called in a handler on the main thread. But the curre
I've stopped the crashing by making sure notifyDataSetChanged is
called in a handler on the main thread. But the current web view
doesn't go away. Other pages show up as their supposed to, but the
current one is never replaced.
On Mar 9, 5:07 pm, tatebn wrote:
> I'm using a
I'm using a ViewPager with the android support library to load static
html pages into webviews
and flip through them similar to a magazine app.
I can load the initial page fine, which is using loadContentId().
When the user clicks on a link I'm calling the same loadContentId()
method.
When I call
Sorry, I'm pretty new to android myself. I don't think I can be much
help to you on that.
On Feb 10, 1:09 pm, Adi wrote:
> @tatebn - Hi, I desperately needed this post! But as yours seems to be
> an internal web view, mine is an external file on the SD-Card. I'm
> tryi
2, 2:13 pm, tatebn wrote:
> What's confusing to me is that it actually gets an ArrayList.
> It's just been emptied out somehow.
>
> On Mar 2, 1:25 pm, tatebn wrote:
>
>
>
>
>
>
>
> > Accidentally left that prefix in the code there. That's not the iss
What's confusing to me is that it actually gets an ArrayList.
It's just been emptied out somehow.
On Mar 2, 1:25 pm, tatebn wrote:
> Accidentally left that prefix in the code there. That's not the issue
> in the actual app.
>
> On Mar 2, 1:17 pm, tatebn wrote:
Accidentally left that prefix in the code there. That's not the issue
in the actual app.
On Mar 2, 1:17 pm, tatebn wrote:
> It's the intent in the broadcast receiver's onReceive message
>
> /** Handler for content ids updated. */
> private BroadcastReceiv
LocalBroadcastManager.getInstance(this).registerReceiver(mContentIdsUpdated,
new
IntentFilter(Common.ContentIdsUpdatedNotification));
On Mar 2, 12:15 pm, Mark Murphy wrote:
> Are you sure you are looking at the right Intent?
>
>
>
>
>
>
>
>
I'm using LocalBroadcastManager to send data between classes. I'm
trying to send an ArrayList of String objects, 1 dimensional, in one
of them. The array has all my strings when I send it, but on the
receiving end it is empty. Has anyone seen this before? Here's my
code.
Send Message (I can prin
I'm trying to skin the options menu on android. I have the background
color changed with a custom theme, but I can't get the text color to
change for some reason.
My Theme
- @color/
optionsMenuBackgroundColor
is.contents.indexOf(tmp);
}
}
this.notifyDataSetChanged();
}
}
On Feb 7, 12:13 am, HeneryH wrote:
> tatebn, did you ever solve this problem? I have been going crazy trying to
> dynamically add views to a view
I need to run some javascript in an android web view. I understand
this works fine by loading a javascript: url. It seems that when I do
that though the selected text in the web view is cleared. The
javascript I'm running gets the range of the selected text, so I need
it to remain selected. I have
I need to create a context menu similar to the menu that pops up in
the gmail app. I need this menu to show up when I select text in a
web view. I found this tutorial on quick action bars,
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
and it looks straight forward enoug
Ok. I got it. And I feel a little bit stupid.
I have multiple url schemes I'm using within the app to do things like
send analytics, etc.
One of those schemes is "finishedloading://", which tells me that the
page is ready for me to inject javascript.
In my shouldOverrideMethod,
if (uri.getSchem
Nevermind. Looks like loadUrl() is being loaded in the main thread.
And setValue() is being called in the WebViewCoreThread.
On Jan 18, 2:12 pm, tatebn wrote:
> The javascript is actually generated in the getJSValue method. For
> this test I'm using "2 + 2" as my expressi
The javascript is actually generated in the getJSValue method. For
this test I'm using "2 + 2" as my expression. So I don't think the
actual js is the issue.
How do I tell which thread which method call is happening in?
On Jan 18, 1:20 pm, Streets Of Boston wrote:
> Very odd.
>
> The call to
Thanks, but I have the javascript to java binding working. My issue
is that I need to wait and return the value set via that binding from
javascript. But it seems that the loadUrl() method in the web view
isn't using it's own thread. So any waiting I'm doing stops the
javascript from executing.
Nevermind that. Misread the log. The latch.await times out every
time. But the javascript is not evaluated until after the timeout.
On Jan 18, 12:21 pm, Streets Of Boston
wrote:
> It's from a separate class (runJS does something like
> mWebView.loadUrl(javaScriptUrl);)
>
> In my sample code, t
My getJSValue() is run on the main thread as well.
As far as the latch.await goes,
If I run webView.loadUrl() in an asyncTask I get the full time out (10
seconds for testing).
If I just run webView.loadUrl() in the current task, there is no time
out. The latch.await call instantly comes back, but
I've tried executing the javascript in an async task, which I thought
would fix any threading issues. But I get the same issue. How do you
have your threads specified when you run yours? Are you running this
from a WebView subclass or from a separate class for you javascript
interface? I've tri
mply within JS make of your page a throbber and only swap it
> back to its actual content as a last statement in the JS function that
> you want to process.
>
> On 18 January 2012 16:24, tatebn wrote:
>
>
>
>
>
>
>
>
>
> > I'm getting the sam
I'm getting the same issue using the CountDownLatch. The WebView
can't load the url because of the lock.
On Jan 18, 11:01 am, Streets Of Boston
wrote:
> We use a countdown latch instead:
>
> String returnValue;
> private CountDownLatch latch = null;
>
> public String run(String javaScript, int
uating when the semaphore is locked. I've tried running
the javascript evaluation code in an async task as well, still no
lock.
On Jan 18, 10:32 am, Daniel Drozdzewski
wrote:
> Why can't you just let webview evaluate the JavaScript?
>
> On 18 January 2012 15:18, tatebn wrote
ough, in which case you have to
> release first.
>
> Either change the parameter to Semaphore constructor or release before
> calling Semaphore.acquire()
>
> Daniel
>
> On 18 January 2012 15:00, tatebn wrote:
>
>
>
>
>
>
>
>
>
> > By the way,
By the way, this code is located in a subclassed WebView.
On Jan 18, 9:53 am, tatebn wrote:
> I'm trying to evaluate javascript with a semaphore lock. I need to
> query some web content about which context menus to show and need it
> to be synchronous. When I try to acquire the
I'm trying to evaluate javascript with a semaphore lock. I need to
query some web content about which context menus to show and need it
to be synchronous. When I try to acquire the semaphore the thread
locks without the javascript being evaluated and my javascript
interface method being called.
based on position.
On Dec 27, 3:35 pm, TreKing wrote:
> On Tue, Dec 27, 2011 at 2:10 PM, tatebn wrote:
> > I don't see add and remove items.
>
> Try the official docs instead of some random open source
> project.http://developer.android.com/reference/an
, 12:43 pm, TreKing wrote:
> On Tue, Dec 27, 2011 at 10:49 AM, tatebn wrote:
> > I've looked at the ViewPager examples which look like it uses an adapter
> > which has a defined number of pages.
>
> A brief look at the PageAdapter shows methods for adding and removing
>
I'm trying to use ViewPager to allow the user to flip through a series
of web views. I've looked at the ViewPager examples which look like
it uses an adapter which has a defined number of pages. The problem I
have is that the number of pages I have changes regularly. Is there
not a way to just u
Scratch this. I got it working by using a URI (all caps) URI fileUri
= URI.create(filePath); to create the file. The blank web view
content was because the unzipped files were empty.
On Dec 6, 10:01 am, tatebn wrote:
> I'm trying to load internal content in an android web view. The
&
I can get it to recognize the file's existence if I remove the file://
from the front of the path. But then the web view loads a blank white
page.
On Dec 6, 10:01 am, tatebn wrote:
> I'm trying to load internal content in an android web view. The
> content is in a content direc
I'm trying to load internal content in an android web view. The
content is in a content directory that's been unzipped into the app's
files directory. I can verify that the files are there by using the
adb shell. However I keep getting an error in the web view that the
file doesn't exist. I'm using
Thanks, was actually just about to post that. Sorry for all the little
questions. One of these days I'll get this crazy Android stuff.
On Sep 14, 2:14 pm, Mark Murphy wrote:
> On Tue, Sep 14, 2010 at 1:45 PM, tatebn wrote:
> > I've stumbled on a new, related issue. O
I've stumbled on a new, related issue. One of the tabs is a mapview.
How do I work with that? I get an error having a mapView outside of a
mapActivity. Since I'm obviously extending TabActivity here, how do I
get a map in one of these tabs?
On Sep 14, 1:35 pm, tatebn wrote:
>
Nevermind, I think I got it as per your examples. Thanks.
On Sep 14, 1:22 pm, tatebn wrote:
> I tried using the set content with the view.
>
> spec = tabHost.newTabSpec("albums").setIndicator("List",
>
> res.getDrawable(R.d
#x27;t create the view content because it can't
find the view with id "whatever". What am I doing wrong here?
Thanks
On Sep 14, 11:37 am, tatebn wrote:
> Can you point me to an example of how to do that? Currently I'm
> creating a new intent with the activity class and se
rent implementation.
>
> On Tue, Sep 14, 2010 at 11:24 AM, tatebn wrote:
> > Can I have one Activity listen for a message from another? I have a
> > TabActivity and I need to call a function/send a message to the
> > associated tabs. How do I go about doing that?
>
>
Can I have one Activity listen for a message from another? I have a
TabActivity and I need to call a function/send a message to the
associated tabs. How do I go about doing that?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to
I'm trying to use the GeoCoder to get the lat/lon for a couple of
addresses. I'm running into an error where the address list comes
back empty sometimes. It seems to be completely random. I have a
start point and an end point to draw and route. Sometimes I can't get
either one, sometimes I can
If I have a tab activity with multiple tabs, each containing a
different activity, is it possible to have a variable in the tab
activity and access it from the child activities? How would I do that?
--
You received this message because you are subscribed to the Google
Groups "Android Developers"
Is it possibly to have a button in my app that switches to the phone's
Maps application while passing in a destination for directions? And
how would I do that? Haven't been able to find anything about it.
Thanks
--
You received this message because you are subscribed to the Google
Groups "Andr
Perfect, thanks.
On Sep 3, 2:40 pm, Romain Guy wrote:
> Turn on antialiasing on the Paint used to draw the lines.
>
>
>
> On Fri, Sep 3, 2010 at 11:12 AM, tatebn wrote:
> > I'm trying to draw out a race track in a map overlay. I have a series
> > of locations th
I'm trying to draw out a race track in a map overlay. I have a series
of locations that define the track. I have the drawing working fine
just using canvas.drawLine() from one point to the next. But,
understandably, this looks kind of choppy. Is there a decent way to
smooth the line out?
--
Y
I'm using a ListAction and I'm having some trouble with my listeners.
I'm using onListItemClick to catch any item clicks, which works fine
unless I add an OnLongClickListener to the list items. In that case
the long click works but the short click doesn't register. I've tried
adding an OnClickLis
When I change the launch mode to singleInstance, it no longer pushes
the the new intent on top, but the search intent fills the screen on
search and covers the tabs.
On Aug 25, 3:09 pm, tatebn wrote:
> I have a tab host with two tabs. I want one of those tabs to be a
> search screen
I have a tab host with two tabs. I want one of those tabs to be a
search screen. The content for the tab is a ListActivity. I'm
pulling the content from a web service.
My problem is, when I execute the search a new intent is pushed onto
the screen. I've used the android:launchMode="singleTop"
Damevin" написал:
>
> Hi,
>
> Do you call getWriteableDatabase twice ? because you shouldn't.
> It should be the same SQLiteDatabase object or you have to end the
> transaction from the first one before you start a new one.
>
> Kim
>
> On Tue, Aug 24, 2010 at
I'm using transactions to insert data into several tables with foreign
key relationships. Basically I have a wrapper for each table. Each
wrapper creates it's own SQLiteOpenHelper and holds onto the
SQLiteDatabase that comes from the getWriteableDatabase() call.
Now here's the problem,
When I i
48 matches
Mail list logo