java - Button not doing anything -


no error message in android studio. 'pick image button' not respond when clicking on it.

i have looked @ similar questions none specific issue, , did not help

xml file:

 <de.hdodenhof.circleimageview.circleimageview         android:layout_width="85dp"         android:layout_height="85dp"         android:src="@drawable/noprofileimg"         android:id="@+id/profilepic"         android:layout_marginbottom="37dp"         android:layout_alignbottom="@+id/imageview"         android:layout_centerhorizontal="true" /> <button     android:id="@+id/pick_image_button"     android:layout_width="80dp"     android:layout_height="23dp"     android:text="pick image"     android:textsize="12dp"     android:padding="0dp"     android:background="@color/gray"     android:layout_marginbottom="13dp"     android:layout_above="@+id/linearlayout"     android:layout_centerhorizontal="true"     android:onclick="onclick"     /> 

activity file,

  public class uploadprofileimg extends actionbaractivity{   private static final int pick_image = 100; private imageview imageview;  @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_profile);      imageview = (imageview) findviewbyid(r.id.profilepic);      button pickimagebutton = (button) findviewbyid(r.id.pick_image_button);     pickimagebutton.setonclicklistener(new view.onclicklistener() {         @override         public void onclick(view v) {             opengallery();         }     }); }  private void opengallery() {     intent gallery =             new intent(intent.action_pick,                     android.provider.mediastore.images.media.internal_content_uri);     startactivityforresult(gallery, pick_image); }  @override protected void onactivityresult(int requestcode, int resultcode, intent data) {     super.onactivityresult(requestcode, resultcode, data);     if (resultcode == result_ok && requestcode == pick_image) {         uri imageuri = data.getdata();         imageview.setimageuri(imageuri);     } } 

}

here logcat :

07-25 11:51:36.776 28107-28107/com.liamthedeveloper.foodiez e/boostframework: boostframework() : exception_1 = java.lang.classnotfoundexception: didn't find class "com.qualcomm.qti.performance" on path: dexpathlist[[],nativelibrarydirectories=[/system/lib64, /vendor/lib64]] 07-25 11:51:36.776 28107-28107/com.liamthedeveloper.foodiez v/boostframework: boostframework() : mperf = null 07-25 11:51:37.080 28107-28107/com.liamthedeveloper.foodiez d/viewrootimpl@435aa35[profileactivity]: viewpostimeinputstage processpointer 

remove android:onclick="onclick" button tag in xml.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -