Library problems

by { Devdroid } » Sat, 31 Jul 2010 21:29:55 GMT


Sponsored Links
 Hi,

I tried to build test library and test app howver Eclipse complains on
each reference I made to library classes.
This is what I did:

1. created Test Library Android project, marked it as "Library"
(package name "test.library.lib")
2. created Test App project (package "test.library.app") and set it to
use Test Library
3. Test Library got LibActivity class which simply referes to
lib_main.xml layout
4. I defined that activity in Test App manifest file:

        <activity android:name="test.library.lib.LibActivity"
                  android:label="@string/app_name"
                  android:theme="@android:style/Theme.Dialog"
                                  >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

The problem is that Eclipse now compains "Class
test.library.lib.LibActivity" does not exists".
I also got same problem when I i.e. create a class in Test App that
refers to classes
in library. Import test.library.lib.*; does not help. SDK version is
recent. Target sdk=3 (tried
setting to 8, but made no difference)

What am I doing wrong?

--



Other Threads

1. ArrayList vs ArrayAdapter

HI,
I have a problem with implementation. I use a ArrayList<MyRecord> as
class MyRecord is:

public class MyRecord {
         Date date;
         double spotreba;
         int pocet_km;
         double cena;
         String desc;

        MyRecord(Date date, double objem, int pocet_km, double liter, String
desc){
                this.date=date;
                this.spotreba=objem;
                this.pocet_km=pocet_km;
                this.cena=liter;
                this.desc=desc;
        }

and in the ListView I have declared ListItem which looks like that:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:paddingLeft="10sp">
        <ImageView android:id="@+id/ImageView01"
                           android:layout_width="wrap_content"
                           android:layout_height="wrap_content"
                           android:src="@drawable/pump"
                           android:padding="5sp">
        </ImageView>
        <LinearLayout android:id="@+id/LinearLayout01"
                                  android:layout_height="wrap_content"
                                  android:orientation="vertical"
                                  android:paddingLeft="10sp"
                                  android:layout_width="fill_parent">
                                  <TextView android:text="@+id/TextView01"
                                                        
android:id="@+id/TextView01"
                                                        
android:layout_width="wrap_content"
                                                        
android:layout_height="wrap_content"
                                                        
android:textColor="#FF0000"
                                                        android:textSize="20sp"
                                                        android:padding="1sp">
                                  </TextView>
                                  <TextView android:text="@+id/TextView02"
                                                        
android:id="@+id/TextView02"
                                                        
android:layout_width="wrap_content"
                                                        
android:layout_height="wrap_content">
                                  </TextView>
        </LinearLayout>
</LinearLayout>

and my problem is to referenced fields double spotreba and Date date
to two TextViews in the inner LinearLayout. I understand if I had only
strings and it give to adapter. But here I don't understand how to
change my ArrayList<MyRecord> to some ArrayAdapter and show it in the
View. can you give me some advice or some tutorial page? Or can you
explain me it how should I continue?

thank you very much
Richard Smela

-- 

2. Back Button ?what it really does?

Hi i was wondering what the back button really does okay so its kinda
confusing but here is the problem?

i have 2 tabs and another page of intent  so my app acts like a music
palyer basically that once u click on the song it brings u to another
page. but on the first tab i have a seekbar thats like volume so i
adjust taht click on a song then i use intent to go to another page
which now has a volume seek bar that also is changed based off the
first tab adjustment soo i tried the

public static int vol

then on the intent pge i adjust the volume so that i changes the value

firstTab.vol = getprogress() something like this

but when i click the back button it doesnt update on the oncreate like
it should
i know the value is changed though cuz like i said i have 2 tabs so
the second tab doesnt really do anythng i just go to that tab and go
back to the first tab and then the volume on the seekbar changes?
so my main questions is why isnt the back button updating the oncreate
i know that if u did backbutton i does changes things like when u make
ur own custom  arrayAdapter u can have a change on an item when u back
button it   but like for this example wit the seekbar its not
updating???

-- 

3. can multiple activiites share an ActionBar?

4. [WTA] Map Jakarta

5. MediaRecorder to socket -?

6. WiFi Error/Unable to connect in AVD

7. Multiple SPP / RFCOMM Connections Cause Phone To Lock Up