[android-developers] Oracle Global Trade Management (GTM) Functional in WA

2018-05-01 Thread John Davis
 

Hi, 

 

Please let me know if you have anyone for the below position. 

 

Kindly send me their résumé and contact details. 

 

*Oracle Global Trade Management (GTM) Functional *

Location: Seattle, WA

Duration: 4+ months 

Rate: $DOE 

 

Skills- 

Atleast 10+ years experience

Experience with Oracle EBS functional 

Cloud Oracle GTM is a plus

Must be able to work independently

 

 


*Thanks, John*
Account Manager
Global Systems LLC | IT Consulting |Staffing | BPO

Office:  214-717-5390 | Email: j...@globalsyst.com | Web: www.globalsyst.com

Fax: 214-975-1222
Yahoo IM – john20145

https://www.linkedin.com/pub/john-s/93/a72/431 


[image: Untitled][image: cid:image006.jpg@01CFDD6F.F449A850]

A Certified Woman-Owned Business Enterprise (WBE)

A Certified Minority-Business Enterprise (MBE)

 

We are very committed. If you are unable to reach me, please contact 
240-345-3178.

**We specialize in BA, QA, Java and ERP Applications and have great 
technical talent and established clients, please contact us for our 
REFERRAL policy**

 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/40ee788b-b2d4-482f-9a12-123f519a0944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Oracle HRMS Functional in CA

2018-03-20 Thread John Davis
 

Hi, 

 

Please let me know if you have anyone for the below position. 

 

Kindly send me their résumé and contact details. 

 

*Oracle EBS HRMS Functional*

Location: Anaheim, CA

Duration: 2 months (extendable)

Rate: $DOE/hr c2c all inclusive

Positions: 2 (one (OAB) benefits and one payroll) 

 

Note: Need someone to join immediately

 

Skills-

9-10+ years experience

Must have extensive functional experience with EBS HRMS Advanced Benefits 
(OAB)

Some project co-ordination experience is a plus

 

 


*Thanks, John*
Account Manager
Global Systems LLC | IT Consulting |Staffing | BPO

Office:  214-717-5390 | Email: j...@globalsyst.com | Web: www.globalsyst.com

Fax: 214-975-1222
Yahoo IM – john20145

https://www.linkedin.com/pub/john-s/93/a72/431

[image: Untitled][image: cid:image006.jpg@01CFDD6F.F449A850]

A Certified Woman-Owned Business Enterprise (WBE)

A Certified Minority-Business Enterprise (MBE)

 

We are very committed. If you are unable to reach me, please contact 
240-345-3178.

**We specialize in BA, QA, Java and ERP Applications and have great 
technical talent and established clients, please contact us for our 
REFERRAL policy**

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5e34773c-9c95-4c5d-b649-5f02b336d50d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] CA API Gateway Integration Developer in CA

2018-02-06 Thread John Davis
 

Hi, 

 

Please have a look at the below requirement and let me know if you have 
someone that fits.

 

Kindly send me their résumé and contact details. 

 

*CA API Gateway Integration Developer*

Location: Los Angeles, CA

Duration: 3+ months

Rate: $80/hr c2c all inclusive

 

Skills- 

8+ years experience 

Must have Integration Software

Must have some Migration experience

 

 


*Thanks, John*
Account Manager
Global Systems LLC | IT Consulting |Staffing | BPO

Office:  214-717-5390 | Email: j...@globalsyst.com | Web: www.globalsyst.com

Fax: 214-975-1222
Yahoo IM – john20145

https://www.linkedin.com/pub/john-s/93/a72/431

[image: Untitled][image: cid:image006.jpg@01CFDD6F.F449A850]

A Certified Woman-Owned Business Enterprise (WBE)

A Certified Minority-Business Enterprise (MBE)

 

We are very committed. If you are unable to reach me, please contact 
240-345-3178.

**We specialize in BA, QA, Java and ERP Applications and have great 
technical talent and established clients, please contact us for our 
REFERRAL policy**

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/eb8df923-3c6b-46f9-93de-361f0acfdec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] ADAM ADAMOWICZ died yesterday

2012-02-10 Thread John Davis
http://www.awesome-robo.com/2012/02/farewell-adam-adamowicz-visual-mind.html

-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] is it possible to have a composite layout like this?

2012-02-07 Thread John Davis
You are correct sir! I did not realize that.  Many thanks.

On Tue, Feb 7, 2012 at 12:39 PM, Kostya Vasilyev  wrote:

> Doesn't GridView already have scrolling?
>
> On 02/07/2012 09:35 PM, John Davis wrote:
> > Hello
> > Is it possible to have a layout like this?
> >
> > Linear Layout
> > - button
> > - scrollview
> > --- Gridview
> >
> > I.e. Linear layout at top with two children, button and scrollview.
> > The scrollview has one layout inside it which is a gridview.
> >
> > When I do this, I get a button at top of the screen and a grid below
> > it. However, the grid is about 1/5 of the screen and it does not
> > expand to fit the rest of the screen vertically.
> >
> > I've tried to add fill_parent for the grid, scroll and linear layout
> > props but it does not change anything.
> >
> > --
> > John F. Davis
> >
> > 独树一帜
> >
> >
> >
> > --
> > 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
>
> --
> 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




-- 
John F. Davis

独树一帜

-- 
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 it possible to have a composite layout like this?

2012-02-07 Thread John Davis
Hello
Is it possible to have a layout like this?

Linear Layout
  - button
  - scrollview
  --- Gridview

I.e. Linear layout at top with two children, button and scrollview.  The
scrollview has one layout inside it which is a gridview.

When I do this, I get a button at top of the screen and a grid below it.
 However, the grid is about 1/5 of the screen and it does not expand to fit
the rest of the screen vertically.

I've tried to add fill_parent for the grid, scroll and linear layout props
but it does not change anything.

-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] How to debug android project under command line?

2012-02-07 Thread John Davis
LOL.  My bad. Its the settings in the .ini file.  Not the command line
options.  NVM.

On Tue, Feb 7, 2012 at 11:06 AM, John Davis  wrote:

> Hello Kostya,
>
> Interesting.  I'm running on win7. I was expecting the eclipse icon to be
> a link to the .exe with some command arguments.  I was going to use your
> options to tweak my own.  However, it runs eclipse.exe without options.
>  Does anyone have some win7 settings?
>
> Ill check your eclipse.ini link to see if there is another way.
>
> John
>
>
> 2012/2/7 Kostya Vasilyev 
>
>>
>>
>> 7 февраля 2012 г. 19:03 пользователь Kristopher Micinski <
>> krismicin...@gmail.com> написал:
>>
>>
>>> By the way, 2G ram is not considered very much these days, (off topic
>>> but someone told me that android wouldn't even build on eight now..).  To
>>> add to that, eclipse uses a fair amount of memory, and to get a usable
>>> system you'd want to bumb up to at least four I'd suspect.  (And make sure
>>> you're running a device rather than the emulator!)
>>>
>>
>> Actually, looking in System Monitor under Debian/64 right now, I've only
>> got 1,6 G in use out of the 4 G installed in my system (running Chromium
>> with Gmail, Eclipse, and a couple of terminals).
>>
>> So, not denying the obvious that more physical memory is always better
>>
>> ... it's worthwhile checking Eclipse's memory settings.
>>
>> Running on a system with 32G of physical RAM and leaving Eclipse at its
>> default memory settings still won't do any good.
>>
>> Here is the relevant portion of my eclipse.ini:
>>
>> --launcher.XXMaxPermSize
>> 512m
>> --launcher.defaultAction
>> openFile
>> -vmargs
>> -Xms128m
>> -Xmx1024m
>>
>> This lets Eclipse use up to 1 GB of RAM and makes it much happier (as far
>> as my workspaces go).
>>
>> More info here:
>>
>> http://wiki.eclipse.org/Eclipse.ini
>>
>> -- Kostya
>>
>>
>>> kris
>>>
>>> --
>>> 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
>>>
>>
>>  --
>> 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
>>
>
>
>
> --
> John F. Davis
>
> 独树一帜
>
>
>
>


-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] How to debug android project under command line?

2012-02-07 Thread John Davis
Hello Kostya,

Interesting.  I'm running on win7. I was expecting the eclipse icon to be a
link to the .exe with some command arguments.  I was going to use your
options to tweak my own.  However, it runs eclipse.exe without options.
 Does anyone have some win7 settings?

Ill check your eclipse.ini link to see if there is another way.

John

2012/2/7 Kostya Vasilyev 

>
>
> 7 февраля 2012 г. 19:03 пользователь Kristopher Micinski <
> krismicin...@gmail.com> написал:
>
>
>> By the way, 2G ram is not considered very much these days, (off topic but
>> someone told me that android wouldn't even build on eight now..).  To add
>> to that, eclipse uses a fair amount of memory, and to get a usable system
>> you'd want to bumb up to at least four I'd suspect.  (And make sure you're
>> running a device rather than the emulator!)
>>
>
> Actually, looking in System Monitor under Debian/64 right now, I've only
> got 1,6 G in use out of the 4 G installed in my system (running Chromium
> with Gmail, Eclipse, and a couple of terminals).
>
> So, not denying the obvious that more physical memory is always better
>
> ... it's worthwhile checking Eclipse's memory settings.
>
> Running on a system with 32G of physical RAM and leaving Eclipse at its
> default memory settings still won't do any good.
>
> Here is the relevant portion of my eclipse.ini:
>
> --launcher.XXMaxPermSize
> 512m
> --launcher.defaultAction
> openFile
> -vmargs
> -Xms128m
> -Xmx1024m
>
> This lets Eclipse use up to 1 GB of RAM and makes it much happier (as far
> as my workspaces go).
>
> More info here:
>
> http://wiki.eclipse.org/Eclipse.ini
>
> -- Kostya
>
>
>> kris
>>
>> --
>> 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
>>
>
>  --
> 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
>



-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] sqlite databases and non-rooted phones

2012-02-01 Thread John Davis
Hello Kostya Vasiyev,

Many thanks.  I see what you mean.  I could add an import/export command to
the app.  And in the final release, simply remove the import/export
capability.

John

On Wed, Feb 1, 2012 at 11:43 AM, Kostya Vasilyev  wrote:

> On 02/01/2012 08:36 PM, John Davis wrote:
>
>> Any suggestions on how to work on the database on a non-rooted phone?  I
>> would prefer to use the database on the phone rather than on a pc.
>>
>
> You can add code in the app to copy the database from the app's storage
> directory in internal memory to the memory card, then pull the file to the
> PC and examine.
>
> This code can be in a separate app, if you so desire - you can access the
> main app's files by using a sharedUserId (not recommended for production
> use, but can be useful for debugging).
>
> -- 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+**unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>




-- 
John F. Davis

独树一帜

-- 
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] sqlite databases and non-rooted phones

2012-02-01 Thread John Davis
Hello

I am writing an application which uses a sqlite database.  Previously I was
using a rooted phone to debug/develop this app.  My app does not have any
special permissions, sdcard, etc.

One thing I was doing when using a rooted phone was debugging the database
queries via adb shell.  I would get a shell on the phone and then open the
database and issue sql commands to assist me with my android api usage of
sql.

Now, I have switched to a new phone and it is not rooted.  Personally, I
want to keep this phone non-rooted, but I would like to continue using
direct sql queries to the database.

I've tried various things to work around this issue but none of them work.

I've tried to pull the database via adb pull command to work on a pc copy
of the database.  This does not work.  I have permission problems.
I've tried to do run-as net.skink.swtor.toontracker in order to run as
my application privilege to perform sql queries on the live database but
this does not work either.

Any suggestions on how to work on the database on a non-rooted phone?  I
would prefer to use the database on the phone rather than on a pc.

-- 
John F. Davis

独树一帜

-- 
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] still having problems with gridview and spacing.

2012-01-31 Thread John Davis
Hello

I am still having a problem with gridview and spacing.  Would love to talk
to someone regarding the issue.  I've considered chaning text orientation
for column headings or using two line text.

Here is more info including screenshots:

http://netskink.blogspot.com/2012/01/gridview-take2-issues.html


-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] any idea why this gridview has large vertical spacing between rows

2012-01-26 Thread John Davis
Hello Mark,

You mentioned that tool before.  I have yet to look it up.  I assume this
is the starter page for it
http://developer.android.com/guide/developing/debugging/debugging-ui.html
I'll look into it. Thanks man.

John

2012/1/26 Mark Murphy 

> Use Hierarchy Viewer to examine your activity. If I had to guess, your
> Adapter is returning cells that big.
>
> 2012/1/26 John Davis :
> > http://netskink.blogspot.com/2012/01/grid-view-notes.html
> >
> > --
> > John F. Davis
> >
> > 独树一帜
> >
> >
> >
> > --
> > 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
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in DC: http://marakana.com/training/android/
>
> --
> 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




-- 
John F. Davis

独树一帜

-- 
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] any idea why this gridview has large vertical spacing between rows

2012-01-26 Thread John Davis
http://netskink.blogspot.com/2012/01/grid-view-notes.html

-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] gridview weirdness

2012-01-26 Thread John Davis
Many thanks.

2012/1/26 Mark Murphy 

> Give it an Adapter with more than five items.
>
> On Thu, Jan 26, 2012 at 10:59 AM, John Davis  wrote:
> > Hello
> >
> > I modified the hellogridview example so it has 5 colunns by changing the
> > NumColunns property from auto_fit to 5.  This is great, it gives me 5
> > columns, however it only gives me one row.  How to set so it gives
> > additional rows?
> >
> > --
> > John F. Davis
> >
> > 独树一帜
> >
> >
> >
> > --
> > 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
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in DC: http://marakana.com/training/android/
>
> --
> 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




-- 
John F. Davis

独树一帜

-- 
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] gridview weirdness

2012-01-26 Thread John Davis
Hello

I modified the hellogridview example so it has 5 colunns by changing the
NumColunns property from auto_fit to 5.  This is great, it gives me 5
columns, however it only gives me one row.  How to set so it gives
additional rows?

-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] custom ui widgets?

2012-01-25 Thread John Davis
Hello TreKing,

Yes, the diagonal placement might not work with the gridview, but I can
adjust my goal to fit the gridview.

Very true about many viable ways.  I'm just trying to get a rough heading
from the established guide before I head out into the wilderness.

John

On Wed, Jan 25, 2012 at 9:49 AM, TreKing  wrote:

> 2012/1/25 John Davis 
>
>> Possibly the solution to my problem is a custom component consisting of a
>> GridView with three textviews.
>>
>> Does that seem right to you?
>>
>
> Possibly. Your image to me looks like it would require a custom layout
> manager, but I haven't done that, so I can't say that will full certainty.
> Like most programming tasks, there are likely several viable ways to
> accomplish what you need.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> 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




-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] custom ui widgets?

2012-01-25 Thread John Davis
Hello TreKing,

Thank you.  I'll look into that.  FWIW, I've gotten some other suggestions
off list.  It appears that I will need
to learn gridview.  Possibly the solution to my problem is a custom
component consisting of a GridView with three textviews.

Does that seem right to you?

John

On Wed, Jan 25, 2012 at 9:31 AM, TreKing  wrote:

> On Wed, Jan 25, 2012 at 7:54 AM, John Davis  wrote:
>
>> I don't know anything about custom UI usage.
>
> Any suggestions on what I should do?
>
>
> http://developer.android.com/guide/topics/ui/custom-components.html
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> 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




-- 
John F. Davis

独树一帜

-- 
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] custom ui widgets?

2012-01-25 Thread John Davis
Hello

I have a good understanding of the basic ui api.  I can use TextViews and
layouts, but I don't know anything about custom UI usage.

I would like to build a UI which looks something like this:
http://s1258.photobucket.com/albums/ii540/netskink/?action=view¤t=ssicons.jpg

Possibly a component with three lines of text with two font sizes.  Any
suggestions on what I should do?

-- 
John F. Davis

独树一帜

-- 
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] listview with distinct colors for each row SOLVED

2012-01-06 Thread John Davis
Hello,

This is the method I used to set the individual lines of a list view to
different colors.

At a high level this list contains a list of companion names for the swtor
game. Companions which are from the imperial side are listed in red,
republic are listed in blue.


==
This is the code for the list array and view:

...
CompanionName[] newValues; // will store an array.
...
newValues = new CompanionName[numCursorRows]; // create an array of
proper size.
c.moveToFirst();
for (int i=0;i" + someText
+ ""));
// values[i]=Html.fromHtml("" + "foo" + "");
 newValues[i] = new CompanionName();
 newValues[i].name=c.getString(0); // This cursor has two columns
companion name and faction side
 newValues[i].faction=c.getString(1); // This cursor has two columns
companion name and faction side
 c.moveToNext();
}

 // Build the listview
// The adapter determines how to draw on screen.  The listview will ask the
adapter to draw the view
// with adapter's getView method.
MyAdapter adapter = new
MyAdapter(this,android.R.layout.simple_list_item_1,
newValues);

theList.setAdapter(adapter); // theList is the ListView
theList.setOnItemClickListener(new MyOnItemClickListener(this));
=
This is the code for the array
public class MyAdapter extends ArrayAdapter {

private static String TAG = "adapter";
CompanionName[] myobjects;

public MyAdapter(Context context, int textViewResourceId, T[] objects) {
super(context, textViewResourceId, objects);
myobjects = (CompanionName[]) objects;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
 View row = super.getView(position, convertView, parent);
Log.d(TAG, "GetView with position "+position);
TextView text = (TextView) row.findViewById(android.R.id.text1);

if (null != text) {
   if (myobjects[position].faction.equals("Imperial")) {
text.setTextColor(Color.parseColor("#7b2325"));   // red
   } else {
text.setTextColor(Color.parseColor("#64788e"));  // blue
   }
}
return row;
}
===
This is the code for the companionName
public class CompanionName { public String name; public String
faction; private
static String TAG = "CompanionName"; public CompanionName() { Log.d(TAG,
"constructor hit"); name = "not specified"; faction = "not specified"; }
public String toString() { return name; } }

-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Kris,

Yes, that is a good way to put it.  Thanks for the info.

John

On Thu, Jan 5, 2012 at 3:37 PM, Kristopher Micinski 
wrote:
> On Thu, Jan 5, 2012 at 2:18 PM, John Davis  wrote:
>> Hello
>>
>> Ok. So I appreciate the help.  Here is the summary:
>>
>>for (int i=0;i>// If it is the 2nd or 5th item, tag it so that it will be
>> displayed in blue.
>>if (i==2 || i==5) {
>>listCount = adapter.getCount();
>>count = theList.getCount();
>>fooString = (String) theList.getItemAtPosition(i);
>>Log.d(TAG, "position "+i+"has string "+
fooString);
>> //  fooView = (TextView) theList.getChildAt(i);
>> //  Log.d(TAG, "position "+i+"has  view id
"+fooView.getId());
>>
>> //  fooView.setTag(99);
>>}
>>
>> This code will work.  The stuff that is commented out pertaining to
>> getChildAt does not.  I'll try to get that working.  I suspect it will
>> not work since the view is not up and running yet.  As it is now, it
>> will crash when the getChild call is made.
>>
>> Thanks for the help, this is becoming more clear. Pity the docs were
>> not more clear. "returns the data" is so generic.
>>
>
> That might be your interpretation too.  I think most people would
> argue (since most people realize that the list is an adapter backed
> view) that indeed 'the data' would make much more sense as the thing
> in the adapter, preferring to call the GUI object 'the view.'
>
> I have actually found that -- while necessarily incomplete (to the
> extent that it's impossible logistically to document everything)  --
> the Android API documentation is extremely high quality: assuming you
> have some knowledge of how the framework fits together.  (Which is why
> the documentation is simply that, a reference rather than a tutorial.)
>
> kris
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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

Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
Hello Treking,

I am sorry if I made you feel that way. I was most certainly going in
circles myself.  Have a good one and thanks for the help.

Smile

John

On Thu, Jan 5, 2012 at 3:16 PM, TreKing  wrote:
> 2012/1/5 John Davis 
>>
>> You have to realize the other person you are talking to might not have
>> your experience and might not understand you.
>
>
> You didn't say you didn't understand - you insisted that either the
> documentation was wrong, or it was a bug, or what you were trying to do was
> impossible, or Gmail was using private APIs, or  despite having multiple
> people tell you multiple times how to go about it, where you were going
> wrong, and how to find the information you needed in the stack trace.
>
> You can only go in so many circles before feeling like you're being taken
> for a ride, know what I mean?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

Ok. So I appreciate the help.  Here is the summary:

for (int i=0;ihttp://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
Hello Treking,

Nope not at all. You have to realize the other person you are talking
to might not have your experience and might not understand you. In
this case, I did not know that the logcat contains a different stack
trace from the trace in the debug window.  So, I learned a few things
today.  The listview contains two lists. The list of text which is
retrieved via getitematpostion and the list of views which is
retrieved via getChildAt.  Also, I learned that the debugger window
has a call stack whereas the logcat window has a java exception list.

John

On Thu, Jan 5, 2012 at 2:57 PM, TreKing  wrote:
> On Thu, Jan 5, 2012 at 1:53 PM, John Davis  wrote:
>>
>> I would be happy to if I knew how to properly answer your request.
>
>
> You've had about 18 people across two threads tell you how to do this.
> You're doing this on purpose to see how many monkeys you can get do dance,
> aren't you?
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Treking, Kostya, Romain-Guy,

Ok, I removed the breakpoint, ran it, hit F8 until I got logcat
output. I selected all the red/orange text and exported to a textfile.
 This is the result.  (I hope I am giving you the answer you request)

01-05 14:57:39.163: W/dalvikvm(9183): threadid=1: thread exiting with
uncaught exception (group=0x40028890)
01-05 14:57:39.308: E/AndroidRuntime(9183): FATAL EXCEPTION: main
01-05 14:57:39.308: E/AndroidRuntime(9183):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{net.skink.swtor.companion/net.skink.swtor.companion.SwtorCompanionActivity}:
java.lang.ClassCastException: java.lang.String
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.os.Looper.loop(Looper.java:123)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.main(ActivityThread.java:4627)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
java.lang.reflect.Method.invokeNative(Native Method)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
java.lang.reflect.Method.invoke(Method.java:521)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
dalvik.system.NativeStart.main(Native Method)
01-05 14:57:39.308: E/AndroidRuntime(9183): Caused by:
java.lang.ClassCastException: java.lang.String
01-05 14:57:39.308: E/AndroidRuntime(9183): at
net.skink.swtor.companion.SwtorCompanionActivity.setCompanions(SwtorCompanionActivity.java:118)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
net.skink.swtor.companion.SwtorCompanionActivity.onCreate(SwtorCompanionActivity.java:62)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-05 14:57:39.308: E/AndroidRuntime(9183): ... 11 more

This looks like the getItemAtPosition is returning a string instead of
a view.  Is this a list of views or a list of strings?

John

On Thu, Jan 5, 2012 at 2:40 PM, Kostya Vasilyev  wrote:
> That's the debugger's stack trace, not the logcat stack trace.
>
> Press F8 a few times until your device displays "the application 
> stopped unexpectedly".
>
> Then check the logcat panel in Eclipse and post the entire stack trace,
> especially the stuff after "Caused by:"
>
> -- Kostya
>
> 5 января 2012 г. 23:34 пользователь John Davis  написал:
>
>> This is from the debug window in the call stack output.
>>
>> Thread [<1> main] (Suspended (exception RuntimeException))
>>ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
>> Intent) line: 2663
>>ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
>> Intent) line: 2679
>>ActivityThread.access$2300(ActivityThread,
>> ActivityThread$ActivityRecord, Intent) line: 125
>>ActivityThread$H.handleMessage(Message) line: 2033
>>ActivityThread$H(Handler).dispatchMessage(Message) line: 99
>>Looper.loop() line: 123
>>ActivityThread.main(String[]) line: 4627
>>Method.invokeNative(Object, Object[], Class, Class[], Class, int,
>> boolean) line: not available [native method]
>>Method.invoke(Object, Object...) line: 521
>>ZygoteInit$MethodAndArgsCaller.run() line: 868
>>ZygoteInit.main(String[]) line: 626
>>NativeStart.main(String[]) line: not available [native method]
>>
>>
>> 2012/1/5 John Davis :
>> > Hello Romain Guy,
>> >
>> > How would I post the full stack trace?  The logcat output?
>> >
>> > John
>> >
>> > On Thu, Jan 5, 2012 at 2:30 PM, Romain Guy 
>> > wrote:
>> >> Please post the full stack trace of your exception.
>> >>
>> >> On Thu, Jan 5, 2012 at 11:28 AM, John Davis  wrote:
>> >>> Hello Treking,
>> >>>
>> >>> On Thu, Jan 5, 2012 at 2:17 PM, TreKing  wro

Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
LOL Treking, buddy. I posted it to the best of my ability.  Do you
mean copy and paste the output from the stack trace in the debug
window?

On Thu, Jan 5, 2012 at 2:51 PM, TreKing  wrote:
> Will someone please go to John's house / work and copy and paste the actual
> mother loving stack trace so we can end this dumbass thread?

-- 
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


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
OMG, seriously, the listView class does not contain a list of views?
Get out of here, if that was not the case, it would be called somthing
else.  Its a listView.  Its a bug. Geez.

>
> Yes, it is a bug in your code. You are getting a ClassCastException
> now, because getItemAtPosition() is not returning a View.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
Hello Romain-guy,

I would be happy to if I knew how to properly answer your request.
I removed the breakpoint on the getitematpos call and let it rip.
Then when it crashed, I went to debugger window and did a copy of the
stack trace and posted it below:

SwtorCompanion [Android Application]
DalvikVM[localhost:8619]
Thread [<1> main] (Suspended (exception RuntimeException))  

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2663

ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2679
ActivityThread.access$2300(ActivityThread,
ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033  
ActivityThread$H(Handler).dispatchMessage(Message) 
line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], 
Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 868  
ZygoteInit.main(String[]) line: 626 
NativeStart.main(String[]) line: not available [native 
method]  
Thread [<7> Binder Thread #2] (Running) 
Thread [<6> Binder Thread #1] (Running) 
Thread [<9> Binder Thread #3] (Running) 

If i comment out the getitematposition line it will run ok.

On Thu, Jan 5, 2012 at 2:49 PM, Romain Guy  wrote:
> Please show us the stack trace generated by the exception.
>
> On Thu, Jan 5, 2012 at 11:46 AM, John Davis  wrote:
>> Hello Mark,
>>
>> Nope.
>>for (int i=0;i>// If it is the 2nd or 5th item, tag it so that it will be
>> displayed in blue.
>>if (i==2 || i==5) {
>>listCount = adapter.getCount();
>>count = theList.getCount();
>>fooView = (View) theList.getItemAtPosition(i);
>> //  fooView.setTag(99);
>>}
>>
>> i=2, listCount = 6 and count = 6.  The listview stored in theList is
>> functional, since it retuns the result provided by getCount.  It is
>> also in agreement with the array adapter count.
>> theList.getItemAtPositon(5) should either return the item or null.  It
>> raises and exception.  That is a bug.
>>
>> Once again, the docs say:
>> =
>> public Object getItemAtPosition (int position)
>>
>> Since: API Level 1
>> Gets the data associated with the specified position in the list.
>> Parameters
>>
>> position    Which data to get
>> Returns
>>
>> The data associated with the specified position in the list
>>
>> ===
>>
>> On Thu, Jan 5, 2012 at 2:31 PM, Mark Murphy  wrote:
>>> 2012/1/5 John Davis :
>>>> The only exception which i can find is 
>>>> javalang.unsupportedOperationException.
>>>> as I was saying the api has a bug. The docs say you can get the data,
>>>> when you try to so you get an exception. Either the docs are incorrect
>>>> or its a bug.
>>>
>>> Yes, it is a bug in your code. My guess is that you are asking for an
>>> invalid position, perhaps because numRows is greater than getCount().
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com | http://github.com/commonsguy
>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>
>>> Warescription: Three Android Books, Plus Updates, One Low Price!
>>>
>>> --
>>> 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
>>
>>
>>
>> --
>> John F. Davis
>>
>> 独树一帜
>>
>> --
>> 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 gro

Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
Hello Kostya,

numRows is the value returned  by my database call.  It is what I used
to set the arraybound on the array adapter. It is also 6 as verified
by the debugger.
Like I said, it appears that the api is buggy and does not provide the
ability to set listview items to be of different colors, since there
is no way to manipulate them with the provided api.

2012/1/5 Kostya Vasilyev :
> Back to the original code snippet:
>
> The list view's item count is returned by "theList.getCount" and stored in a
> variable called "count".
>
> The loop goes from 0 to "numRows".
>
> That's an entirely different variable.
>
> Perhaps it's also set to theList.getCount() earlier, but that's not in the
> posted snippet.
>
> There is also a typecast in that snippet, which can quite easily go wrong
> and throw an exception, and which would be a bug in that snippet - calling
> the wrong method assuming it does something else.
>
> -- Kostya
>
> 5 января 2012 г. 23:32 пользователь Kristopher Micinski
>  написал:
>
>> 2012/1/5 John Davis :
>> > The only exception which i can find is
>> > javalang.unsupportedOperationException.
>> > as I was saying the api has a bug. The docs say you can get the data,
>> > when you try to so you get an exception. Either the docs are incorrect
>> > or its a bug.
>> >
>>
>> Yeah, it's a bug you caused.
>>
>> This is crazy: this method is used by thousands of developers in
>> thousands of apps out on the market today: to suggest that it is an
>> API bug with no data to back it (you don't have it, since your code
>> reveals what you are doing wrong) is just embarrassing.  It accuses of
>> the framework writers for being incorrect, when in reality it's your
>> code.
>>
>> Kris
>>
>> --
>> 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
>
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
Hello Mark,

Nope.
for (int i=0;i wrote:
> 2012/1/5 John Davis :
>> The only exception which i can find is 
>> javalang.unsupportedOperationException.
>> as I was saying the api has a bug. The docs say you can get the data,
>> when you try to so you get an exception. Either the docs are incorrect
>> or its a bug.
>
> Yes, it is a bug in your code. My guess is that you are asking for an
> invalid position, perhaps because numRows is greater than getCount().
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
This is from the debug window in the call stack output.

Thread [<1> main] (Suspended (exception RuntimeException))  
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2663
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2679
ActivityThread.access$2300(ActivityThread,
ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033  
ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 868  
ZygoteInit.main(String[]) line: 626 
NativeStart.main(String[]) line: not available [native method]  


2012/1/5 John Davis :
> Hello Romain Guy,
>
> How would I post the full stack trace?  The logcat output?
>
> John
>
> On Thu, Jan 5, 2012 at 2:30 PM, Romain Guy  wrote:
>> Please post the full stack trace of your exception.
>>
>> On Thu, Jan 5, 2012 at 11:28 AM, John Davis  wrote:
>>> Hello Treking,
>>>
>>> On Thu, Jan 5, 2012 at 2:17 PM, TreKing  wrote:
>>>> On Thu, Jan 5, 2012 at 1:07 PM, John Davis  wrote:
>>>>>
>>>>> Yes, I would think it is possible, but not in this version. Its possible
>>>>> to set all line items to the same value.  However, its not possible to set
>>>>> the colors on a case by case value using the provided api.
>>>>
>>>>
>>>> Yes it is. Please stop blaming the platform for your lack of understanding
>>>> it. I already explained how you can create a data-model that holds the
>>>> unique color per item that you then set on the View.
>>>>
>>>
>>> I'm not blaming anyone or the api. I am simply saying it has a bug.
>>> Someone might want to look into it.
>>>
>>>
>>>>> But the api does not allow you to set a tag outside this code so that the
>>>>> routine can change the text color based on the tag.
>>>>
>>>>
>>>> Yes it does. But using the Tag property to achieve this is overkill and 
>>>> ugly
>>>> anyway.
>>>
>>> Sorry, but it is the only thing provided by the api and its not the
>>> settag which raises the exception.  It is the getitematpostion call.
>>> It says it gets the data at position x.  When this call is made it
>>> raises and exception.  That is the bug. It should return null if it
>>> does not exist. Raising an exception sounds like a bug.
>>>
>>>>
>>>>>
>>>>> If you try to get this data, it raises an exception.
>>>>
>>>>
>>>> No, if you don't know how to use this function and use it incorrectly, then
>>>> it raises an exception.
>>>
>>>
>>>
>>> I am not using the data from the call and getting an exception.  I am
>>> making the call and getting an exception.
>>>
>>>
>>>>
>>>> At this point I have to suggest to you that you take a step back, get
>>>> yourself a good book, and review the documentation thoroughly and go 
>>>> through
>>>> the samples. You are apparently confused about a number of things with how
>>>> the adapters work and are not going to get anywhere until you understand
>>>> what they are and how they work.
>>>>
>>>> Good luck.
>>>>
>>>>
>>>> -
>>>> TreKing - Chicago transit tracking app for Android-powered devices
>>>>
>>>> --
>>>> 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
>>>
>>>
>>>
>>> --
>>> John F. Davis
>>>
>>> 独树一帜
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>&g

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Romain Guy,

How would I post the full stack trace?  The logcat output?

John

On Thu, Jan 5, 2012 at 2:30 PM, Romain Guy  wrote:
> Please post the full stack trace of your exception.
>
> On Thu, Jan 5, 2012 at 11:28 AM, John Davis  wrote:
>> Hello Treking,
>>
>> On Thu, Jan 5, 2012 at 2:17 PM, TreKing  wrote:
>>> On Thu, Jan 5, 2012 at 1:07 PM, John Davis  wrote:
>>>>
>>>> Yes, I would think it is possible, but not in this version. Its possible
>>>> to set all line items to the same value.  However, its not possible to set
>>>> the colors on a case by case value using the provided api.
>>>
>>>
>>> Yes it is. Please stop blaming the platform for your lack of understanding
>>> it. I already explained how you can create a data-model that holds the
>>> unique color per item that you then set on the View.
>>>
>>
>> I'm not blaming anyone or the api. I am simply saying it has a bug.
>> Someone might want to look into it.
>>
>>
>>>> But the api does not allow you to set a tag outside this code so that the
>>>> routine can change the text color based on the tag.
>>>
>>>
>>> Yes it does. But using the Tag property to achieve this is overkill and ugly
>>> anyway.
>>
>> Sorry, but it is the only thing provided by the api and its not the
>> settag which raises the exception.  It is the getitematpostion call.
>> It says it gets the data at position x.  When this call is made it
>> raises and exception.  That is the bug. It should return null if it
>> does not exist. Raising an exception sounds like a bug.
>>
>>>
>>>>
>>>> If you try to get this data, it raises an exception.
>>>
>>>
>>> No, if you don't know how to use this function and use it incorrectly, then
>>> it raises an exception.
>>
>>
>>
>> I am not using the data from the call and getting an exception.  I am
>> making the call and getting an exception.
>>
>>
>>>
>>> At this point I have to suggest to you that you take a step back, get
>>> yourself a good book, and review the documentation thoroughly and go through
>>> the samples. You are apparently confused about a number of things with how
>>> the adapters work and are not going to get anywhere until you understand
>>> what they are and how they work.
>>>
>>> Good luck.
>>>
>>>
>>> -
>>> TreKing - Chicago transit tracking app for Android-powered devices
>>>
>>> --
>>> 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
>>
>>
>>
>> --
>> John F. Davis
>>
>> 独树一帜
>>
>> --
>> 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
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Treking,

On Thu, Jan 5, 2012 at 2:17 PM, TreKing  wrote:
> On Thu, Jan 5, 2012 at 1:07 PM, John Davis  wrote:
>>
>> Yes, I would think it is possible, but not in this version. Its possible
>> to set all line items to the same value.  However, its not possible to set
>> the colors on a case by case value using the provided api.
>
>
> Yes it is. Please stop blaming the platform for your lack of understanding
> it. I already explained how you can create a data-model that holds the
> unique color per item that you then set on the View.
>

I'm not blaming anyone or the api. I am simply saying it has a bug.
Someone might want to look into it.


>> But the api does not allow you to set a tag outside this code so that the
>> routine can change the text color based on the tag.
>
>
> Yes it does. But using the Tag property to achieve this is overkill and ugly
> anyway.

Sorry, but it is the only thing provided by the api and its not the
settag which raises the exception.  It is the getitematpostion call.
It says it gets the data at position x.  When this call is made it
raises and exception.  That is the bug. It should return null if it
does not exist. Raising an exception sounds like a bug.

>
>>
>> If you try to get this data, it raises an exception.
>
>
> No, if you don't know how to use this function and use it incorrectly, then
> it raises an exception.



I am not using the data from the call and getting an exception.  I am
making the call and getting an exception.


>
> At this point I have to suggest to you that you take a step back, get
> yourself a good book, and review the documentation thoroughly and go through
> the samples. You are apparently confused about a number of things with how
> the adapters work and are not going to get anywhere until you understand
> what they are and how they work.
>
> Good luck.
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Sadly I appreciate your help, but I don't think it will work. I've
already done an override of the getview call.  The higher level logic
which knows which items can specify the draw color can not communicate
it to the lower level.  The code samples, i have seen set all the
colors in a list. I don't see any which set colors on a line by line
basis.  Probably the gmail example you gave uses private api calls
since the code is not online anywhere.

2012/1/5 Kostya Vasilyev :
> Yes it is possible to set colors on a case by case basis using the provided
> API.
>
> It's just that the provided API is not structured the way you expect.
>
> Create a data item class with fields to base the logic on
> Extend BaseAdapter
> Override getView
> Check the data item fields and make the decision
> Optionally, delegate to a method in the activity, an "appearance manager"
> object, or make the decision in some other way.
>
> -- Kostya
>
> 5 января 2012 г. 23:07 пользователь John Davis  написал:
>
>> Yes, I would think it is possible, but not in this version. Its
>> possible to set all line items to the same value.  However, its not
>> possible to set the colors on a case by case value using the provided
>> api.
>>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
The only exception which i can find is javalang.unsupportedOperationException.
as I was saying the api has a bug. The docs say you can get the data,
when you try to so you get an exception. Either the docs are incorrect
or its a bug.

On Thu, Jan 5, 2012 at 2:06 PM, TreKing  wrote:
> On Thu, Jan 5, 2012 at 1:02 PM, Kristopher Micinski 
> wrote:
>>
>> Yeah, while it could be some threading thing, I think it is as simple as
>> this...
>>
>> (Also, like I said, you're probably pulling the irrelevant portion of
>> the logcat, the offending code is surely sitting in your functionality
>> activitythread is just doing the instrumentation off the looper...)
>
>
> You guys are correct - I jumped to threading idea based on a quick glance of
> the posted stack, which is now clearly not the right one.
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Yes, I would think it is possible, but not in this version. Its
possible to set all line items to the same value.  However, its not
possible to set the colors on a case by case value using the provided
api.

This code will set all the line items to blue:

public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View row;
row = super.getView(position, convertView, parent);
TextView text;
//  text = (TextView) row.findViewWithTag(2);
text = (TextView) row.findViewById(android.R.id.text1);
text.setTextColor(Color.parseColor("#64788e"));
return row;
}

I tweaked it to use the tag like so:
public View getView(int position, View convertView, ViewGroup parent) {

  View row = super.getView(position, convertView, parent);
  TextView text = (TextView) row.findViewWithTag(99);
  // if this row has been tagged with the marker, set the color to blue
  if (null != text) {
text.setTextColor(Color.parseColor("#64788e")); 
  }
  // This will set all row items to be blue.
//  text = (TextView) row.findViewById(android.R.id.text1);
  return row;
}

But the api does not allow you to set a tag outside this code so that
the routine can change the text color based on the tag.

ie.

View rowView;
int listCount;
View fooView;
listCount = adapter.getCount();  // this says 6 items in array
int count = -1;
count = theList.getCount();  // this also says 6 items in teh view
for (int i=0;ihttp://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
It looks like a bug

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2661
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2679
ActivityThread.access$2300(ActivityThread,
ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033  
ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 868  
ZygoteInit.main(String[]) line: 626 
NativeStart.main(String[]) line: not available [native method]  



On Thu, Jan 5, 2012 at 1:42 PM, TreKing  wrote:
> On Thu, Jan 5, 2012 at 12:39 PM, John Davis  wrote:
>>
>> fooView = (View) theList.getItemAtPosition(i); // raises exception
>
>
> The exception would be?
> The stack trace would be?
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
On Thu, Jan 5, 2012 at 12:44 PM, Kostya Vasilyev  wrote:
> Ok, great.
>
> One simple thing you can do is to check the item's position, e.g. set odd
> items to blue and even items to red (just to pick an example).

The only logic which knows the desired color is the main view which
populated the list view.  It seems that android can not do what I
desire.

>
> Beyond that, consider creating a proper "data item" class.
>
> The adapter's getView would then examine the data item at the requested
> position and make the decision on how to present it, based on its field
> values (e.g. names starting with "A" are red, starting with "B" are green,
> the rest are blue).
>
> Also consider extending BaseAdapter rather than ArrayAdapter - it's just a
> little bit more work, but should really clarify things for you.
>
> The links posted by TreKing are Mark are good.
>
> -- Kostya
>
> 5 января 2012 г. 21:31 пользователь John Davis  написал:
>
>> Kostya,
>>
>> Tip of the hat to you.  That worked.  It will set all the items to
>> blue text. I appreciate your help a lot.
>>
>> Now, is there a simple way to do this selectively?  I saw you could
>> tag items and then look based upon a tag.  Perhaps that will work?  I
>> would prefer that the class which creates the array adapter and list
>> view set the tag for the color and the array adapter to draw the line
>> items in blue or red based upon this tag.
>>
>> John
>>
>> On Thu, Jan 5, 2012 at 12:13 PM, Kostya Vasilyev 
>> wrote:
>> > Aha!
>> >
>> > android.R.layout.simple_list_item_1 is defined in the platform, you can
>> > find
>> > it under > > directory>/platforms/platform-/data/res/layout (that data/res
>> > is
>> > very useful to look up things):
>> >
>> > The whole layout is a TextView, and its id is "@android:id/text1",
>> > which, on
>> > the Java side of things, is android.R.id.text1.
>> >
>> > So you'd do something like.
>> >
>> >        @Override
>> >        public View getView(int position, View convertView, ViewGroup
>> > parent)
>> > {
>> >                View row = super.getView(position, convertView, parent);
>> >            TextView text = (TextView)
>> > row.findViewById(android.R.id.text1);
>> >            text.setTextColor(0x64788e);
>> >                return row;
>> >        }
>> >
>> > Or just this, knowing that the layout is just one TextView:
>> >
>> > TextView text = (TextView) row;
>> >
>> > The direct typecast should work for the hello-listview sample, as that
>> > also
>> > uses a row layout containing a single TextView with no children (and no
>> > id,
>> > so findViewById won't work here).
>> >
>> > -- Kostya
>> >
>> > 5 января 2012 г. 21:04 пользователь John Davis 
>> > написал:
>> >
>> >> Hello
>> >>
>> >> On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev 
>> >> wrote:
>> >> > Just to clarify 2:
>> >> >
>> >> > I meant calling super.getView from your adapter's getView, assuming
>> >> > it's
>> >> >  a
>> >> > subclass of ArrayAdapter.
>> >> >
>> >> > Do not call adapter.getView from outside the adapter's code, that's
>> >> > meaningless.
>> >>
>> >> That makes sense. Thanks.
>> >>
>> >> >
>> >> > Now the view ids What layout id do you use to initialize the
>> >> > adapter?
>> >> > Perhaps android.R.layout.?
>> >>
>> >> I did :
>> >>                MyAdapter adapter = new
>> >> MyAdapter(this,android.R.layout.simple_list_item_1, values);
>> >>
>> >> >
>> >> > A side note: my suggestions here are just to patch up things based on
>> >> > the
>> >> > route you've already headed down (using ArrayAdapter).
>> >>
>> >>
>> >> For what it is worth, I can do this:
>> >>         public View getView(int position, View convertView, ViewGroup
>> >> parent) {
>> >>         TextView text = new TextView(getContext());
>> >>         text.setText("Hi, I am position " + position);
>> >>         text.setTextColor(Color.parseColor("#64788e"));
>>

[android-developers] is this a bug

2012-01-05 Thread John Davis
A listview says there are 6 items in the list. ie. count = 6
Yet, you can not get the items

for (int i=0;ihttp://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Kostya,

Tip of the hat to you.  That worked.  It will set all the items to
blue text. I appreciate your help a lot.

Now, is there a simple way to do this selectively?  I saw you could
tag items and then look based upon a tag.  Perhaps that will work?  I
would prefer that the class which creates the array adapter and list
view set the tag for the color and the array adapter to draw the line
items in blue or red based upon this tag.

John

On Thu, Jan 5, 2012 at 12:13 PM, Kostya Vasilyev  wrote:
> Aha!
>
> android.R.layout.simple_list_item_1 is defined in the platform, you can find
> it under  directory>/platforms/platform-/data/res/layout (that data/res is
> very useful to look up things):
>
> The whole layout is a TextView, and its id is "@android:id/text1", which, on
> the Java side of things, is android.R.id.text1.
>
> So you'd do something like.
>
>        @Override
>        public View getView(int position, View convertView, ViewGroup parent)
> {
>                View row = super.getView(position, convertView, parent);
>            TextView text = (TextView) row.findViewById(android.R.id.text1);
>            text.setTextColor(0x64788e);
>                return row;
>        }
>
> Or just this, knowing that the layout is just one TextView:
>
> TextView text = (TextView) row;
>
> The direct typecast should work for the hello-listview sample, as that also
> uses a row layout containing a single TextView with no children (and no id,
> so findViewById won't work here).
>
> -- Kostya
>
> 5 января 2012 г. 21:04 пользователь John Davis  написал:
>
>> Hello
>>
>> On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev 
>> wrote:
>> > Just to clarify 2:
>> >
>> > I meant calling super.getView from your adapter's getView, assuming it's
>> >  a
>> > subclass of ArrayAdapter.
>> >
>> > Do not call adapter.getView from outside the adapter's code, that's
>> > meaningless.
>>
>> That makes sense. Thanks.
>>
>> >
>> > Now the view ids What layout id do you use to initialize the
>> > adapter?
>> > Perhaps android.R.layout.?
>>
>> I did :
>>                MyAdapter adapter = new
>> MyAdapter(this,android.R.layout.simple_list_item_1, values);
>>
>> >
>> > A side note: my suggestions here are just to patch up things based on
>> > the
>> > route you've already headed down (using ArrayAdapter).
>>
>>
>> For what it is worth, I can do this:
>>         public View getView(int position, View convertView, ViewGroup
>> parent) {
>>         TextView text = new TextView(getContext());
>>         text.setText("Hi, I am position " + position);
>>         text.setTextColor(Color.parseColor("#64788e"));
>>         return  text;
>>        }
>> That will set the text color to blue, but it will also change the text
>> I put in the list.
>>
>> >
>> > One day, as your knowledge grows, you'll want to throw away the
>> > three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
>> > extending BaseAdapter.
>> >
>>
>>
>> Is this example
>> http://developer.android.com/resources/tutorials/views/hello-listview.html
>> impossible to manipulate the color of individual list items?  Or, is
>> there a way to patch up this code to do what I want?  It seems pretty
>> trivial to do. I don't understand why the hooks do not exist for what
>> i want to do.
>> > -- Kostya
>> >
>> > 5 января 2012 г. 20:47 пользователь John Davis 
>> > написал:
>> >
>> >> Hello Kostya,
>> >>
>> >> Thanks for the reply.
>> >>
>> >> On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev 
>> >> wrote:
>> >> >
>> >> > 2:
>> >> >
>> >> > Yes, you're supposed to call the base class in your case, the
>> >> > ArrayAdapter
>> >> > will be doing most of the work for you, inflating new or reusing
>> >> > existing
>> >> > row layouts.
>> >>
>> >> Ok. I think I am doing what you say.
>> >>
>> >> >
>> >> > 3:
>> >> >
>> >> > Use view ids that are relevant to (used inside) your actual row item
>> >> > layout.
>> >> >
>> >> > I very much doubt that R.id.listView1 is it.
>> >>
>> >> The listview is created using that id.  I did 

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev  wrote:
> Just to clarify 2:
>
> I meant calling super.getView from your adapter's getView, assuming it's  a
> subclass of ArrayAdapter.
>
> Do not call adapter.getView from outside the adapter's code, that's
> meaningless.

That makes sense. Thanks.

>
> Now the view ids What layout id do you use to initialize the adapter?
> Perhaps android.R.layout.?

I did :
MyAdapter adapter = new
MyAdapter(this,android.R.layout.simple_list_item_1, values);

>
> A side note: my suggestions here are just to patch up things based on the
> route you've already headed down (using ArrayAdapter).


For what it is worth, I can do this:
 public View getView(int position, View convertView, ViewGroup parent) {
 TextView text = new TextView(getContext());
 text.setText("Hi, I am position " + position);
 text.setTextColor(Color.parseColor("#64788e"));
 return  text;
}
That will set the text color to blue, but it will also change the text
I put in the list.

>
> One day, as your knowledge grows, you'll want to throw away the
> three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
> extending BaseAdapter.
>


Is this example
http://developer.android.com/resources/tutorials/views/hello-listview.html
impossible to manipulate the color of individual list items?  Or, is
there a way to patch up this code to do what I want?  It seems pretty
trivial to do. I don't understand why the hooks do not exist for what
i want to do.
> -- Kostya
>
> 5 января 2012 г. 20:47 пользователь John Davis  написал:
>
>> Hello Kostya,
>>
>> Thanks for the reply.
>>
>> On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev 
>> wrote:
>> >
>> > 2:
>> >
>> > Yes, you're supposed to call the base class in your case, the
>> > ArrayAdapter
>> > will be doing most of the work for you, inflating new or reusing
>> > existing
>> > row layouts.
>>
>> Ok. I think I am doing what you say.
>>
>> >
>> > 3:
>> >
>> > Use view ids that are relevant to (used inside) your actual row item
>> > layout.
>> >
>> > I very much doubt that R.id.listView1 is it.
>>
>> The listview is created using that id.  I did not create any resources
>> for the individual items. I don't know how to do that.  The example
>> code I used simply created a listview in xml.
>>
>> >
>> > 4:
>> >
>> > view.findViewById() is the getChild call you're looking for, using an id
>> > to
>> > locate the view. Use correct id value and it should work.
>>
>> Super. I am glad you confimed I need ot do that.  However, as I said,
>> I don't know what would be the id of the row items since they are not
>> defined.
>>
>> >
>> > -- Kostya
>> >
>> > 5 января 2012 г. 20:31 пользователь John Davis 
>> > написал:
>> >>
>> >> Hello
>> >>
>> >> The getView() call for arrayadapter is blank.  Is there a document
>> >> which describes how it works?
>> >>
>> >> I have overridden it in order to change the text color of items in a
>> >> list view.  So far, I can't find any code which works.
>> >>
>> >> I've tried this:
>> >>
>> >> public class MyAdapter extends ArrayAdapter {
>> >>
>> >>        public MyAdapter(Context context, int textViewResourceId, T[]
>> >> objects) {
>> >>                super(context, textViewResourceId, objects);
>> >>        }
>> >>        // context, int, []
>> >>
>> >>        @Override
>> >>        public View getView(int position, View convertView, ViewGroup
>> >> parent) {
>> >>                // TODO Auto-generated method stub
>> >>                View row;
>> >>            row = super.getView(position, convertView, parent);
>> >>            TextView text;
>> >>            text = (TextView) row.findViewById(R.id.listView1);
>> >>            text.setTextColor(0x64788e);
>> >>                return row;
>> >>        }
>> >> }
>> >>
>> >>
>> >> I don't know if I am supposed to call getView in the main code or not,
>> >> but this will most certain crash the app.
>> >> The super.getView call seems to get a row in the list.  It seems  that
>> >> you

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

>> I don't have resource id's for the individual row items.
>
>
> You should, it's your project.
>
>>

Super. That might help, but this example
http://developer.android.com/resources/tutorials/views/hello-listview.html
does not use id's for the individual list items.  How would I do that?

John

-- 
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


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Kostya,

Thanks for the reply.

On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev  wrote:
>
> 2:
>
> Yes, you're supposed to call the base class in your case, the ArrayAdapter
> will be doing most of the work for you, inflating new or reusing existing
> row layouts.

Ok. I think I am doing what you say.

>
> 3:
>
> Use view ids that are relevant to (used inside) your actual row item layout.
>
> I very much doubt that R.id.listView1 is it.

The listview is created using that id.  I did not create any resources
for the individual items. I don't know how to do that.  The example
code I used simply created a listview in xml.

>
> 4:
>
> view.findViewById() is the getChild call you're looking for, using an id to
> locate the view. Use correct id value and it should work.

Super. I am glad you confimed I need ot do that.  However, as I said,
I don't know what would be the id of the row items since they are not
defined.

>
> -- Kostya
>
> 5 января 2012 г. 20:31 пользователь John Davis  написал:
>>
>> Hello
>>
>> The getView() call for arrayadapter is blank.  Is there a document
>> which describes how it works?
>>
>> I have overridden it in order to change the text color of items in a
>> list view.  So far, I can't find any code which works.
>>
>> I've tried this:
>>
>> public class MyAdapter extends ArrayAdapter {
>>
>>        public MyAdapter(Context context, int textViewResourceId, T[]
>> objects) {
>>                super(context, textViewResourceId, objects);
>>        }
>>        // context, int, []
>>
>>        @Override
>>        public View getView(int position, View convertView, ViewGroup
>> parent) {
>>                // TODO Auto-generated method stub
>>                View row;
>>            row = super.getView(position, convertView, parent);
>>            TextView text;
>>            text = (TextView) row.findViewById(R.id.listView1);
>>            text.setTextColor(0x64788e);
>>                return row;
>>        }
>> }
>>
>>
>> I don't know if I am supposed to call getView in the main code or not,
>> but this will most certain crash the app.
>> The super.getView call seems to get a row in the list.  It seems  that
>> you then need to get the view associated with that row.  I have no
>> idea how to do that. I don't have resource id's for the individual row
>> items.  Here, I tried to use the  resource id of the list itself.
>> There is not a View.getChild() like call.
>> --
>> John F. Davis
>>
>> 独树一帜
>>
>> --
>> 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
>
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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 there a docment on getView()?

2012-01-05 Thread John Davis
Hello

The getView() call for arrayadapter is blank.  Is there a document
which describes how it works?

I have overridden it in order to change the text color of items in a
list view.  So far, I can't find any code which works.

I've tried this:

public class MyAdapter extends ArrayAdapter {

public MyAdapter(Context context, int textViewResourceId, T[] objects) {
super(context, textViewResourceId, objects);
}
// context, int, []

@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View row;
row = super.getView(position, convertView, parent);
TextView text;
text = (TextView) row.findViewById(R.id.listView1);
text.setTextColor(0x64788e);
return row;
}
}


I don't know if I am supposed to call getView in the main code or not,
but this will most certain crash the app.
The super.getView call seems to get a row in the list.  It seems  that
you then need to get the view associated with that row.  I have no
idea how to do that. I don't have resource id's for the individual row
items.  Here, I tried to use the  resource id of the list itself.
There is not a View.getChild() like call.
-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
In the getView code, when I returned the super call, it was blank
text.  When I returned a row as you did in your example, it would show
the text in gray/white.  Trying everything to change the color results
in no change.  If I want to change the text color should I uses
SetBackgroundColor or SetTextColor? Also, do I need to dork with the
adapter in the main class to invoke getView?  It looks from your
example I don't need to do that.  Lastly, this approach seems to get
all the text to be the same color once I get it working.  Any idea if
I can set individual line item colors?

On Thu, Jan 5, 2012 at 11:01 AM, Mark Murphy  wrote:
> If the TextView is truly invisible, you need to make it visible, using
> setVisibility().
>
> Otherwise, use Hierarchy View to examine your UI and see what is going on:
>
> http://developer.android.com/guide/developing/debugging/debugging-ui.html
>
> On Thu, Jan 5, 2012 at 10:57 AM, John Davis  wrote:
>> I changed the getview code so it only calls the super code once and
>> returns the rowView as you did.
>>
>>>
>>> public class MyAdapter extends ArrayAdapter {
>>>
>>>public MyAdapter(Context context, int textViewResourceId, T[] 
>>> objects) {
>>>super(context, textViewResourceId, objects);
>>>}
>>>// context, int, []
>>>
>>>@Override
>>>public View getView(int position, View convertView, ViewGroup 
>>> parent) {
>>>// TODO Auto-generated method stub
>>>View rowView;
>>>rowView = super.getView(position, convertView, parent);
>>>((TextView)rowView).setTextColor(0x64788e);
>>>return rowView;
>>>}
>>>
>>>
>>
>> And removed the code in the main class to dork with the view.  It is
>> still invisible text.  I was assuming this code would make all the
>> text items be red in color.  I really want to be able to set certain
>> lines to red and others to blue.
>>
>> --
>> 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
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
This also does not work:
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View rowView;
rowView = (TextView) super.getView(position, convertView, parent);
//  ((TextView)rowView).setTextColor(0x64788e);
rowView.setBackgroundColor(0x64788e);
return rowView;
}

On Thu, Jan 5, 2012 at 10:57 AM, John Davis  wrote:
> I changed the getview code so it only calls the super code once and
> returns the rowView as you did.
>
>>
>> public class MyAdapter extends ArrayAdapter {
>>
>>public MyAdapter(Context context, int textViewResourceId, T[] 
>> objects) {
>>super(context, textViewResourceId, objects);
>>}
>>// context, int, []
>>
>>@Override
>>public View getView(int position, View convertView, ViewGroup parent) 
>> {
>>// TODO Auto-generated method stub
>>View rowView;
>>rowView = super.getView(position, convertView, parent);
>>((TextView)rowView).setTextColor(0x64788e);
>>return rowView;
>>}
>>
>>
>
> And removed the code in the main class to dork with the view.  It is
> still invisible text.  I was assuming this code would make all the
> text items be red in color.  I really want to be able to set certain
> lines to red and others to blue.



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
I changed the getview code so it only calls the super code once and
returns the rowView as you did.

>
> public class MyAdapter extends ArrayAdapter {
>
>        public MyAdapter(Context context, int textViewResourceId, T[] objects) 
> {
>                super(context, textViewResourceId, objects);
>        }
>        // context, int, []
>
>        @Override
>        public View getView(int position, View convertView, ViewGroup parent) {
>                // TODO Auto-generated method stub
>                View rowView;
>            rowView = super.getView(position, convertView, parent);
>            ((TextView)rowView).setTextColor(0x64788e);
>                return rowView;
>        }
>
>

And removed the code in the main class to dork with the view.  It is
still invisible text.  I was assuming this code would make all the
text items be red in color.  I really want to be able to set certain
lines to red and others to blue.

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Well,

I have this in my main class:
// Build the listview
MyAdapter adapter = new
MyAdapter(this,android.R.layout.simple_list_item_1, values);
//  ArrayAdapter adapter = new
ArrayAdapter(this,android.R.layout.simple_list_item_1,
values);

theList.setAdapter(adapter);
theList.setOnItemClickListener(new MyOnItemClickListener(this));

// Set the color based upon the string value
View rowView;
int listCount;
View fooView;
c.moveToFirst();
listCount = adapter.getCount();
for (int i=0;i extends ArrayAdapter {

public MyAdapter(Context context, int textViewResourceId, T[] objects) {
super(context, textViewResourceId, objects);
}
// context, int, []

@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
TextView rowView;
rowView = (TextView) super.getView(position, convertView, parent);
((TextView)rowView).setTextColor(0x64788e);
return super.getView(position, convertView, parent);
}


The result from hacking around is that the list has invisible values.
I guess its time to look at your pdf. lol

John

2012/1/5 John Davis :
> Hello Mark,
>
> Ok. Thanks.  I've managed to create my own MyAdapter.  I'm guessing, I
> need to override the getView routine there now.  The code still works
> using the custom adapter. It was a struggle ot get the constructor
> right.
>
> I'll look at your pdf in a bit. Let me struggle with the concept of
> overriding getView for a bit.
>
> John
>
> On Thu, Jan 5, 2012 at 10:26 AM, Mark Murphy  wrote:
>> On Thu, Jan 5, 2012 at 10:19 AM, John Davis  wrote:
>>> Ok, I maybe over my head.  I guess the first thing to do is subclass
>>> array adapter as you said first so I can override its getView call.
>>
>> Right. Here is a free excerpt from one of my books that goes through
>> that process:
>>
>> http://commonsware.com/Android/excerpt.pdf
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Warescription: Three Android Books, Plus Updates, One Low Price!
>>
>> --
>> 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
>
>
>
> --
> John F. Davis
>
> 独树一帜



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello Mark,

Ok. Thanks.  I've managed to create my own MyAdapter.  I'm guessing, I
need to override the getView routine there now.  The code still works
using the custom adapter. It was a struggle ot get the constructor
right.

I'll look at your pdf in a bit. Let me struggle with the concept of
overriding getView for a bit.

John

On Thu, Jan 5, 2012 at 10:26 AM, Mark Murphy  wrote:
> On Thu, Jan 5, 2012 at 10:19 AM, John Davis  wrote:
>> Ok, I maybe over my head.  I guess the first thing to do is subclass
>> array adapter as you said first so I can override its getView call.
>
> Right. Here is a free excerpt from one of my books that goes through
> that process:
>
> http://commonsware.com/Android/excerpt.pdf
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hmm.

Ok, I maybe over my head.  I guess the first thing to do is subclass
array adapter as you said first so I can override its getView call.

-- 
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


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello Mark,

Thanks for your response.  I tried various things already.  Here is
what kind of made sense but did not work:

 // Set the color based upon the faction.
 View rowView;
 int listCount;
 View fooView;

listCount = adapter.getCount();
for (int i=0;i wrote:
> On Thu, Jan 5, 2012 at 9:50 AM, John Davis  wrote:
>> I have a listview with items in it.  I would like to set certain line
>> items to be a certain color.  Is this possible?
>
> Override getView() of your ArrayAdapter (or bindView() of your
> CursorAdapter) and put in the logic to set the color as part of
> configuring that row.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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 it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello

I have a listview with items in it.  I would like to set certain line
items to be a certain color.  Is this possible?

-- 
John F. Davis

独树一帜

-- 
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] play skyrim? here is info on an app I wrote using sqlite and xslt

2011-12-12 Thread John Davis
http://netskink.blogspot.com/2011/12/skyrim-alchemy-lab-using-xslt-xml-and.html

-- 
John F. Davis

独树一帜

-- 
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] external saxon jar in android app

2011-12-09 Thread John Davis
Hello

I want to include saxon xml processor in an android app.  I have added
the app to my project but I get the --core-library message.  The jar
file includes some system libs I guess.  I am not building this app to
distribute.  I don't care about security problems.  I simply want to
port a java app I have written to use the android UI.  Is this
possible?

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Re: Hook event listeners for activity/application lifecycle events

2011-11-04 Thread John Davis
On Fri, Nov 4, 2011 at 3:30 AM, Doug  wrote:
> On Nov 2, 8:54 pm, Miles  wrote:
>> So is there a way to hook event listeners for lifecycle events?
>
> Not really.  You can write your own subclass of Activity that accepts
> a listener for events and hook it all up yourself.  Then you can have
> all your actual activities that need lifecycle callbacks subclass that
> instead of Activity directly.  There also may be some frameworks that
> do this for you, but you won't get it from Android directly.
>

I'm thinking you just override the activity calls for the events shown here:
http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle


-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] There is some android component that distribute text as news paper column?

2011-11-04 Thread John Davis
On Fri, Nov 4, 2011 at 6:57 AM, lbendlin  wrote:
> I guess this is your lucky day - you will be the first one to develop this.  
> I would start with finding out how many columns to display on the current 
> device and screen resolution ( don't be silly and try to cram more than one 
> column onto a phone in portrait). Then I would make the first column of 
> infinite-ish height and flow the text into it. Then I would find out what the 
> last wholly visible word is and copy the text after that into the second 
> column etc.  Of course you'll need to decide if you allow scrolling or not, 
> and what that does to the UX...
>

That is what I was thinking.  Two columns in portrait mode?

But if you want to do it I have to ask - have you tried to put two
list views in a layout?

-- 
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


Re: [android-developers] ios emulator

2011-11-02 Thread John Davis
i've heard that you can not get an ios license if you have worked with
the android api.

On Wed, Nov 2, 2011 at 6:39 PM, Mark Murphy  wrote:
> You're welcome to try. You'll be sued into oblivion by Apple, since
> iOS is not open source. And, since you'll probably have to take
> hostages in order to get the iOS source code with which to build the
> emulator, there's the whole criminal aspect of things to consider.
>
> On Wed, Nov 2, 2011 at 6:35 PM, bob  wrote:
>> Why can't someone build an ios emulator that runs on Android?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.1 Available!
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] ARMy of one?

2011-11-01 Thread John Davis
This shows how the arm specification is used inside the System on a
Chip (SoC) designed by qualcomm.  It also shows how these SoCs are in
smartphones, and tablets.

http://en.wikipedia.org/wiki/Snapdragon_(system_on_chip)

>From the page it says, "The Snapdragon application processor core,
dubbed Scorpion, is Qualcomm's own design".   I  believe that means it
is arm compatible instruciton set, but not an arm licensed cpu core.



On Tue, Nov 1, 2011 at 11:30 AM, Kristopher Micinski
 wrote:
> ARM doesn't "make" the chips.  They design the IP cores for the chips,
> so their main investment is the chip design, not the chip itself.  The
> chips are made by many many other companies.
>
> Kris
>
> On Tue, Nov 1, 2011 at 11:23 AM, bob  wrote:
>> Is it true that almost all Android phones are powered by an ARM chip
>> made by ARM company in England?
>>
>>
>>
>> --
>> 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
>>
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] How i can make that a polygon fill the 80% of the width of the screen?

2011-10-28 Thread John Davis
Hello Saez,

This looks like opengl code which uses glut library for windows/linux.
 I suggest you look into Ed Burnette's Hello Android book.  It shows
you how to draw a cube in opengl on android.  Start there.

John F. Davis

独树一帜

-- 
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


Re: [android-developers] HTC opengles blank screen (and ANR) issues.

2011-10-28 Thread John Davis
Enable the opengl debugging so that output goes to the logcat.  It
will also cause an exception to break execution if an opengl error
occurs.

On Thu, Oct 27, 2011 at 3:02 AM, Affine Studios  wrote:
> We're having an issue with our app/game on what seems to be many HTC
> devices where a blank screen will occur (our app is a native opengl
> app) and from what we've heard from users is that it will force
> close..either after a few seconds or when they back out. The cause of
> the close is an ANR in GL surface view
>
> Has anyone encountered this issue with HTC or other devices and can
> shed some light on this? Our game works flawlessly on many devices but
> seems to crash on many HTC devices.
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] A question regarding publishing an application in android market

2011-10-28 Thread John Davis
Possibly.  The marketplace app filters available apps by the host
platform capabilities.

On Thu, Oct 27, 2011 at 6:16 AM, Kobi  wrote:
> I developed an application which has the following permissions on its
> "androidManifest.xml" file:
> android.permission.CALL_PHONE"
> android.permission.READ_PHONE_STATE"
> The problem is that I cannot download this application through
> "Android Market" to some tablet devices ("Acer" model "iconia a500" to
> be exact).
> Does "Android Market" filters this application because tablet devices
> cannot make phone calls?
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Re: Install an android app on Google TV

2011-10-28 Thread John Davis
I have a logitech revue.  Will they ever enable marketplace on these
things?  I would love to install AngryBirds on my 55" tv.

On Thu, Oct 27, 2011 at 7:32 AM, Punith Raj  wrote:
> Hi dillipk,
>
> Google TV is supported only for android version 3.1 and above, Install
> the updated versions and you will not get these errors.
> But you need a linux OS for emulator.
>
> Thanks
> Punith
>
> On Oct 14, 11:01 pm, dillipk  wrote:
>> Hello,
>>   How do I install my app on Google TV.? It is written android 2.3
>> SDK.
>>
>> My System Config:
>>
>> Windows XP Pro
>> Ecplise
>> SDK Platform Android 3.2 API 13, revision 1
>>
>> Interestingly, I am not able to install Google TV add-on on my PC. AVD
>> manager saying "Some packages were found but are not compatible
>> updates."
>>
>> Please help.
>>
>> Thanks,
>> DK
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Android developer discussion forums?

2011-10-28 Thread John Davis
I like #android-dev on irc.openprojects.net.

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] emulator

2011-10-28 Thread John Davis
You are not specifying a virtual disk image.  In other words, you are
running just the emulator but not an emulator running a specific
machine.

Put in terms of vmware, you are running a vmware software, but not the
vmware software plus your pc's disk image.  In terms of real hardware,
you are booting your pc but do not have a disk installed with an OS on
it.

On Thu, Oct 27, 2011 at 1:45 PM, rua jefwa  wrote:
> when i try to run my emulator i get something like this
>
> invalid command-line parameter: Files\Android\android-sdk\tools/
> emulator-arm.exe.
> Hint: use '@foo' to launch a virtual device named 'foo'.
> please use -help for more information
>
>
> what may be wrong
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] how to make app run forever with out exit

2011-10-28 Thread John Davis
Hi Sureshmca,

Try to search for 10 innovations in Android presentaion.  One of them
is that apps never exit.  The apps are suspended.  You can use the
application manager to force stop or uninstall the application.  I am
not certain if you can use this method to uninstall another
applicaiton though. However, I know the reverse is possible, eg. you
can start up marketplace with a pointer to install a second app.

You can also build an app as a service.  A service runs in background.

John

On Fri, Oct 28, 2011 at 2:32 AM, suresh  wrote:
> Hi Friends
>
> Is there any option in android like we should give to user to close
> the application , i.e using forcestop or uninstall.
>
> I want to create app in such a mean that once install the user should
> not uninstall and should not stop.
>
> Is there any way to implement service to run allways in background.
>
> Please help me friends this is so urgent.
>
>
> Regards
> Suresh
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Re: How do you use and debug your apps in your main phone?

2011-10-28 Thread John Davis
On Fri, Oct 28, 2011 at 9:58 AM, Ricardo Amaral
 wrote:
> I already use the emulator a lot for development but it's always good to
> test on a real device and I do it from time to time just to make sure
> everything works. I think I'll wait until I buy a new Android phone, I have
> an HTC Hero and, as you can imagine, got stuck in time; I'll use that for
> development.
>
> But I'll just have to deal with it until I can afford a new phone.
>
> --
> 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

Not sure of the question, but you can use your existing phone to
debug. Often times, I will attach my phone to my pc even though I am
also running an emulator.  When I debug the program, I choose whether
I want to test on the phone or the emulator.  Its helpful if you want
to see two copies running at the same time.  Version A runs on the
debugger and version B runs on the real hardware.

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] First Question ... be gentle

2011-10-28 Thread John Davis
2011/10/28 Francisco Dalla Rosa soares :
> http://lmgtfy.com/?q=java+override
> I can't of nicer way to do this :)
>
>
> 2011/10/28 JBlaza 
>>
>> I have looked on several other forums. i am new to the java programming
>> community, and i am looking for a clear understanding of the @overide
>> annotation, and what it does, or signifies.
>>

The override part is a comment.  It means that the routine exists
already in your class or parent(s) class and that you have decided to
do it differently from the already implemented code.
In other words, you have created a new class derived from an existing
class.  The existing class or one of its parent classes has
implemented a function.  You want to change the  behaviour of
that funciton so you override it by creating the same function in your class.

Possibly I am not sure, but the keyword might also check your function
parameters and return class to ensure that
you are correctly matching the existing function as a check. Said
another way, there exists a class called Foo and you derive from it
with a class called MyFoo.  Foo implements
a routine called void doIt(int a);  You want to override it.  In
eclipse, you type doI - and then ctrl-space and it auto-completes to
the function signature with empty brackets and the @override keyword.
Somewhere along the way, you change the funciton parameter to a float,
but you leave the @override keyword there.  As far as the compiler
goes, this is legal, but with the override syntax there
the compiler will flag that the routine is not really overriden since
doIt() requires a int parameter and not a float.

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] New to Android

2011-10-28 Thread John Davis
Hi Sean,

If you have an already built .apk file, you can use the command line
to install it on the emulator.
adb install foo.apk

John
On Fri, Oct 28, 2011 at 3:35 AM, MANISH RAJ  wrote:
> Hi Sean Thomas,
>  As you wrote there you want run a project which is already you have. If
> you have project file then it is very easy.
>     You first create a new android project then uses option create project
> from existing source and navigate to the project files.
>
>     If you want to change the target then simply edit AndroidManifest.xml
> files
>
> Thanks,
> manish
>
> 
> Manish Kumar
> Computer Science and Engineering (2008-2012)
> Govt. Model Engineering College
> Cochin-21
> +919287301035
> manishrajja...@gmail.com
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] opengl and sketchup problem

2011-10-28 Thread John Davis
On Fri, Oct 28, 2011 at 7:57 AM, Latimerius  wrote:
> On Thu, Oct 27, 2011 at 8:38 PM, John Davis  wrote:
>> That is what I kind of what I tried to do (I used GL_VERTEX_ARRAY,
>> INDEX_ARRAY was not there.):
>
> That's correct, sorry, I got distracted.  GL_INDEX_ARRAY is a different thing.
>
>> Using this as a guide:
>> http://www.songho.ca/opengl/gl_vertexarray.html
>>
>>public void draw(GL10 gl) {
>>// 
>> http://pyopengl.sourceforge.net/documentation/ref/gl/vertexpointer.html
>>gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>>gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer);
>>gl.glDrawElements(GL10.GL_TRIANGLES, 24, GL10.GL_FIXED,
>> mIndicesBuffer); // mode, count, type, indices
>>gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
>>}
>>
>> It did not display anything though.
>
> This looks OK overall, just try using 36 for the count argument and
> GL_UNSIGNED_BYTE/GL_UNSIGNED_SHORT for the type argument of
> glDrawElements().
>
> Also, your draw function doesn't seem to use colouring nor texturing -
> make sure you at least have a glColor() call somewhere prior to
> draw(), or a colour array, or texturing set up.
>


SOLVED:
Hello Again Latimerius,

It finally works.  Its trying to look at all the docs and have to
translate them into the proper semantics.  ie. docs which use glut,
docs which use pure opengl , docs in 2.0 spec, etc.  One doc on 1.0
showed using a glIndexPointer which was possibly a color index.
Anyway after much trial an error I finally got it when I turned on
OpenGL debugging.  It put the result of the gl calls in the LogCat
output.  There I could see that it was not interpetatiing the array
correctly for the indexes.
Never the less, here is the result which works.  It has the extra
benefit of adding in colors for each face.
public void draw(GL10 gl) {
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer);
gl.glColorPointer(4, GL10.GL_FLOAT, 0, mColorsBuffer);
// Enable color tracking
gl.glEnable(GL10.GL_COLOR_MATERIAL);
gl.glDrawElements(GL10.GL_TRIANGLES, myoffsets.length,
GL10.GL_UNSIGNED_SHORT, mIndicesBuffer); // mode, count, type, indices
}

Thanks again for your help.

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Newb Learning to Debug

2011-10-28 Thread John Davis
Hi

On Fri, Oct 28, 2011 at 9:10 AM, nester  wrote:
> So I'm making progress on my first real android app (not hello world).
> So far everything is going pretty smooth... except for debugging. I
> just can't figure it out for the life of me!
>

Good.  Keep at it.

> I've been able to insert breakpoints and inspect, but when stepping
> through code... it just seems to break.

Set your break points early.  You could be having a crash(Exception)
before you hit your breakpoint.

>
> Other times when I've made an error, I'll get a message on crash like
> "File not found". Messages like this are completely useless... because
> I can't tells WHICH FILE isn't found. So far I can't tell where the
> hell it's breaking when it crashes.
>

Its reached an unhandled exception.  The debugger backtrace might not
show it, but look in logcat output and the traceback to where you're
code did it could be found.

> I've used trace-cat a bit; but that seems better at high level system
> processes, not granular line-by-line step through processes.
>
> Trial & Error have gotten the job done so far... but as a native .Net
> programmer, I know debug tools could be a LOT more useful.
>
> I'm new to Eclipse; so I'm pretty sure this is just a learning curve.
> Can anybody point me to a good debugging tutorial, or video? Do you
> have any good tips on what I could be missing?
>
> Thanks for the help.
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] opengl and sketchup problem

2011-10-27 Thread John Davis
On Thu, Oct 27, 2011 at 1:57 PM, Latimerius  wrote:
> 2011/10/27 John Davis :
>> Latimerius,
>>
>> I think you are correct.  There is another section of the xml file:
>>
>>
>>0 1 2 1 0 3 4 5 6 5 4 7 8 9 10 9 8 11 12 13 14
>> 13 12 15 16 17 18 17 16 19 20 21 22 21 20 23
>>
>>
>> I did not notice until your note.  I looked at it further.  The
>> numbers are not consecutive.  It starts off as
>> 0 1 2 and ends in 23 but it appears that it is saying triangle
>> 4(counting from 1)  is specified by three vertices encoded at offset
>> 1.
>
> Actually, it is saying the first triangle has vertices 0, 1 and 2, the
> second one 1, 0 and 3, the next one 4, 5 and 6 etc.  The vertex
> indices run from 0 to 23 for 24 vertices.
>
>> I'll see if I can use this.  Be right back.
>
> I'm not as familiar with GL ES yet but in full GL you'd render indexed
> data by calling glEnableClientState (GL_INDEX_ARRAY) then
> glIndexPointer() and glDrawElements().
>

That is what I kind of what I tried to do (I used GL_VERTEX_ARRAY,
INDEX_ARRAY was not there.):

Using this as a guide:
http://www.songho.ca/opengl/gl_vertexarray.html

public void draw(GL10 gl) {
// 
http://pyopengl.sourceforge.net/documentation/ref/gl/vertexpointer.html
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer); 
gl.glDrawElements(GL10.GL_TRIANGLES, 24, GL10.GL_FIXED,
mIndicesBuffer); // mode, count, type, indices
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
}

It did not display anything though.

-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] opengl and sketchup problem

2011-10-27 Thread John Davis
Latimerius,

I think you are correct.  There is another section of the xml file:


0 1 2 1 0 3 4 5 6 5 4 7 8 9 10 9 8 11 12 13 14
13 12 15 16 17 18 17 16 19 20 21 22 21 20 23


I did not notice until your note.  I looked at it further.  The
numbers are not consecutive.  It starts off as
0 1 2 and ends in 23 but it appears that it is saying triangle
4(counting from 1)  is specified by three vertices encoded at offset
1.

I'll see if I can use this.  Be right back.

John

On Thu, Oct 27, 2011 at 12:50 PM, Latimerius  wrote:
> Looks like it uses GL_TRIANGLES in indexed mode (probably the most
> common way by far).
>
> That way, each side of your box has 4 vertices.  The two triangles
> used to render the side use 6 indices to refer to the 4 vertices.  So
> you should have 6*4=24 vertices and 6*6=36 indices.
>
> That matches your .dae if I'm not mistaken - the  XML element
> contains your 36 indices, the  element has 72 floats
> which is the 24 vertices, 3 float coordinates each (24*3=72).
>
> On Thu, Oct 27, 2011 at 5:15 PM, John Davis  wrote:
>> FWIW,
>>
>> I am simply taking the data from the xml file and copying it and then
>> pasting into an array.
>> I am not doing a automatic read or anything.  One thing which puzzles
>> me is the number of vertices
>> in the file.
>>
>> For instance, a rectangle has six sides.  If you use two triangles to
>> draw each side
>> that is 6 sides * 2 triangles per side for a total of 12 triangles.
>> This agrees with .xml file
>> which says says there are 12 triangles.
>>
>> From the xml file:
>>
>>
>>0 1 2 1 0 3 4 5 6 5 4 7 8 9 10 9 8 11 12 13 14
>> 13 12 15 16 17 18 17 16 19 20 21 22 21 20 23
>>
>>
>> If you use 3 coordinates for each vertice of a triangle and a triangle
>> has three vertices,
>> then you have 3 * 3 *12 = 9*12 = 108 values of x, y, and z.
>>
>> However the xml file has 72.  From the xml file:
>>   22.62976164142344
>> 29.52755905511811 0 0 0 0 0 29.52755905511811 0 22.62976164142344 0 0
>> 22.62976164142344 0 13.77952755905512 0 0 0 22.62976164142344 0 0 0 0
>> 13.77952755905512 0 29.52755905511811 13.77952755905512 0 0 0 0 0
>> 13.77952755905512 0 29.52755905511811 0 0 29.52755905511811
>> 13.77952755905512 22.62976164142344 29.52755905511811 0 0
>> 29.52755905511811 0 22.62976164142344 29.52755905511811
>> 13.77952755905512 22.62976164142344 29.52755905511811 0
>> 22.62976164142344 0 13.77952755905512 22.62976164142344 0 0
>> 22.62976164142344 29.52755905511811 13.77952755905512
>> 22.62976164142344 0 13.77952755905512 0 29.52755905511811
>> 13.77952755905512 0 0 13.77952755905512 22.62976164142344
>> 29.52755905511811 13.77952755905512
>>
>> So I am thinking it does not draw individual triangles using
>> GL_TRIANGLES mode.  Instead it uses
>> GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN mode where it is sharing vertices.
>> I'm not sure though.
>>
>> Maybe my math is wrong, but if you share triangles the number of verts
>> required is verts' as this table shows.
>>
>> Triangles   Verts  Verts'
>> 1  3 3
>> 2  6 4
>> 3  9 5
>> 4 126
>> 5  157
>> 6  18   8
>>  verts' = tri+2
>> 1236   14
>>
>> and 36*3 = 108 values
>> but 14*3 = 42 values not 72
>>
>> John
>>
>> On Thu, Oct 27, 2011 at 10:22 AM, J Handal  wrote:
>>>
>>> I think is error is due to an incompatible file extension .dae file,
>>> AFIK android use .obj files with android(and other extensions??) but
>>> not Collada files.
>>>
>>> --
>>> 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
>>
>>
>>
>> --
>> John F. Davis
>>
>> 独树一帜
>>
>> --
>> 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 t

Re: [android-developers] opengl and sketchup problem

2011-10-27 Thread John Davis
FWIW,

I am simply taking the data from the xml file and copying it and then
pasting into an array.
I am not doing a automatic read or anything.  One thing which puzzles
me is the number of vertices
in the file.

For instance, a rectangle has six sides.  If you use two triangles to
draw each side
that is 6 sides * 2 triangles per side for a total of 12 triangles.
This agrees with .xml file
which says says there are 12 triangles.

>From the xml file:


0 1 2 1 0 3 4 5 6 5 4 7 8 9 10 9 8 11 12 13 14
13 12 15 16 17 18 17 16 19 20 21 22 21 20 23


If you use 3 coordinates for each vertice of a triangle and a triangle
has three vertices,
then you have 3 * 3 *12 = 9*12 = 108 values of x, y, and z.

However the xml file has 72.  From the xml file:
   22.62976164142344
29.52755905511811 0 0 0 0 0 29.52755905511811 0 22.62976164142344 0 0
22.62976164142344 0 13.77952755905512 0 0 0 22.62976164142344 0 0 0 0
13.77952755905512 0 29.52755905511811 13.77952755905512 0 0 0 0 0
13.77952755905512 0 29.52755905511811 0 0 29.52755905511811
13.77952755905512 22.62976164142344 29.52755905511811 0 0
29.52755905511811 0 22.62976164142344 29.52755905511811
13.77952755905512 22.62976164142344 29.52755905511811 0
22.62976164142344 0 13.77952755905512 22.62976164142344 0 0
22.62976164142344 29.52755905511811 13.77952755905512
22.62976164142344 0 13.77952755905512 0 29.52755905511811
13.77952755905512 0 0 13.77952755905512 22.62976164142344
29.52755905511811 13.77952755905512

So I am thinking it does not draw individual triangles using
GL_TRIANGLES mode.  Instead it uses
GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN mode where it is sharing vertices.
I'm not sure though.

Maybe my math is wrong, but if you share triangles the number of verts
required is verts' as this table shows.

Triangles   Verts  Verts'
1  3 3
2  6 4
3  9 5
4 126
5  157
6  18   8
 verts' = tri+2
1236   14

and 36*3 = 108 values
but 14*3 = 42 values not 72

John

On Thu, Oct 27, 2011 at 10:22 AM, J Handal  wrote:
>
> I think is error is due to an incompatible file extension .dae file,
> AFIK android use .obj files with android(and other extensions??) but
> not Collada files.
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] opengl and sketchup problem

2011-10-27 Thread John Davis
Hello J Handal,

Thanks.  I will look into your suggestion more.  In the meantime, do
you think my error is due to an incompatible tool?
I was thinking the error was in my implementation.  I am new to OpenGL
so I was suspect of my own ability to
use the results correctly.

John

On Thu, Oct 27, 2011 at 1:11 AM, J Handal  wrote:
>
> And sample code
> http://www.bayninestudios.com/2011/01/importing-3d-models-in-android/
>
> --
> 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



-- 
John F. Davis

独树一帜

-- 
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


Re: [android-developers] Renderscript vs WebGL

2011-03-13 Thread John Davis
Fair enough, where's the webgl section?

On Sun, Mar 13, 2011 at 5:38 PM, Mark Murphy wrote:

> On Sun, Mar 13, 2011 at 6:21 PM, John Davis 
> wrote:
> > I'm curious, if you don't know anything, why are you posting on Google's
> > behalf?
>
> Please understand that Google makes few "forward thinking" statements
> regarding what is in and not in future versions of Android. We all
> find out when the stuff ships. This has been the case for the better
> part of three years.
>
> If you are interested in contributing code towards whatever 3D
> solution you wish to see, there are more relevant groups on
> http://source.android.com for that.
>
> Otherwise, please sit back, relax, and wait for the future to arrive.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 3.0 Programming Books: http://commonsware.com/books
>
> --
> 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
>

-- 
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

Re: [android-developers] Renderscript vs WebGL

2011-03-13 Thread John Davis
I'm curious, if you don't know anything, why are you posting on Google's
behalf?

On Sun, Mar 13, 2011 at 4:19 PM, Dianne Hackborn wrote:

> On Sun, Mar 13, 2011 at 12:28 PM, John Davis 
>  wrote:
>
>> My perception is that WebGL support isn't even being considered on
>> Android, is this true?  Forward progress on this front has been minimal.
>>
>
> "Isn't even considered?"  I don't even know what that means.  I don't think
> WebGL is currently supported in the browser (it is a pretty new standard),
> but I doubt there has been any statement about it not ever being supported
> or something like that.  That said, I don't work on the browser, I can't say
> much about it.
>
>
>> For no touch deployment of 3D apps on Android, what should we as
>> developers expect to see in the future?  OES2.0 support in the PNaCl
>> sandbox?  A Renderscript sandbox?
>>
>
> I don't know.  Renderscript sandbox?  Are you just making stuff up? :)
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>

