Thanks. This worked for my own use: LayoutInflater.from(context).inflate(R.layout.number_picker, this, true);
And now it works. clark wrote: > If you follow the inheritance back from NumberPicker.java, which > extends LinearLayout, which extends ViewGroup, which extends View, you > will find mContext defined. Gotta follow the paper trail a bit. :) > > > -L!TH- > > On Dec 18, 3:41 pm, Brian Conrad <[email protected]> wrote: > >> This mContext is not declared nor initialized in the NumberPicker.java >> source. Is it a global and if so how would you initialize when using >> this code on your own? If you use the context that is passed it won't >> work. I must be missing something here. >> >> mInflater = (LayoutInflater) >> mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); >> >> - Brian >> >> >> >> Hong wrote: >> >>> Sorry search: NumberPicker.java ;) >>> >>> On Thu, Dec 17, 2009 at 8:47 PM, Hong <[email protected]> wrote: >>> >>>> Search "NumberPicker" in Google, the first link: >>>> >>>> http://www.netmite.com/android/mydroid/cupcake/frameworks/base/core/j... >>>> >>> -- >>> >>> You received this message because you are subscribed to the Google Groups >>> "Android Discuss" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group >>> athttp://groups.google.com/group/android-discuss?hl=en.- Hide quoted text - >>> >> - Show quoted text - >> > > -- > > You received this message because you are subscribed to the Google Groups > "Android Discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/android-discuss?hl=en. > > > > -- You received this message because you are subscribed to the Google Groups "Android Discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en.
