android edittext - setContentView in a fragment -


i tried use setcontentview in fragment. not possible. know why? , how can fix problem?

my destination open new view, if login right. hope u understand mean.

package de.ibers.coffeelist;         if (isvalid) {             button buttonlogin = (button)rootview.findviewbyid(r.id.btn_login);             buttonlogin.setonclicklistener(new view.onclicklistener() {                 public void onclick(view v) {                     edittext pinedit = (edittext) getview().findviewbyid(r.id.et_pin);                     string inputpin = pinedit.gettext().tostring();                      if(inputpin.equals(_pin)) {                            setcontentview(r.layout.buyview);                             }                      else {                         log.d("buttonlogin ", "faild");                     }                 }             }); 

override oncreateview method in fragment.

@override public view oncreateview(layoutinflater inflater, viewgroup container,         bundle savedinstancestate) {     view v = inflater.inflate(r.layout.buyview, container, false); } 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -