Monday 15 August 2011

android - Custom preference not clickable -


I have added a custom preference for your project (code below). I've added it to my favorite XML with a custom widget:

  & lt; w.PlusOnePreference Android: title = "rate application" android: key = "custom" Android: widgetLayout = "@ layout / Plusone_pref" / & Gt;   

preferred layout xml:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Comkgugl.andraidkgmskplskplusnebutton Ksmlns: android = "Actiteepi://schems.andraidkcom/apak/res/andraid" Ksmlns Plus = "Actiteepi://schems.andraidkcom/apak / Lib /com.google.android.gms.plus "android: id =" @ + id / plus_one_button "Android: layout_width =" wrap_content "Android: layout_height =" wrap_content "Android: layout_gravity =" center_vertical "android: focusable =" false " Plus: Size = "Standard" />   

I see a layout and buttons in the layout works fine. The only problem is that the preference is not clickable as if it is hidden behind something

Any ideas about making it clickable?

If I add a regular priority I (widget without layout) it works fine.

Thank you. Public Domain PlusOnePreference increases priority (Private Plus Client mPlusClient = null; Public Plus Onference (Reference Reference) {Super (Reference);} Public PlusOnePreference (Reference Reference, AttributeSet attrs) {Super , Attrs);} Public PlusOnePreference (reference references, AttributeSet attrs, int defStyle) {super (references, attrs, defStyle);} Public Zero Setplus Client (PlusClient Plus Client) {mPlusClient = plusClient;} @ Override Protected Zero Adjustment View (see View) {super OnBidview (see); // mPlusOneButton = PlusOneButton plusOneButton = view.findViewById (R.id.plus_one_button); PlusOneButton.in Start (mPlusClient, SettingsActivity.URL, SettingsPower.PLUS_ONE_REQUEST_CODE);}}

itemprop = "text">

Layout / plusone_pref.xml Set Android: focusable = "false" for your button

No comments:

Post a Comment