Android layout packaging

I have android project where I am using lots of layout as common resources in other activity layouts. for example, I have a layout for headers , which I include in 4 activity layouts for visual consistency. Since I have lots of common layouts created, my layout folder is very cluttered. I was looking for a way to package them separately. What I wanted to do is to create another sub-folder inside the layout folder and put all the shared resources there like :

under res folder

layout(folder)
  --activity_home.xml
  --other_activity.xml

  --common ( folder)
    --header_layout.xml
    --other_shared_layouts.xml

From this link in SO, I found that its not supported in android which was answered 4 years ago. It mentions that, gradle can resolve this issue by proper mergings, but I would prefer other options if there are any. I was wondering if there are any other ways to handle this scenario? I am just trying to organize the layouts file so that they don't clutter in one folder. Is gradle the ONLY way to go ?

This is my SDK details if that matters .

<uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="21" />

Thanks in advance for any kind of input.

Answers


This is still unsupported. Android studio's Android scoping looks slightly better.


Need Your Help

Assign Priority for Callable type threads

java multithreading threadpool runnable callable

I am working on Threads task, which required to assign priorities for callable threads.

GWT :FlexTable widget counts in a row

gwt gwt2

Can anyone guide me to calculate counts of widget in a FlexTable's specific row ? I can get row counts by table.getRowCount(); but I have no idea for counts of element or widgets in a specific row....

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.