Skip to content
This repository has been archived by the owner on Apr 27, 2019. It is now read-only.

How to import into Android Studio #35

Closed
khalid-hussain opened this issue Oct 26, 2014 · 4 comments
Closed

How to import into Android Studio #35

khalid-hussain opened this issue Oct 26, 2014 · 4 comments

Comments

@khalid-hussain
Copy link

Hi there,

I need some help in importing these classes into Android Studio. I know how to do it with Eclipse but Android Studio seems to be a different story. I've read this: http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio

But it didn't seem to help as the project consists of only 2 java classes. Can someone help me out?

Thanks for your time.

@mathew-kurian
Copy link
Owner

@khalid-hussain Make a "HelloWorld App" and just drag the files into the main directory. If you can wait for another day, I will push in a Android Studio project complete with samples.

@khalid-hussain
Copy link
Author

Okay I got it. Thanks a lot for the help.

For others:
Put the .java files from the library into the main folder under the java folder. In my case the files needed to be put in :

app/src/main/java/com.example.HelloWorld/

And then in the layout file, instead of :

<com.textjustify.TextViewEx
        android:id="@+id/textview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

Use:

<com.example.HelloWorld.TextViewEx
        android:id="@+id/textview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

Change the details according to your project.

@mathew-kurian
Copy link
Owner

@khalid-hussain If you want, you can check out the experimental version which has more features. More details on the README.md. It has a sample application you can build on Android Studio.

@khalid-hussain
Copy link
Author

Thanks for the heads up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants