abc32112
abc32112

Reputation: 2527

How do I import ShowcaseView in Eclipse?

ShowcaseView is contained in a Zip file here. But what exactly am I downloading and how do I import it in Eclipse?

Upvotes: 7

Views: 3034

Answers (4)

Pratik Butani
Pratik Butani

Reputation: 62419

After 2 days I succeed, I have created steps to import ShowcaseView in Eclipse that may be helpful to you.

How to use Showcase View in Eclipse.

  1. Download ShowcaseView from github and extract.

  2. Now Follow step for import.

    - Right click on Project Explorer
    - Import -> Android -> Existing Android Code Into Workspace
    - Select Extracted "ShowcaseView-master"
    - Check both project "library" and "MainActivity"
    - Check "Copy projects into workspace"
    - Finish.
    

    (After importing you can see 2 projects imported namely "main" and "SampleActivity", you may change "main" as "libShowcaseView" and "SampleActivity" as "ShowcaseViewDemo" so you can easily identify. :) )

  3. May you see error in "ShowcaseViewDemo" (Dont worry...), See src/ folder is also blank (in both "libShowcaseView" and "ShowcaseViewDemo") :) right??? Dont mind.

  4. Make following packages in "libShowcaseView" project. See Example.

    - com.github.amlcurran.showcaseview
    - com.github.amlcurran.showcaseview.targets
    

    and Move all java files from /java/com/github/amlcurran/showcaseview and /java/com/github/amlcurran/showcaseview/targets Respectively.

  5. Make following packages in "ShowcaseViewDemo" project. See Example.

    - com.github.amlcurran.showcaseview.sample
    - com.github.amlcurran.showcaseview.sample.animations
    - com.github.amlcurran.showcaseview.sample.legacy
    - com.github.amlcurran.showcaseview.sample.v14
    

    and move files as above (from java folder respectively).

  6. Now right click on "libShowcaseView" project->properties->Android->Move down and check "Is Library" then add "actionbarsherlock" as Library. See Preview

  7. Now Add as library in ShowcaseViewDemo. Goto properties of "ShowcaseViewDemo"->Android->Add->select "libShowcaseView"->Ok...

  8. I think you didn't ran into error now. You can Run.

You can ping any time for any suggestion or help.

Happy ShowcaseViewing...

Upvotes: 21

Crésus DEGUENON
Crésus DEGUENON

Reputation: 11

Do it in there steps:

  1. Download ShowcaseView from github`
  2. Create package com.github.amlcurran.schowcaseview and com.github.amlcurran.schowcaseview.targets in your eclipse project.
  3. Extract ShowcaseView-master.zip or rar.

  4. Go to library/src/main/java/ and copy com/github/amlcurran/showcaseview java files in com.github.amlcurran.schowcaseview package.

  5. Do same thing for com/github/amlcurran/showcaseview/targets in com.github.amlcurran.schowcaseview.targets.
  6. Finally, copy others files in differents folder drawables, layouts, value(copy in the old value files, style.xml for example).

Upvotes: 1

cwhsu
cwhsu

Reputation: 1523

Following ツ Pratik Butani ツ's Answer and use Android Support Library to replace ActionBarSherlock

  1. In project.properties of libShowcaseView and ShowcaseViewDemo

    • add target=android-21
  2. Right click on "libShowcaseView" Properties->Android->Library->Add... select AppCompat(android support library v7)->Ok

  3. In styles.xml of ShowcaseViewDemo

    • Change android:Theme.Holo.Light, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar to Theme.AppCompat

    • Remove <item name="android:fontFamily">sans-serif-light</item> in ListItemBigText

  4. In ActionItemsSampleActivity.java

    • change SherlockActivity to ActionBarActivity, getSupportMenuInflater to getMenuInflater.
  5. In MultipleActionItemsSampleActivity.java

    • change SherlockActivity to ActionBarActivity
    • change com.actionbarsherlock.app.ActionBar.OnNavigationListener to android.support.v7.app.ActionBar.OnNavigationListener
    • changegetSupportMenuInflater to getMenuInflater

Upvotes: 1

ARUN SURESH BABU
ARUN SURESH BABU

Reputation: 46

Easiest way is:

  1. Create an empty Android Application project in your Eclipse workspace.
  2. Copy files in ShowcaseView/library/ folder of github to your new project base folder.
  3. Refresh project in Eclipse.
  4. Goto project properties - Android and select "Is Library"
  5. Clean unnecessary stuff and build.

It should be ready to add as dependency of your app.

Alternatively you can pick another library project .project file and copy it inside this library folder, edit it to match your new project name, etc... And then import in Eclipse. But this is more hardcore if you don't know what you're doing. Soure : How do I build these libraries from GitHub

Upvotes: 3

Related Questions