This week's book giveaway is in the Design forum.
We're giving away four copies of Experimentation for Engineers: From A/B testing to Bayesian optimization and have David Sweet on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Values from RecyclerView in email Intent

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all. I'm quite new to Java, as you can see if you look at some of my code..lol. Last bit of my project and I'm stuck. I have a custom adapter with a recycler view. There are some text views. I also have a bottom menu with an email button and I would like to use 2 of the views (R.id.brand_name & R.id.cases_text_view) and sent them as text in an email. The whole email intent and bottom menu is working fine, but I can’t get the two values to be added to the EXTRA_TEXT part of the intent (line 51 and 52). I would really appreciate some help.

Here is the activity with the intent and bottom menu:


And here is the recyclerview (I want to use the values in line 46 and 48):

I know its probably very simple, but I just cant seem to figure it out.  
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You wish to send the values entered by user in those two fields, right?
 
Carel Venter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there. yes that is exactly what I want to do. I want to use two values in an email intent as EXTRA_TEXT. (lines 51 and 52 on the main activity). The values must come from my adapter
lines 46 and 48
The first one never changes (tvBrand), but the second one (tvCases) is being changed by the user with + and - buttons.  
Hope those are the ones I must use, on the MyViewHolder method.
After that the order must be emailed if the user clicks on the email in the bottom navigation menu.
Thank you very much for your interest so far, and you help will be appreciated.
 
Carel Venter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok so I'm trying this:

Just after line 65 in the Adapter. But I get "Cannot resolve method 'findViewbyId(int)'. So that's problem one, second I get the same message if I want to call it in the mainActivity
in the intent
So I still have a little problem to call the values from the adapter to the mainActivity into EXTRA_TEXT in the email intent.
Some help would really be appreciated. Thank you
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic