Button redesign

Alle Buttons haben jetzt die gleiche Tint farbe
This commit is contained in:
Georg Reisinger 2019-04-01 22:13:56 +02:00
parent 7f4cbd5a59
commit 03af603e13
14 changed files with 23 additions and 10 deletions

Binary file not shown.

View File

@ -7,8 +7,8 @@ android {
applicationId "at.smartshopper.smartshopperapp"
minSdkVersion 23
targetSdkVersion 28
versionCode 13
versionName "4.3"
versionCode 14
versionName "4.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {

Binary file not shown.

View File

@ -4,6 +4,7 @@ import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
@ -11,6 +12,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
@ -96,7 +98,7 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
if (resultCode == RESULT_OK) {
int color = Integer.parseInt(data.getData().toString());
this.color = colorToHexString(color);
colorBtn.setBackgroundColor(Color.parseColor(this.color));
colorBtn.setBackgroundTintList(ColorStateList.valueOf(color));
}
}
}

View File

@ -1,6 +1,7 @@
package at.smartshopper.smartshopperapp.activitys;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
@ -349,7 +350,7 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
colorstring = "#" + this.colorString;
}
int colorint = Color.parseColor(colorstring);
colorBtn.setBackgroundColor(colorint);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint));
}
}
}

View File

@ -69,7 +69,7 @@
<Button
android:id="@+id/loginEmailBtn"
style="@style/Widget.AppCompat.Button.Colored"
style="@style/AppTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorButton"

View File

@ -95,7 +95,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorButton"
android:backgroundTint="#00b7ff"
android:text="Farbe Auswählen" />
</LinearLayout>
</TableRow>
@ -116,6 +116,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Fertig" />
</LinearLayout>
</TableRow>

View File

@ -122,6 +122,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Fertig" />
</LinearLayout>
</TableRow>

View File

@ -102,6 +102,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text=" Share Aufheben" />
</TableRow>

View File

@ -72,6 +72,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Fertig" />
</TableRow>

View File

@ -132,7 +132,8 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:backgroundTint="#00b7ff"
android:backgroundTintMode="src_atop"
android:text="Farbe auswählen" />
</LinearLayout>
</TableRow>
@ -153,6 +154,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Fertig" />
</LinearLayout>
</TableRow>

View File

@ -80,6 +80,7 @@
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Listen Sharing beenden!" />
</TableRow>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#FFFFFF</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#880e4f</color>
<color name="colorPrimaryDark">#176988</color>
<color name="colorAccent">#00b7ff</color>
<color name="colorButton"></color>
</resources>

View File

@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.MaterialComponents.Light">
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorButtonNormal">@color/colorAccent</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item>
<item name="android:buttonStyle">@style/Widget.AppCompat.Button.Colored</item>
</style>
<style name="popup_window_animation_phone">