java - Setting up android view library in project -
i trying use gauge view github in new project of mine.
sample application given library works perfect !
but when try include library new project (properties > buildpath > projects > (add library project)), put view in layout , try reference view in code throws classnotfoundexception
the following layout:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".mainactivity" > <org.codeandmagic.android.gauge.gaugeview android:id="@+id/gauge_view1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> </linearlayout>
this activity:
package com.example.guagetest; import org.codeandmagic.android.gauge.gaugeview; import android.os.bundle; import android.app.activity; import android.view.menu; public class mainactivity extends activity { private gaugeview gauge; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); gauge = (gaugeview) findviewbyid(r.id.gauge_view1); gauge.settargetvalue(10); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.activity_main, menu); return true; } }
can please tell me how import , use view in new project.
i've been trying more 4 hours set new project way setup in sample project on github page. have no luck.
someone please help.
Comments
Post a Comment