0

I'm trying to implement the vertical seekbar described in this SO answer. I understand that when that answer was written, Eclipse was the standard IDE for Android development, and so it was probably trivial to follow these instructions:

To implement it, create a new class in your project, choosing the right package: Instructions

However I don't know what this translates to in Android Studio. My menu looks like this: New class sshot

As you can see, I have the option to create a new C++ class (among many other things), but not a Java class.

What do I need to do in order to make use of the vertical seekbar in Android Studio? I tried creating a new "UI Component" but that brought up a heap of skeleton code and mucked up my UI layout.

Community
  • 1
  • 1
TheIronKnuckle
  • 7,224
  • 4
  • 33
  • 56

4 Answers4

2

You have to right click on any SubPackage of main or Main to get create Java class option

JAAD
  • 12,349
  • 7
  • 36
  • 57
2

Do Following Steps

  1. Go to app->src->main->java.
  2. Right Click On Java Directory Select New->Java Class
Bajirao Shinde
  • 1,356
  • 1
  • 18
  • 26
1

You need to create the Java class in the correct directory. You need to go to ../src/main/java/your_package_name/ then you can create a new Java class.

Thomas
  • 1,123
  • 3
  • 13
  • 36
1

First of all you need to switch tab from Project to Android. On that Android File system Select ProjectName -> Java. Right click on Java and create new Java class. I think it will work for you.

You can create java class from project tab in android studio but thats some what complex file structure as compared to Android File system, so you have to switch to Android tab,On top right of Android studio. Try this...

Sreejin
  • 151
  • 7