1

How would I add a Google Plus One button to my Android live wallpapers settings like the following?

Plus One button in settings

Steve C.
  • 1,333
  • 3
  • 19
  • 50

1 Answers1

2

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 a Preference 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 an onClickListener to the Preference 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 the Preference item and using Google Plus API do whatever you want when user clicks it.

Hope this can help you! Sorry for my bad English!

Community
  • 1
  • 1
Andres
  • 6,080
  • 13
  • 60
  • 110
  • 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