replace 4 LowRes Icons (add, remove, clone and as)

For add, remove and clone I set width and height to 16dp (automatically scaled in Local Profile layout but not in automation)
for as, I replaced low res icon by double arrows of overview fragment (size a little bit increased because in automation icons are very small)
This commit is contained in:
Philoul 2020-06-15 16:45:42 +02:00
parent 73d7a016c9
commit acfd9621b7
15 changed files with 101 additions and 13 deletions

View file

@ -98,7 +98,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
)
params.gravity = Gravity.CENTER
buttonAdd.layoutParams = params
buttonAdd.setImageResource(R.drawable.add)
buttonAdd.setImageResource(R.drawable.ic_add)
buttonAdd.contentDescription = resourceHelper.gs(R.string.add_short)
buttonAdd.setOnClickListener {
scanForActivity(context)?.supportFragmentManager?.let {
@ -124,7 +124,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
)
params.gravity = Gravity.CENTER
buttonRemove.layoutParams = params
buttonRemove.setImageResource(R.drawable.remove)
buttonRemove.setImageResource(R.drawable.ic_remove)
buttonRemove.contentDescription = resourceHelper.gs(R.string.delete_short)
buttonRemove.setOnClickListener {
rxBus.send(EventTriggerRemove(trigger))
@ -141,7 +141,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
)
params.gravity = Gravity.CENTER
buttonClone.layoutParams = params
buttonClone.setImageResource(R.drawable.clone)
buttonClone.setImageResource(R.drawable.ic_clone)
buttonClone.contentDescription = resourceHelper.gs(R.string.copy_short)
buttonClone.setOnClickListener {
rxBus.send(EventTriggerClone(trigger))

View file

@ -68,7 +68,7 @@ class TriggerAutosensValue(injector: HasAndroidInjector) : Trigger(injector) {
override fun friendlyDescription(): String =
resourceHelper.gs(R.string.autosenscompared, resourceHelper.gs(comparator.value.stringRes), autosens.value)
override fun icon(): Optional<Int?> = Optional.of(R.drawable.`as`)
override fun icon(): Optional<Int?> = Optional.of(R.drawable.`ic_as`)
override fun duplicate(): Trigger = TriggerAutosensValue(injector, this)

View file

@ -111,7 +111,7 @@ public class TimeListEdit {
// last "plus" to append new interval
float factor = layout.getContext().getResources().getDisplayMetrics().density;
finalAdd = new ImageView(context);
finalAdd.setImageResource(R.drawable.add);
finalAdd.setImageResource(R.drawable.ic_add);
LinearLayout.LayoutParams illp = new LinearLayout.LayoutParams((int) (35d * factor), (int) (35 * factor));
illp.setMargins(0, 25, 0, 25); // llp.setMargins(left, top, right, bottom);
illp.gravity = Gravity.CENTER;

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="16dp"
android:height="16dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M22.5,8.784h-7.283V1.5c0,-0.313 -0.254,-0.567 -0.567,-0.567H9.351c-0.313,0 -0.567,0.254 -0.567,0.567v7.284H1.5c-0.313,0 -0.567,0.254 -0.567,0.567v5.299c0,0.313 0.254,0.567 0.567,0.567h7.284V22.5c0,0.313 0.254,0.567 0.567,0.567h5.299c0.313,0 0.567,-0.254 0.567,-0.567v-7.283H22.5c0.313,0 0.567,-0.254 0.567,-0.567V9.351C23.067,9.038 22.813,8.784 22.5,8.784z"
android:fillColor="#00C03E"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="48dp"
android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M16.615,17.78V9.692h-2.308v8.088h-3.461l4.615,4.604l4.615,-4.604H16.615zM8.539,1.616L3.924,6.22h3.461v8.088h2.308V6.22h3.461L8.539,1.616z"
android:fillColor="#008585"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20.964,12.509V2.983l-2.932,2.932c-4.317,-3.412 -9.981,-3.694 -13.245,-0.43c-3.581,3.581 -2.909,10.058 1.5,14.467c0.427,0.427 0.877,0.807 1.338,1.163c-0.548,-0.841 -1.031,-1.781 -1.411,-2.812C4.438,13.481 5.49,8.653 8.565,7.519c1.867,-0.688 4.047,0.152 5.872,1.99l-3,3H20.964z"
android:fillColor="#005AF9"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="16dp"
android:height="16dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M16.548,12l5.15,-5.15c0.222,-0.221 0.222,-0.581 0.001,-0.802l-3.746,-3.747c-0.213,-0.213 -0.591,-0.213 -0.802,0L12,7.452L6.85,2.301c-0.213,-0.213 -0.589,-0.213 -0.802,0L2.301,6.048c-0.106,0.106 -0.166,0.25 -0.166,0.401s0.06,0.294 0.166,0.401L7.452,12l-5.151,5.151c-0.106,0.105 -0.166,0.25 -0.166,0.4s0.06,0.295 0.166,0.401l3.747,3.746c0.111,0.11 0.256,0.166 0.401,0.166s0.29,-0.056 0.401,-0.167l5.15,-5.15l5.151,5.151c0.11,0.11 0.255,0.166 0.4,0.166s0.29,-0.056 0.401,-0.167l3.745,-3.745c0.222,-0.222 0.222,-0.581 0.001,-0.802L16.548,12z"
android:fillColor="#FF1313"/>
</vector>

View file

@ -63,7 +63,7 @@
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/addnew"
android:src="@drawable/add" />
android:src="@drawable/ic_add" />
<ImageView
android:id="@+id/localprofile_profile_clone"
@ -72,7 +72,7 @@
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/clone_label"
android:src="@drawable/clone" />
android:src="@drawable/ic_clone" />
<ImageView
android:id="@+id/localprofile_profile_remove"
@ -81,7 +81,9 @@
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/remove_label"
android:src="@drawable/remove" />
android:scaleX="1"
android:scaleY="1"
android:src="@drawable/ic_remove" />
</LinearLayout>

View file

@ -37,7 +37,7 @@
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/add" />
android:src="@drawable/ic_add" />
<ImageView
android:id="@+id/timelistedit_remove"
@ -45,5 +45,5 @@
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/remove" />
android:src="@drawable/ic_remove" />
</LinearLayout>

View file

@ -37,7 +37,7 @@
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/add" />
android:src="@drawable/ic_add" />
<ImageView
android:id="@+id/timelistedit_remove"
@ -45,5 +45,5 @@
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/remove" />
android:src="@drawable/ic_remove" />
</LinearLayout>

View file

@ -110,7 +110,7 @@ class TriggerAutosensValueTest : TriggerTestBase() {
}
@Test fun iconTest() {
Assert.assertEquals(Optional.of(R.drawable.`as`), TriggerAutosensValue(injector).icon())
Assert.assertEquals(Optional.of(R.drawable.`ic_as`), TriggerAutosensValue(injector).icon())
}
@Before

12
icons/add.svg Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="add">
<path display="none" fill="none" d="M0,0h24v24H0V0z"/>
<path fill="#00C03E" d="M22.5,8.784h-7.283V1.5c0-0.313-0.254-0.567-0.567-0.567H9.351c-0.313,0-0.567,0.254-0.567,0.567v7.284H1.5
c-0.313,0-0.567,0.254-0.567,0.567v5.299c0,0.313,0.254,0.567,0.567,0.567h7.284V22.5c0,0.313,0.254,0.567,0.567,0.567h5.299
c0.313,0,0.567-0.254,0.567-0.567v-7.283H22.5c0.313,0,0.567-0.254,0.567-0.567V9.351C23.067,9.038,22.813,8.784,22.5,8.784z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 910 B

11
icons/as.svg Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="as">
<path fill="#008585" d="M16.615,17.78V9.692h-2.308v8.088h-3.461l4.615,4.604l4.615-4.604H16.615z M8.539,1.616L3.924,6.22h3.461
v8.088h2.308V6.22h3.461L8.539,1.616z"/>
<rect fill="none" width="24" height="24"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 688 B

11
icons/clone.svg Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="clone">
<path fill="#005AF9" d="M20.964,12.509V2.983l-2.932,2.932c-4.317-3.412-9.981-3.694-13.245-0.43
c-3.581,3.581-2.909,10.058,1.5,14.467c0.427,0.427,0.877,0.807,1.338,1.163c-0.548-0.841-1.031-1.781-1.411-2.812
C4.438,13.481,5.49,8.653,8.565,7.519c1.867-0.688,4.047,0.152,5.872,1.99l-3,3H20.964z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 777 B

13
icons/remove.svg Normal file
View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="remove">
<path fill="#FF1313" d="M16.548,12l5.15-5.15c0.222-0.221,0.222-0.581,0.001-0.802l-3.746-3.747c-0.213-0.213-0.591-0.213-0.802,0
L12,7.452L6.85,2.301c-0.213-0.213-0.589-0.213-0.802,0L2.301,6.048c-0.106,0.106-0.166,0.25-0.166,0.401s0.06,0.294,0.166,0.401
L7.452,12l-5.151,5.151c-0.106,0.105-0.166,0.25-0.166,0.4s0.06,0.295,0.166,0.401l3.747,3.746c0.111,0.11,0.256,0.166,0.401,0.166
s0.29-0.056,0.401-0.167l5.15-5.15l5.151,5.151c0.11,0.11,0.255,0.166,0.4,0.166s0.29-0.056,0.401-0.167l3.745-3.745
c0.222-0.222,0.222-0.581,0.001-0.802L16.548,12z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB