0

How could I organize my layout folder in Android Studio? I want to add subfolders to it.

I followed this question but nothing happens when I modify my gradle file. As I see a lot of up votes I think it works, but I can't figure out how and why it doesn't work for me. I cleaned project, restart Android Studio, invalidate caches but still nothing.

Community
  • 1
  • 1
Chris
  • 6,105
  • 6
  • 38
  • 55
  • have you tried out https://github.com/dmytrodanylyk/folding-plugin – George Thomas Dec 12 '15 at 12:22
  • @GeorgeThomas It looks like a good idea but: ``Make sure your are in Project structure view, NOT Android.`` I want to simplify my work, not to see more folders and subfolders in Project structure. – Chris Dec 12 '15 at 12:28

1 Answers1

-1

It's so strange It doesn't work. Let me show you how I build my Gradle (the part where you set dependencies):

android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
    applicationId "com.app.yourapp"
    minSdkVersion 22
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true

    sourceSets {
        main {
            res.srcDirs =
                    [
                            'src/main/res/layouts/activities',
                            'src/main/res/layouts/fragments',
                            'src/main/res/layouts/content',
                            'src/main/res/layouts',
                            'src/main/res'
                    ]
        }
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}


dependencies {....

and that's It.

Hope I've been helpful.

Gaetano Dati
  • 97
  • 1
  • 12