diff --git a/.idea/copyright/Akash_Yadav.xml b/.idea/copyright/Akash_Yadav.xml
new file mode 100644
index 000000000..33351c8ad
--- /dev/null
+++ b/.idea/copyright/Akash_Yadav.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 000000000..476a3e706
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 2a4d5b521..51e88be32 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,5 +1,14 @@
+
+
+
diff --git a/app/src/main/java/com/itsaky/androidide/project/ProjectResourceFinder.java b/app/src/main/java/com/itsaky/androidide/project/ProjectResourceFinder.java
index b82bb22b9..b522ef55b 100644
--- a/app/src/main/java/com/itsaky/androidide/project/ProjectResourceFinder.java
+++ b/app/src/main/java/com/itsaky/androidide/project/ProjectResourceFinder.java
@@ -58,7 +58,7 @@ public class ProjectResourceFinder implements IResourceFinder {
}
@Override
- public Object[] findArray(String name) {
+ public String[] findArray(String name) {
return null;
}
diff --git a/app/src/main/res/layout/layout_create_project.xml b/app/src/main/res/layout/layout_create_project.xml
index b76fa5f6f..144f9a000 100644
--- a/app/src/main/res/layout/layout_create_project.xml
+++ b/app/src/main/res/layout/layout_create_project.xml
@@ -1,48 +1,55 @@
-
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="16dp"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:srcCompat="@drawable/ic_close" />
+ android:textStyle="bold"
+ app:layout_constraintTop_toBottomOf="@id/createproject_close"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/createproject_close" />
-
+
-
+ layout="@layout/layout_create_project_content">
+
+
-
+
diff --git a/app/src/main/res/layout/layout_create_project_content.xml b/app/src/main/res/layout/layout_create_project_content.xml
index 8847274db..5feffc11e 100644
--- a/app/src/main/res/layout/layout_create_project_content.xml
+++ b/app/src/main/res/layout/layout_create_project_content.xml
@@ -1,203 +1,223 @@
-
+ android:paddingStart="8dp"
+ android:paddingEnd="8dp">
+ app:startIconTint="@color/primaryIconColor">
+ android:layout_height="wrap_content"
+ android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
+ android:singleLine="true" />
+ app:startIconTint="@color/primaryIconColor">
+ android:layout_height="wrap_content"
+ android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890."
+ android:singleLine="true" />
+ app:counterMaxLength="2"
+ app:layout_constraintBottom_toTopOf="@+id/createproject_textTargetSdk"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/createproject_textPackageName"
+ app:startIconDrawable="@drawable/ic_min_sdk"
+ app:startIconTint="@color/primaryIconColor">
+ android:inputType="number"
+ android:singleLine="true" />
+ app:counterMaxLength="2"
+ app:layout_constraintBottom_toTopOf="@+id/createproject_templateImage"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/createproject_textMinSdk"
+ app:startIconDrawable="@drawable/ic_target_sdk"
+ app:startIconTint="@color/primaryIconColor">
+ android:inputType="number"
+ android:singleLine="true" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_marginStart="48dp"
+ android:layout_marginEnd="62dp"
+ android:layout_marginBottom="8dp"
+ android:singleLine="true"
+ android:text="@string/template_empty"
+ android:textColor="@color/secondaryColor"
+ android:textStyle="bold"
+ app:layout_constraintBottom_toTopOf="@+id/createproject_templateDescription"
+ app:layout_constraintEnd_toStartOf="@+id/createproject_templateImage"
+ app:layout_constraintStart_toStartOf="parent" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/IAttribute.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/IAttribute.java
index 36ed2dcef..6db34f778 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/IAttribute.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/IAttribute.java
@@ -41,7 +41,7 @@ public interface IAttribute {
@NonNull
String getAttributeName ();
- @Nullable
+ @NonNull
String getValue ();
@NonNull
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/IResourceFinder.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/IResourceFinder.java
index cea008ee9..4e699187d 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/IResourceFinder.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/IResourceFinder.java
@@ -64,7 +64,7 @@ public interface IResourceFinder {
* @param name The name of the resource
* @return Value of the resource
*/
- Object[] findArray (String name);
+ String[] findArray (String name);
/**
* Find the dimension value with the given name.
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSeekBarAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSeekBarAttrAdapter.java
index d40410a0a..e41690e81 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSeekBarAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSeekBarAttrAdapter.java
@@ -1,3 +1,20 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSpinnerAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSpinnerAttrAdapter.java
new file mode 100644
index 000000000..e1b4b8bda
--- /dev/null
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AbsSpinnerAttrAdapter.java
@@ -0,0 +1,66 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
+package com.itsaky.layoutinflater.adapters.android.widget;
+
+import android.view.View;
+import android.widget.AbsSpinner;
+import android.widget.ArrayAdapter;
+import android.widget.SimpleAdapter;
+
+import com.itsaky.layoutinflater.IAttribute;
+import com.itsaky.layoutinflater.IResourceFinder;
+
+public class AbsSpinnerAttrAdapter extends AdapterViewAttrAdapter {
+
+ @Override
+ public boolean isApplicableTo(View view) {
+ return view instanceof AbsSpinner;
+ }
+
+ @Override
+ public boolean apply(IAttribute attribute, View view, IResourceFinder resFinder) {
+ final var spinner = (AbsSpinner) view;
+ final var context = spinner.getContext();
+ final var namespace = attribute.getNamespace();
+ final var name = attribute.getAttributeName();
+ final var value = attribute.getValue();
+
+ boolean handled = true;
+
+ if (!canHandleNamespace(namespace)) {
+ return false;
+ }
+
+ switch (name) {
+ case "entries" :
+ final var adapter = newSimpleAdapter(context, resFinder.findArray(value));
+ adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+ spinner.setAdapter(adapter);
+ break;
+ default:
+ handled = false;
+ break;
+ }
+
+ if (!handled){
+ handled = super.apply(attribute, view, resFinder);
+ }
+
+ return handled;
+ }
+}
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AdapterViewAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AdapterViewAttrAdapter.java
new file mode 100644
index 000000000..2c8945219
--- /dev/null
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/AdapterViewAttrAdapter.java
@@ -0,0 +1,63 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
+package com.itsaky.layoutinflater.adapters.android.widget;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+
+import com.itsaky.layoutinflater.IAttribute;
+import com.itsaky.layoutinflater.IResourceFinder;
+import com.itsaky.layoutinflater.adapters.android.view.ViewGroupAttrAdapter;
+
+/**
+ * Adapter for handling attributes related to
+ * AdapterView.
+ *
+ * @author Akash Yadav
+ */
+public abstract class AdapterViewAttrAdapter extends ViewGroupAttrAdapter {
+
+ @Override
+ public boolean isApplicableTo(View view) {
+ return view instanceof AdapterView;
+ }
+
+ @Override
+ public boolean apply(IAttribute attribute, View view, IResourceFinder resFinder) {
+ // No special attributes for AdapterView
+ return super.apply(attribute, view, resFinder);
+ }
+
+ protected ArrayAdapter newSimpleAdapter (Context ctx) {
+ return newSimpleAdapter(ctx, newAdapterItems(4));
+ }
+
+ protected ArrayAdapter newSimpleAdapter (Context ctx, String[] items) {
+ return new ArrayAdapter(ctx, android.R.layout.simple_list_item_1, items);
+ }
+
+ protected String[] newAdapterItems (int size) {
+ final var items = new String [size];
+ for (var i = 0;i.
+/*
+ * This file is part of AndroidIDE.
*
-**************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckBoxAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckBoxAttrAdapter.java
index b7e391d88..0daac65f1 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckBoxAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckBoxAttrAdapter.java
@@ -1,20 +1,19 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckedTextViewAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckedTextViewAttrAdapter.java
index 2e8258136..0bb0f0a9a 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckedTextViewAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CheckedTextViewAttrAdapter.java
@@ -1,20 +1,19 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CompondButtonAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CompondButtonAttrAdapter.java
index 663a16788..33ef12c1e 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CompondButtonAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/CompondButtonAttrAdapter.java
@@ -1,20 +1,3 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
- *
- **************************************************************************************/
package com.itsaky.layoutinflater.adapters.android.widget;
import android.content.Context;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/EditTextAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/EditTextAttrAdapter.java
index 3240386d7..3efb688f6 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/EditTextAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/EditTextAttrAdapter.java
@@ -1,20 +1,20 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageButtonAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageButtonAttrAdapter.java
index 85bf88121..59f89216d 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageButtonAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageButtonAttrAdapter.java
@@ -1,20 +1,19 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageViewAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageViewAttrAdapter.java
index df0e738ff..013cefb52 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageViewAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ImageViewAttrAdapter.java
@@ -1,20 +1,20 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.content.Context;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/LinearLayoutAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/LinearLayoutAttrAdapter.java
index dc181173a..7d7212221 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/LinearLayoutAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/LinearLayoutAttrAdapter.java
@@ -1,20 +1,19 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
+/*
+ * This file is part of AndroidIDE.
*
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
-**************************************************************************************/
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ProgressBarAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ProgressBarAttrAdapter.java
index 9c8c12802..14922e0be 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ProgressBarAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/ProgressBarAttrAdapter.java
@@ -1,20 +1,20 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.content.Context;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RadioButtonAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RadioButtonAttrAdapter.java
index 7997ae2dc..079578299 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RadioButtonAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RadioButtonAttrAdapter.java
@@ -1,3 +1,20 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RelativeLayoutAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RelativeLayoutAttrAdapter.java
index e1f634013..1e35c39f2 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RelativeLayoutAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/RelativeLayoutAttrAdapter.java
@@ -1,20 +1,19 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
- **************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SeekBarAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SeekBarAttrAdapter.java
index 76c5ca8a9..738e4b7b0 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SeekBarAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SeekBarAttrAdapter.java
@@ -1,3 +1,20 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.view.View;
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SpinnerAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SpinnerAttrAdapter.java
new file mode 100644
index 000000000..c794b6fe7
--- /dev/null
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/SpinnerAttrAdapter.java
@@ -0,0 +1,81 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
+package com.itsaky.layoutinflater.adapters.android.widget;
+
+import android.view.View;
+import android.widget.Spinner;
+
+import com.itsaky.layoutinflater.IAttribute;
+import com.itsaky.layoutinflater.IResourceFinder;
+
+/**
+ * Attribute adapter for handling attributes related to
+ * Spinner.
+ *
+ * @author Akash Yadav
+ */
+public class SpinnerAttrAdapter extends AbsSpinnerAttrAdapter {
+
+ @Override
+ public boolean isApplicableTo(View view) {
+ return view instanceof Spinner;
+ }
+
+ @Override
+ public boolean apply(IAttribute attribute, View view, IResourceFinder resFinder) {
+ final var spinner = (Spinner) view;
+ final var context = spinner.getContext();
+ final var dm = context.getResources().getDisplayMetrics();
+ final var namespace = attribute.getNamespace();
+ final var name = attribute.getAttributeName();
+ final var value = attribute.getValue();
+
+ if (!canHandleNamespace(namespace)) {
+ return false;
+ }
+
+ boolean handled = true;
+
+ switch (name) {
+ case "dropDownHorizontalOffset":
+ spinner.setDropDownHorizontalOffset(parseDimension(value, 0, dm, resFinder));
+ break;
+ case "dropDownVerticalOffset":
+ spinner.setDropDownVerticalOffset(parseDimension(value, 0, dm, resFinder));
+ break;
+ case "dropDownWidth":
+ spinner.setDropDownWidth(parseDimension(value, 0, dm, resFinder));
+ break;
+ case "gravity" :
+ spinner.setGravity(parseGravity(value));
+ break;
+ case "popupBackground" :
+ spinner.setPopupBackgroundDrawable(parseDrawable(value, resFinder, context));
+ break;
+ default:
+ handled = false;
+ break;
+ }
+
+ if (!handled) {
+ handled = super.apply(attribute, view, resFinder);
+ }
+
+ return handled;
+ }
+}
diff --git a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/TextViewAttrAdapter.java b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/TextViewAttrAdapter.java
index f995baa93..620f3aed6 100644
--- a/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/TextViewAttrAdapter.java
+++ b/layout-inflater/src/main/java/com/itsaky/layoutinflater/adapters/android/widget/TextViewAttrAdapter.java
@@ -1,20 +1,20 @@
-/************************************************************************************
- * This file is part of AndroidIDE.
- *
- * AndroidIDE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AndroidIDE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AndroidIDE. If not, see .
+/*
+ * This file is part of AndroidIDE.
*
-**************************************************************************************/
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see .
+ */
+
package com.itsaky.layoutinflater.adapters.android.widget;
import android.content.Context;