• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Values from RecyclerView in email Intent  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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. 
 
Rancher
Posts: 1896
15
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!