How would I add a Google Plus One button to my Android live wallpapers settings like the following?
-
How your setting are implemented? Do You know about this possibilities http://youtu.be/49pWckcaZEI?t=25m38s ? – sandrstar Jul 26 '13 at 09:38
-
Yes, I have seen that video but it doesn't work the way they suggest in that video. Thank you though. – Steve C. Jul 27 '13 at 02:36
-
At which exact point it doesn't work as described on the video? – sandrstar Jul 27 '13 at 03:05
1 Answers
Well here is how I would do it, I haven't tested it just searched over Google.
You will have to use the Google Plus API, here you can see how to add
+1
button to a layout in the accepted answer.Now you know how to add
+1
button, to add this to your preference screen you have to create aPreference
item with a custom layout which is explained here. In this custom layout you put the previously created layout with the+1
button and then you add it to your Preference List.Now you have a
Preference
item with a custom layout with a+1
button, just add anonClickListener
to thePreference
item with the+1
button and using Google Plus API do whatever you want when user clicks it!
Another way is to add Google Plus icon to the preference:
Create a
Preference
item and add Google Plus icon to it as described here.Add an
onClickListener
to thePreference
item and using Google Plus API do whatever you want when user clicks it.
Hope this can help you! Sorry for my bad English!
-
I'm having trouble adding my code, too much to indent, but I would like to show it to you so you can see where I am stuck. I have a custom preference that someone shared with me, unfortunately it has an import that no longer exists. I am using the most recent Google Play Services API. The import is import com.google.android.gms.plus.b; ".b" no longer exists and I can't figure out what it was or is now. My email is steve.curtis.jr@gmail.com if you can email me I can send you my code. – Steve C. Jul 27 '13 at 03:59