-- 
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

Re: [android-developers] Renderscript vs WebGL

2011-03-13 Thread John Davis
Dianne,

My perception is that WebGL support isn't even being considered on Android,
is this true?  Forward progress on this front has been minimal.

For no touch deployment of 3D apps on Android, what should we as developers
expect to see in the future?  OES2.0 support in the PNaCl sandbox?  A
Renderscript sandbox?

Does this make sense?

JD

On Sun, Mar 13, 2011 at 2:00 PM, Dianne Hackborn wrote:

> On Sun, Mar 13, 2011 at 6:17 AM, John Davis  wrote:
>
>> Anyone know the strategy for 3D on Android?  Is the primary platform going
>> to be Renderscript or WebGL?
>
>
> That question makes no sense.  Those two things have nothing to do with
> each other, except they have "GL" involved.  Also as far as Android is
> concerned, neither is a "platform" let alone "primary".
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>

-- 
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] Renderscript vs WebGL

2011-03-13 Thread John Davis
Anyone know the strategy for 3D on Android?  Is the primary platform going 
to be Renderscript or WebGL?

Also, is there a PC emulator for Honeycomb?

http://www.pcprogramming.com

JD

-- 
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] WebGL on Android

2011-03-06 Thread John Davis
Still looking for the best way to test my WebGL work on Adroid.

http://www.pcprogramming.com

-- 
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] WebGL on Android

2011-03-05 Thread John Davis
What's the best way to test WebGL on Android?  I have some demos which work 
on Chrome/FireFox, but would like to keep them up to date for Android as 
well.

http://www.pcprogramming.com

JD

-- 
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] WebGL support

2011-02-28 Thread John Davis
Are there any plans for WebGL on Android?  Or is it all going to be 
Renderscript?  What will be the best way to do no touch deployment for 3D 
games, etc. on Android?

Like the following WebGL demo on Chrome/FireFox

http://www.pcprogramming.com/flight.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@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