Discussion on:
View:
Show:
its 2:00am on a saturday night, sunday morning. before going to bed on the weekends, i check the tech republic pages for new tech updates. i especially look forward to try out each weeks tutorial from William J. Francis. he is the greatest tutorial writer i have seen for android. this latest tutorial actually woke me up from laughing throughout the page. keep up the great work!
it requires a missing jar. the source is pointing to a jar located at the editors location.
http://developer.android.com/sdk/compatibility-library.html#Downloading
in the eclipse project properties, go to JAVA BUILD PATH and click ADD EXTERNAL JAR.
http://developer.android.com/sdk/compatibility-library.html#Downloading
in the eclipse project properties, go to JAVA BUILD PATH and click ADD EXTERNAL JAR.
all i did was follow this.. http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
to test it out and learn how to add icons, i just did exactly what step 3 says to do.
jumped to step 6 in the main.java class and added..
Resources res = getResources(); // Resource object to get Drawables
then changed
ts1.setIndicator("First Tab").setContent(new Intent(this,tab1.class));
to
ts1.setIndicator("First Tab",res.getDrawable(R.drawable.ic_tab_artists)).setContent(new Intent(this,tab1.class));
all it does is add ,res.getDrawable(R.drawable.ic_tab_artists) after "First Tab". works great!
to test it out and learn how to add icons, i just did exactly what step 3 says to do.
jumped to step 6 in the main.java class and added..
Resources res = getResources(); // Resource object to get Drawables
then changed
ts1.setIndicator("First Tab").setContent(new Intent(this,tab1.class));
to
ts1.setIndicator("First Tab",res.getDrawable(R.drawable.ic_tab_artists)).setContent(new Intent(this,tab1.class));
all it does is add ,res.getDrawable(R.drawable.ic_tab_artists) after "First Tab". works great!
Sorry about that guys! Actually the compatibility library isn't really needed for this project. I just failed to start from a clean environment. Oops. Thanks @ dr_oopie though for pointing other readers to the JAR download. I will try and be more diligent when packaging up my source code downloads in the future.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle

































