mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Added widgets list to UI designer
This commit is contained in:
Generated
-16
@@ -9,22 +9,6 @@
|
||||
</processorPath>
|
||||
<module name="AndroidIDE.build-tools.google-java-format.main" />
|
||||
</profile>
|
||||
<profile name="Gradle Imported" enabled="true">
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.auto.service/auto-service/1.0.1/c9779f7372192a96c957a3df1faeeabd07881085/auto-service-1.0.1.jar" />
|
||||
<entry name="$PROJECT_DIR$/build-tools/framework-stubs/build/libs/framework-stubs.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.auto.service/auto-service-annotations/1.0.1/ac86dacc0eb9285ea9d42eee6aad8629ca3a7432/auto-service-annotations-1.0.1.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/1.2/ca270191fd7d2a7297da7c8f29184206df10c67d/auto-common-1.2.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/31.0.1-jre/119ea2b2bc205b138974d351777b20f02b92704b/guava-31.0.1-jre.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/3.12.0/d5692f0526415fcc6de94bb5bfbd3afd9dd3b3e5/checker-qual-3.12.0.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.7.1/458d9042f7aa6fa9a634df902b37f544e15aacac/error_prone_annotations-2.7.1.jar" />
|
||||
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.3/ba035118bc8bac37d7eff77700720999acd9986d/j2objc-annotations-1.3.jar" />
|
||||
</processorPath>
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="1.8">
|
||||
<module name="AndroidIDE.annotation-processors-java" target="11" />
|
||||
|
||||
Binary file not shown.
@@ -20,11 +20,12 @@
|
||||
package com.itsaky.androidide;
|
||||
|
||||
import static com.blankj.utilcode.util.IntentUtils.getShareTextIntent;
|
||||
import static com.itsaky.androidide.R.color;
|
||||
import static com.itsaky.androidide.R.drawable;
|
||||
import static com.itsaky.androidide.R.string;
|
||||
import static com.itsaky.androidide.preferences.internal.GeneralPreferencesKt.NO_OPENED_PROJECT;
|
||||
import static com.itsaky.androidide.preferences.internal.GeneralPreferencesKt.setLastOpenedProject;
|
||||
import static com.itsaky.androidide.R.*;
|
||||
import static com.itsaky.toaster.ToastUtilsKt.toast;
|
||||
import static com.itsaky.toaster.ToastUtilsKt.toastInfo;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ComponentName;
|
||||
@@ -108,6 +109,7 @@ import com.itsaky.androidide.projects.builder.BuildService;
|
||||
import com.itsaky.androidide.services.GradleBuildService;
|
||||
import com.itsaky.androidide.services.LogReceiver;
|
||||
import com.itsaky.androidide.shell.ShellServer;
|
||||
import com.itsaky.androidide.uidesigner.UIDesignerActivity;
|
||||
import com.itsaky.androidide.utils.DialogUtils;
|
||||
import com.itsaky.androidide.utils.EditorActivityActions;
|
||||
import com.itsaky.androidide.utils.ILogger;
|
||||
@@ -704,8 +706,8 @@ public class EditorActivity extends IDEActivity
|
||||
}
|
||||
|
||||
public void previewLayout() {
|
||||
toastInfo(R.string.msg_feature_unimplemented);
|
||||
// startActivity(new Intent(this, UIDesignerActivity.class));
|
||||
// toastInfo(R.string.msg_feature_unimplemented);
|
||||
startActivity(new Intent(this, UIDesignerActivity.class));
|
||||
}
|
||||
|
||||
public boolean saveAll(boolean notify) {
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.itsaky.androidide.resources.R;
|
||||
|
||||
/**
|
||||
* A container used in UI Designer. This view holds the views inflated from an XML layout. When
|
||||
* there are no children in this layout, it shows a message.
|
||||
*
|
||||
* @author Akash Yadav
|
||||
*/
|
||||
public class DesignerLayoutContainer extends LinearLayout {
|
||||
|
||||
private final TextView mMessage;
|
||||
|
||||
public DesignerLayoutContainer(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public DesignerLayoutContainer(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public DesignerLayoutContainer(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
public DesignerLayoutContainer(
|
||||
Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
this.mMessage = new TextView(context);
|
||||
this.mMessage.setText(context.getString(R.string.msg_empty_ui_layout));
|
||||
this.mMessage.setLayoutParams(
|
||||
new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
this.mMessage.setGravity(Gravity.CENTER);
|
||||
this.mMessage.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewAdded(View child) {
|
||||
if (child != this.mMessage) {
|
||||
removeView(this.mMessage);
|
||||
} else {
|
||||
super.onViewAdded(child);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRemoved(View child) {
|
||||
if (child != this.mMessage && getChildCount() <= 0) {
|
||||
addView(mMessage);
|
||||
} else {
|
||||
super.onViewRemoved(child);
|
||||
}
|
||||
}
|
||||
|
||||
// This is needed by XMLLayoutInflater
|
||||
@Override
|
||||
protected LayoutParams generateDefaultLayoutParams() {
|
||||
return super.generateDefaultLayoutParams();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M5.251,6.385L2.714,6.385l-0.53,1.525L1,7.91l2.474,-6.55h1.022l2.478,6.55L5.787,7.91L5.25,6.385zM3.033,5.467h1.899l-0.95,-2.717 -0.949,2.717zM11.883,5.526c0,0.755 -0.17,1.357 -0.507,1.804 -0.337,0.447 -0.801,0.67 -1.392,0.67 -0.57,0 -1.014,-0.205 -1.332,-0.616l-0.054,0.526h-0.99L7.608,1h1.094v2.51c0.315,-0.372 0.74,-0.558 1.273,-0.558 0.594,0 1.06,0.22 1.399,0.662 0.339,0.44 0.508,1.057 0.508,1.849v0.063zM10.789,5.431c0,-0.528 -0.093,-0.924 -0.279,-1.187 -0.186,-0.264 -0.456,-0.396 -0.81,-0.396 -0.473,0 -0.806,0.207 -0.998,0.62v2.007c0.195,0.423 0.53,0.634 1.008,0.634 0.341,0 0.605,-0.127 0.791,-0.382 0.186,-0.255 0.282,-0.64 0.288,-1.156v-0.14zM14.323,8L15.5,9.164l-6.295,6.225L6,12.219l1.177,-1.163 2.028,2.005z"/>
|
||||
</vector>
|
||||
Executable → Regular
+20
-9
@@ -1,10 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M22,9v6c0,1.1 -0.9,2 -2,2h-1l0,-2h1V9H4v6h6v2H4c-1.1,0 -2,-0.9 -2,-2V9c0,-1.1 0.9,-2 2,-2h16C21.1,7 22,7.9 22,9zM14.5,19l1.09,-2.41L18,15.5l-2.41,-1.09L14.5,12l-1.09,2.41L11,15.5l2.41,1.09L14.5,19zM17,14l0.62,-1.38L19,12l-1.38,-0.62L17,10l-0.62,1.38L15,12l1.38,0.62L17,14zM14.5,19l1.09,-2.41L18,15.5l-2.41,-1.09L14.5,12l-1.09,2.41L11,15.5l2.41,1.09L14.5,19zM17,14l0.62,-1.38L19,12l-1.38,-0.62L17,10l-0.62,1.38L15,12l1.38,0.62L17,14z" />
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M3,3L13,3A2,2 0,0 1,15 5L15,11A2,2 0,0 1,13 13L3,13A2,2 0,0 1,1 11L1,5A2,2 0,0 1,3 3z"/>
|
||||
</vector>
|
||||
|
||||
Executable → Regular
+20
-9
@@ -1,10 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z" />
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M12.839,3l1.746,1.747 -9.243,9.243L1,9.648 2.748,7.9l2.595,2.595z"/>
|
||||
</vector>
|
||||
|
||||
Executable → Regular
+3
-9
@@ -1,10 +1,4 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12.45,16h2.09L9.43,3L7.57,3L2.46,16h2.09l1.12,-3h5.64l1.14,3zM6.43,11L8.5,5.48 10.57,11L6.43,11zM21.59,11.59l-8.09,8.09L9.83,16l-1.41,1.41 5.09,5.09L23,13l-1.41,-1.41z" />
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M13.323,7L14.5,8.164l-6.295,6.225L5,11.219l1.177,-1.163 2.028,2.005zM5.981,6.754H3.008L2.386,8.5H1L3.9,1h1.196L8,8.5H6.608l-0.627,-1.746zM3.383,5.703h2.224L4.495,2.592 3.383,5.703z"/>
|
||||
</vector>
|
||||
|
||||
Executable → Regular
+21
-10
@@ -1,10 +1,21 @@
|
||||
<!-- drawable/form_textbox.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M17,7H22V17H17V19A1,1 0 0,0 18,20H20V22H17.5C16.95,22 16,21.55 16,21C16,21.55 15.05,22 14.5,22H12V20H14A1,1 0 0,0 15,19V5A1,1 0 0,0 14,4H12V2H14.5C15.05,2 16,2.45 16,3C16,2.45 16.95,2 17.5,2H20V4H18A1,1 0 0,0 17,5V7M2,7H13V9H4V15H13V17H2V7M20,15V9H17V15H20Z" />
|
||||
</vector>
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,12h14v2L1,14zM5.614,7.845L2.86,7.845L2.284,9.5L1,9.5l2.686,-7.11h1.108l2.69,7.11L6.195,9.5l-0.58,-1.655zM3.207,6.849h2.06l-1.03,-2.95 -1.03,2.95zM12.812,6.912c0,0.82 -0.184,1.473 -0.55,1.958 -0.366,0.485 -0.87,0.728 -1.511,0.728 -0.619,0 -1.1,-0.223 -1.445,-0.67l-0.059,0.572L8.173,9.5L8.173,2h1.186v2.725c0.342,-0.404 0.803,-0.606 1.382,-0.606 0.645,0 1.15,0.24 1.519,0.718 0.368,0.478 0.552,1.147 0.552,2.007v0.068zM11.625,6.81c0,-0.573 -0.1,-1.003 -0.303,-1.29 -0.202,-0.286 -0.495,-0.43 -0.879,-0.43 -0.514,0 -0.875,0.225 -1.084,0.675v2.177c0.212,0.46 0.577,0.689 1.094,0.689 0.371,0 0.658,-0.138 0.86,-0.415 0.201,-0.277 0.305,-0.695 0.312,-1.255L11.625,6.81z"/>
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M5,6h6v4H5z"
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M3,12h10V4H3v8zM1,2h14v12H1V2z"
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,4 @@
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,4h4v4H1zM1,9h4v4H1zM6,4h4v4H6zM6,9h4v4H6zM11,4h4v4h-4zM11,9h4v4h-4z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,3.91C1,3.454 1.5,3 2,3h12c0.5,0 1,0.455 1,0.91v8.18c0,0.455 -0.5,0.91 -1,0.91H2c-0.5,0 -1,-0.455 -1,-0.91V3.91zM7,10v2h7v-2H7z"/>
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,5c0,-1.105 0.897,-2 2.006,-2h9.988C14.102,3 15,3.887 15,5v6c0,1.105 -0.897,2 -2.006,2L3.006,13A1.998,1.998 0,0 1,1 11L1,5zM5.5,8L3,11h10L9.786,7l-2.5,3.007L5.5,8z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,3c0,-0.5 0.5,-1 1,-1h12c0.5,0 1,0.5 1,1v10c0,0.5 -0.5,1 -1,1L2.025,14C1.5,14 1,13.5 1,13L1,3zM5,7.5L2,12h12l-3.857,-6 -3,4.51L5,7.5z"/>
|
||||
</vector>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M50.28,451.72c0,5.52 4.48,10 10,10h391.44c5.52,0 10,-4.48 10,-10V60.28c0,-5.52 -4.48,-10 -10,-10H60.28c-5.52,0 -10,4.48 -10,10V451.72z"
|
||||
android:strokeWidth="20"
|
||||
android:strokeColor="#FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M134.9,52.08c1.95,137.82 -1.95,272.71 0,410.53"
|
||||
android:strokeWidth="20"
|
||||
android:strokeColor="#FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M255.66,50.91c1.95,137.82 -1.95,272.71 0,410.53"
|
||||
android:strokeWidth="20"
|
||||
android:strokeColor="#FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M363.66,50.91c1.95,137.82 -1.95,272.71 0,410.53"
|
||||
android:strokeWidth="20"
|
||||
android:strokeColor="#FFFFFF" />
|
||||
</vector>
|
||||
+6
-6
@@ -18,10 +18,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,5v2h-4L15,5h4M9,5v6L5,11L5,5h4m10,8v6h-4v-6h4M9,17v2L5,19v-2h4M21,3h-8v6h8L21,3zM11,3L3,3v10h8L11,3zM21,11h-8v10h8L21,11zM11,15L3,15v6h8v-6z" />
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M11,2v12h3L14,2h-3zM10,2L6,2v12h4L10,2zM5,2L2,2v12h3L5,2zM2,1h13v14L1,15L1,1h1z"
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M2,15L1,15L1,1h14v14L2,15zM2,14h12v-3L2,11v3zM14,2L2,2v3h12L14,2zM14,10L14,6L2,6v4h12z"/>
|
||||
</vector>
|
||||
+1
-1
@@ -17,5 +17,5 @@
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M3,3L13,3A2,2 0,0 1,15 5L15,11A2,2 0,0 1,13 13L3,13A2,2 0,0 1,1 11L1,5A2,2 0,0 1,3 3z"/>
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,3h2.104v2H1zM1,7h2.104v2H1zM1,11h2.104v2H1zM5,3h10v2H5zM5,7h10v2H5zM5,11h10v2H5z"/>
|
||||
</vector>
|
||||
@@ -1,38 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.0dp"
|
||||
android:height="24.0dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M6.37,10.70C8.50,3.94,14.82,6.73,15.82,8.07L17.22,6.47C10.41,1.26,4.83,7.22,4.58,10.71L6.37,10.70z"
|
||||
android:strokeWidth="0.43331328"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeLineCap="square"
|
||||
android:strokeLineJoin="miter" />
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M13.68,10.63L19.57,4.57L19.57,10.72z"
|
||||
android:strokeWidth="0.43331328"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeLineCap="square"
|
||||
android:strokeLineJoin="miter" />
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M17.63,13.30C15.50,20.06,9.18,17.27,8.18,15.93L6.78,17.53C13.59,22.74,19.17,16.78,19.42,13.29L17.63,13.30z"
|
||||
android:strokeWidth="0.43331328"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeLineCap="square"
|
||||
android:strokeLineJoin="miter" />
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M10.32,13.37L4.43,19.43L4.43,13.28z"
|
||||
android:strokeWidth="0.43331328"
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeLineCap="square"
|
||||
android:strokeLineJoin="miter" />
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M15,8h-2.5A4.5,4.5 0,1 0,8 12.5V15a7,7 0,1 1,7 -7z"/>
|
||||
</vector>
|
||||
Executable → Regular
+27
-6
@@ -1,10 +1,31 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5 5,-2.24 5,-5 -2.24,-5 -5,-5zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M8,13A5,5 0,1 0,8 3a5,5 0,0 0,0 10zM8,15A7,7 0,1 1,8 1a7,7 0,0 1,0 14z"
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M8,8m-3,0a3,3 0,1 1,6 0a3,3 0,1 1,-6 0"
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M8,13A5,5 0,1 0,8 3a5,5 0,0 0,0 10zM8,15A7,7 0,1 1,8 1a7,7 0,0 1,0 14z"/>
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M8,8m-3,0a3,3 0,1 1,6 0a3,3 0,1 1,-6 0"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,3h5v10H1zM7,3h8v10H7z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,3.91C1,3.454 1.5,3 2,3h12c0.5,0 1,0.455 1,0.91v8.18c0,0.455 -0.5,0.91 -1,0.91H2c-0.5,0 -1,-0.455 -1,-0.91V3.91zM12,4v7h2V4h-2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M11.663,10a3.5,3.5 0,0 1,-6.326 0L1,10L1,7h4.337a3.5,3.5 0,0 1,6.326 0L15,7v3h-3.337zM11.965,9L14,9L14,8h-2.035a3.53,3.53 0,0 1,0 1z"/>
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<!-- drawable/electric_switch_closed.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M20.83 11A3 3 0 0 0 15.18 11H8.82A3 3 0 0 0 3.17 11H1V13H3.17A3 3 0 0 0 8.82 13H15.18A3 3 0 0 0 20.83 13H23V11M6 13A1 1 0 1 1 7 12A1 1 0 0 1 6 13M18 13A1 1 0 1 1 19 12A1 1 0 0 1 18 13Z" />
|
||||
</vector>
|
||||
Executable → Regular
+20
-9
@@ -1,10 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,10l5,5 5,-5z" />
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,8h14v2H1zM1,12h14v2H1zM1,4h11l3,-3v5H1z"/>
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M6,9h2v2L6,11L6,9zM9,9h2v2L9,11L9,9zM9,12h2v2L9,14v-2zM9,6h2v2L9,8L9,6zM12,6h2v2h-2L12,6zM12,9h2v2h-2L12,9zM12,12h2v2h-2v-2zM12,3h2v2h-2L12,3zM6,12h2v2L6,14v-2zM3,14v-2h2v2L3,14z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M11,8m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"/>
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M3.083,6H6.5c-0.667,1.333 -0.667,2.667 0,4H3.083a2,2 0,1 1,0 -4z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:fillColor="@color/primaryIconColor"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M2,2h4v4H2zM2,10h4v4H2zM10,2h4v4h-4zM10,10h4v4h-4zM6,6h4v4H6z" />
|
||||
</vector>
|
||||
Executable → Regular
+20
-9
@@ -1,10 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M2.5,4v3h5v12h3V7h5V4H2.5zM21.5,9h-9v3h3v7h3v-7h3V9z" />
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M6.47,9.928L3.204,9.928l-0.683,1.962L1,11.89l3.183,-8.427h1.314l3.189,8.427L7.158,11.89l-0.689,-1.962zM3.615,8.747h2.442l-1.22,-3.496 -1.222,3.496zM15,8.822c0,0.973 -0.217,1.746 -0.651,2.321 -0.434,0.575 -1.031,0.862 -1.791,0.862 -0.733,0 -1.304,-0.264 -1.713,-0.793l-0.07,0.678L9.502,11.89L9.502,3h1.406v3.23c0.405,-0.479 0.951,-0.718 1.638,-0.718 0.764,0 1.364,0.283 1.8,0.85 0.436,0.568 0.654,1.36 0.654,2.38v0.08zM13.594,8.701c0,-0.68 -0.12,-1.189 -0.36,-1.528 -0.238,-0.34 -0.586,-0.51 -1.04,-0.51 -0.61,0 -1.039,0.267 -1.286,0.8v2.58c0.251,0.544 0.683,0.816 1.297,0.816 0.44,0 0.779,-0.164 1.018,-0.491 0.24,-0.328 0.363,-0.824 0.37,-1.488L13.593,8.7z"/>
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M1,5c0,-1.105 0.897,-2 2.006,-2h9.988C14.102,3 15,3.887 15,5v6c0,1.105 -0.897,2 -2.006,2L3.006,13A1.998,1.998 0,0 1,1 11L1,5zM3,4.75L3,11h10.25L3,4.75z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M8,4.85h6.23C13.11,2.54 10.73,1 8,1c-2.17,0 -4.13,0.98 -5.39,2.52l2.31,3.99C5.13,6.04 6.46,4.85 8,4.85zM8,11.15c-1.19,0 -2.17,-0.63 -2.73,-1.61L2.12,4.15A7.281,7.281 0,0 0,1 8c0,3.5 2.52,6.37 5.88,6.93l2.31,-3.99c-0.42,0.14 -0.77,0.21 -1.19,0.21zM11.15,8c0,0.56 -0.14,1.12 -0.42,1.54L7.58,15L8,15c3.85,0 7,-3.15 7,-7 0,-0.84 -0.14,-1.68 -0.42,-2.45L9.96,5.55c0.7,0.56 1.19,1.47 1.19,2.45z"/>
|
||||
<path android:fillColor="@color/primaryIconColor" android:fillType="evenOdd" android:pathData="M8,8m-2.45,0a2.45,2.45 0,1 1,4.9 0a2.45,2.45 0,1 1,-4.9 0"/>
|
||||
</vector>
|
||||
@@ -470,7 +470,6 @@
|
||||
|
||||
<string name="widget_textview">TextView</string>
|
||||
<string name="widget_button">Button</string>
|
||||
<string name="widget_group_android">Android</string>
|
||||
<string name="widget_checkbox">CheckBox</string>
|
||||
<string name="widget_checked_textview">CheckedTextView</string>
|
||||
<string name="widget_edittext">EditText</string>
|
||||
@@ -480,7 +479,17 @@
|
||||
<string name="widget_radio_button">RadioButton</string>
|
||||
<string name="widget_seekbar">SeekBar</string>
|
||||
<string name="widget_spinner">Spinner</string>
|
||||
<string name="widget_group_layouts">Layouts</string>
|
||||
<string name="layout_linear">LinearLayout</string>
|
||||
<string name="layout_relative">RelativeLayout</string>
|
||||
<string name="widget_auto_complete_textview">AutoCompleteTextView</string>
|
||||
<string name="widget_listview">ListView</string>
|
||||
<string name="widget_surfaceview">SurfaceView</string>
|
||||
<string name="widget_switch">Switch</string>
|
||||
<string name="widget_textureview">TextureView</string>
|
||||
<string name="widget_togglebutton">ToggleButton</string>
|
||||
<string name="widget_frame_layout">FrameLayout</string>
|
||||
<string name="widget_grid_layout">GridLayout</string>
|
||||
<string name="widget_linear_layout_horz">LinearLayout (H)</string>
|
||||
<string name="widget_relative_layout">RelativeLayout</string>
|
||||
<string name="widget_linear_layout_vert">LinearLayout (V)</string>
|
||||
</resources>
|
||||
Binary file not shown.
+57
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.uidesigner.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.itsaky.androidide.uidesigner.adapters.WidgetsCategoryAdapter.VH
|
||||
import com.itsaky.androidide.uidesigner.databinding.LayoutUiWidgetsCategoryBinding
|
||||
import com.itsaky.androidide.uidesigner.models.UiWidgetCategory
|
||||
|
||||
/** @author Akash Yadav */
|
||||
class WidgetsCategoryAdapter(categories: List<UiWidgetCategory>) : RecyclerView.Adapter<VH>() {
|
||||
|
||||
private val categories =
|
||||
categories.let {
|
||||
val mutable = it.toMutableList()
|
||||
mutable.removeIf { category -> category.widgets.isEmpty() }
|
||||
mutable
|
||||
}
|
||||
|
||||
inner class VH(val binding: LayoutUiWidgetsCategoryBinding) :
|
||||
RecyclerView.ViewHolder(binding.root)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||
return VH(
|
||||
LayoutUiWidgetsCategoryBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return categories.size
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: VH, position: Int) {
|
||||
val binding = holder.binding
|
||||
val category = categories[position]
|
||||
binding.name.setText(category.label)
|
||||
|
||||
binding.widgets.adapter = WidgetsItemAdapter(category.widgets)
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.uidesigner.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.itsaky.androidide.uidesigner.adapters.WidgetsItemAdapter.VH
|
||||
import com.itsaky.androidide.uidesigner.databinding.LayoutUiWidgetsItemBinding
|
||||
import com.itsaky.androidide.uidesigner.models.UiWidget
|
||||
|
||||
/**
|
||||
* @author Akash Yadav
|
||||
*/
|
||||
class WidgetsItemAdapter(private val widgets: List<UiWidget>) : RecyclerView.Adapter<VH>(){
|
||||
|
||||
inner class VH(val binding: LayoutUiWidgetsItemBinding) : RecyclerView.ViewHolder(binding.root)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||
return VH(LayoutUiWidgetsItemBinding.inflate(LayoutInflater.from(parent.context), parent, false))
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return widgets.size
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: VH, position: Int) {
|
||||
val binding = holder.binding
|
||||
val widget = widgets[position]
|
||||
|
||||
binding.name.setText(widget.label)
|
||||
binding.icon.setImageResource(widget.icon)
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -22,7 +22,9 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.itsaky.androidide.fragments.BaseFragment
|
||||
import com.itsaky.androidide.uidesigner.adapters.WidgetsCategoryAdapter
|
||||
import com.itsaky.androidide.uidesigner.databinding.FragmentUiWidgetsBinding
|
||||
import com.itsaky.androidide.uidesigner.utils.Widgets
|
||||
|
||||
/**
|
||||
* A fragment that shows the list of widgets available to use in the UI designer.
|
||||
@@ -37,13 +39,15 @@ class WidgetsListFragment : BaseFragment() {
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
): View {
|
||||
this.binding = FragmentUiWidgetsBinding.inflate(inflater, container, false)
|
||||
return this.binding!!.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
this.binding!!.widgets.adapter = WidgetsCategoryAdapter(Widgets.categories)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
||||
@@ -17,7 +17,41 @@
|
||||
|
||||
package com.itsaky.androidide.uidesigner.models
|
||||
|
||||
import android.view.View
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import com.itsaky.androidide.inflater.IView
|
||||
|
||||
data class UiWidget(val name: String, @StringRes val label: Int, @DrawableRes val icon: Int)
|
||||
open class UiWidget(val name: String, @StringRes val label: Int, @DrawableRes val icon: Int) {
|
||||
constructor(
|
||||
klass: Class<out View>,
|
||||
@StringRes label: Int,
|
||||
@DrawableRes icon: Int
|
||||
) : this(klass.name, label, icon)
|
||||
|
||||
fun createView(): IView {
|
||||
TODO()
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is UiWidget) return false
|
||||
|
||||
if (name != other.name) return false
|
||||
if (label != other.label) return false
|
||||
if (icon != other.icon) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result = name.hashCode()
|
||||
result = 31 * result + label
|
||||
result = 31 * result + icon
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "UiWidget(name='$name', label=$label, icon=$icon)"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ package com.itsaky.androidide.uidesigner.models
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
|
||||
data class UiWidgetCategory(@StringRes val label: Int, val widgets: List<UiWidget> = emptyList())
|
||||
data class UiWidgetCategory(@StringRes val label: Int, val widgets: MutableList<UiWidget> = mutableListOf())
|
||||
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.uidesigner.utils
|
||||
|
||||
import android.view.SurfaceView
|
||||
import android.view.TextureView
|
||||
import android.webkit.WebView
|
||||
import android.widget.AutoCompleteTextView
|
||||
import android.widget.Button
|
||||
import android.widget.CheckBox
|
||||
import android.widget.CheckedTextView
|
||||
import android.widget.EditText
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.GridLayout
|
||||
import android.widget.ImageButton
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ListView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.RadioButton
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.SeekBar
|
||||
import android.widget.Switch
|
||||
import android.widget.ToggleButton
|
||||
import com.itsaky.androidide.uidesigner.R.drawable
|
||||
import com.itsaky.androidide.uidesigner.R.string
|
||||
import com.itsaky.androidide.uidesigner.models.UiWidget
|
||||
import com.itsaky.androidide.uidesigner.models.UiWidgetCategory
|
||||
|
||||
internal object Widgets {
|
||||
|
||||
@JvmField val CATEGORY_WIDGETS = UiWidgetCategory(string.ui_category_widgets)
|
||||
@JvmField val CATEGORY_LAYOUTS = UiWidgetCategory(string.ui_category_layouts)
|
||||
|
||||
private val internalCategories = mutableListOf<UiWidgetCategory>()
|
||||
|
||||
val categories: List<UiWidgetCategory>
|
||||
get() = this.internalCategories
|
||||
|
||||
init {
|
||||
internalCategories.add(getLayouts())
|
||||
internalCategories.add(getWidgets())
|
||||
}
|
||||
|
||||
private fun getWidgets(): UiWidgetCategory {
|
||||
return CATEGORY_WIDGETS.apply {
|
||||
if (widgets.isNotEmpty()) {
|
||||
return@apply
|
||||
}
|
||||
widgets.apply {
|
||||
add(
|
||||
UiWidget(
|
||||
AutoCompleteTextView::class.java,
|
||||
string.widget_auto_complete_textview,
|
||||
drawable.ic_widget_auto_complete_textview
|
||||
)
|
||||
)
|
||||
add(UiWidget(Button::class.java, string.widget_button, drawable.ic_widget_button))
|
||||
add(UiWidget(CheckBox::class.java, string.widget_checkbox, drawable.ic_widget_checkbox))
|
||||
add(
|
||||
UiWidget(
|
||||
CheckedTextView::class.java,
|
||||
string.widget_checked_textview,
|
||||
drawable.ic_widget_checked_textview
|
||||
)
|
||||
)
|
||||
add(UiWidget(EditText::class.java, string.widget_edittext, drawable.ic_widget_edittext))
|
||||
add(
|
||||
UiWidget(
|
||||
ImageButton::class.java,
|
||||
string.widget_image_button,
|
||||
drawable.ic_widget_imagebutton
|
||||
)
|
||||
)
|
||||
add(UiWidget(ImageView::class.java, string.widget_image_view, drawable.ic_widget_imageview))
|
||||
add(UiWidget(ListView::class.java, string.widget_listview, drawable.ic_widget_list_view))
|
||||
add(
|
||||
UiWidget(
|
||||
ProgressBar::class.java,
|
||||
string.widget_progressbar,
|
||||
drawable.ic_widget_progress_bar
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
RadioButton::class.java,
|
||||
string.widget_radio_button,
|
||||
drawable.ic_widget_radio_button
|
||||
)
|
||||
)
|
||||
add(UiWidget(SeekBar::class.java, string.widget_seekbar, drawable.ic_widget_seek_bar))
|
||||
add(
|
||||
UiWidget(
|
||||
SurfaceView::class.java,
|
||||
string.widget_surfaceview,
|
||||
drawable.ic_widget_surface_view
|
||||
)
|
||||
)
|
||||
add(UiWidget(Switch::class.java, string.widget_switch, drawable.ic_widget_switch))
|
||||
add(
|
||||
UiWidget(
|
||||
TextureView::class.java,
|
||||
string.widget_textureview,
|
||||
drawable.ic_widget_textureview
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
ToggleButton::class.java,
|
||||
string.widget_togglebutton,
|
||||
drawable.ic_widget_toggle_button
|
||||
)
|
||||
)
|
||||
add(UiWidget(WebView::class.java, string.widget_webview, drawable.ic_widget_webview))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getLayouts(): UiWidgetCategory {
|
||||
return CATEGORY_LAYOUTS.apply {
|
||||
if (widgets.isNotEmpty()) {
|
||||
return@apply
|
||||
}
|
||||
|
||||
widgets.apply {
|
||||
add(
|
||||
UiWidget(
|
||||
FrameLayout::class.java,
|
||||
string.widget_frame_layout,
|
||||
drawable.ic_widget_frame_layout
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
GridLayout::class.java,
|
||||
string.widget_grid_layout,
|
||||
drawable.ic_widget_grid_layout
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
LinearLayout::class.java,
|
||||
string.widget_linear_layout_horz,
|
||||
drawable.ic_widget_linear_layout_horz
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
LinearLayout::class.java,
|
||||
string.widget_linear_layout_vert,
|
||||
drawable.ic_widget_linear_layout_vert
|
||||
)
|
||||
)
|
||||
add(
|
||||
UiWidget(
|
||||
RelativeLayout::class.java,
|
||||
string.widget_relative_layout,
|
||||
drawable.ic_widget_relative_layout
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
tools:ignore="DuplicateIncludedIds"
|
||||
tools:openDrawer="start">
|
||||
tools:ignore="DuplicateIncludedIds">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/container"
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
@@ -50,9 +50,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||
tools:listitem="@layout/fragment_ui_widgets_item" />
|
||||
tools:listitem="@layout/layout_ui_widgets_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
+21
-29
@@ -15,7 +15,7 @@
|
||||
~ along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
@@ -23,36 +23,28 @@
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:clickable="true"
|
||||
app:strokeWidth="1dp"
|
||||
app:cardElevation="0dp"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:elevation="0.7dp"
|
||||
android:focusable="true"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:strokeColor="@color/primaryDarkColor">
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
tools:text="Button" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
tools:text="Button" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ 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 <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="widget_webview">WebView</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user