java - Eclipse can't find extended View class -


i'm trying implement custom facebook login button: it'll same, save fact it'll have functionality after user has logged in; don't wish change it's style or pertaining how looks/feels.

the button needs called explicitly in xml file:

<com.facebook.widget.loginbutton         android:id="@+id/login_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="center_horizontal"         android:layout_margintop="30dp"         android:layout_marginbottom="30dp" /> 

i extended loginbutton class , added single method (where want functionality occur):

public class customfbbutton extends loginbutton{      public customfbbutton (context context, attributeset attrs) {         super(context, attrs);     }      public void enablepublishactions(final activity activity) {                  //extra functionality     } } 

now, understanding, should call button follows(and i'm doing this):

<com.company.helpers.facebookclass.customfbbutton         android:id="@+id/login_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="center_horizontal"         android:layout_margintop="30dp"         android:layout_marginbottom="30dp" /> 

com.company.helpers package facebookclass located in. customfbbutton subclass within facebookclass.

am calling right? apparently, eclipse can't find class: appears looking class in package.

04-24 16:11:00.899: e/androidruntime(28004): fatal exception: main 04-24 16:11:00.899: e/androidruntime(28004): java.lang.runtimeexception: unable start activity componentinfo{com.company.product.main/com.company.product.settings.settings}: android.view.inflateexception: binary xml file line #30: error inflating class com.company.helpers.facebookclass.customfbbutton 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2305) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread.handlelaunchactivity(activitythread.java:2359) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread.access$700(activitythread.java:165) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread$h.handlemessage(activitythread.java:1326) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.os.handler.dispatchmessage(handler.java:99) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.os.looper.loop(looper.java:137) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread.main(activitythread.java:5455) 04-24 16:11:00.899: e/androidruntime(28004):    @ java.lang.reflect.method.invokenative(native method) 04-24 16:11:00.899: e/androidruntime(28004):    @ java.lang.reflect.method.invoke(method.java:525) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1187) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.android.internal.os.zygoteinit.main(zygoteinit.java:1003) 04-24 16:11:00.899: e/androidruntime(28004):    @ dalvik.system.nativestart.main(native method) 04-24 16:11:00.899: e/androidruntime(28004): caused by: android.view.inflateexception: binary xml file line #30: error inflating class com.company.helpers.facebookclass.customfbbutton 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:713) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.rinflate(layoutinflater.java:761) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.rinflate(layoutinflater.java:769) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.inflate(layoutinflater.java:498) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.inflate(layoutinflater.java:398) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.inflate(layoutinflater.java:354) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:361) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.actionbarsherlock.internal.actionbarsherlocknative.setcontentview(actionbarsherlocknative.java:133) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.actionbarsherlock.app.sherlockactivity.setcontentview(sherlockactivity.java:229) 04-24 16:11:00.899: e/androidruntime(28004):    @ com.company.product.settings.settings.oncreate(settings.java:34) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activity.performcreate(activity.java:5372) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1104) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2267) 04-24 16:11:00.899: e/androidruntime(28004):    ... 11 more 04-24 16:11:00.899: e/androidruntime(28004): caused by: java.lang.classnotfoundexception: didn't find class "com.company.helpers.facebookclass.customfbbutton" on path: /data/app/com.company.product.main-2.apk 04-24 16:11:00.899: e/androidruntime(28004):    @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:64) 04-24 16:11:00.899: e/androidruntime(28004):    @ java.lang.classloader.loadclass(classloader.java:501) 04-24 16:11:00.899: e/androidruntime(28004):    @ java.lang.classloader.loadclass(classloader.java:461) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.createview(layoutinflater.java:565) 04-24 16:11:00.899: e/androidruntime(28004):    @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:702) 


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -