Color Fix SDK21+

Alle Farben im Layout gesetzt, damit es bei SDK21+ nicht random ist
Toolbar Text, Icon und die Color Buttons sind jetzt Schwarz wenn der Hintergrund hell ist und weiß wenn der hintergrund dunkel ist
This commit is contained in:
Georg Reisinger 2019-04-08 18:33:53 +02:00
parent 03af603e13
commit 9e550d285b
31 changed files with 344 additions and 488 deletions

Binary file not shown.

View File

@ -5,15 +5,15 @@ android {
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
applicationId "at.smartshopper.smartshopperapp" applicationId "at.smartshopper.smartshopperapp"
minSdkVersion 23 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 14 versionCode 19
versionName "4.4" versionName "5.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }

View File

@ -1 +1,19 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"3.1","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"app-debug.apk","properties":{}}] [
{
"outputType": {
"type": "APK"
},
"apkInfo": {
"type": "MAIN",
"splits": [],
"versionCode": 4,
"versionName": "3.1",
"enabled": true,
"outputFile": "app-debug.apk",
"fullName": "debug",
"baseName": "debug"
},
"path": "app-debug.apk",
"properties": {}
}
]

View File

@ -19,3 +19,4 @@
# If you keep the line number information, uncomment this to # If you keep the line number information, uncomment this to
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile
-dontwarn org.postgresql.**

Binary file not shown.

View File

@ -12,7 +12,7 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat; import android.support.v4.graphics.ColorUtils;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
@ -98,7 +98,13 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
if (resultCode == RESULT_OK) { if (resultCode == RESULT_OK) {
int color = Integer.parseInt(data.getData().toString()); int color = Integer.parseInt(data.getData().toString());
this.color = colorToHexString(color); this.color = colorToHexString(color);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(color)); int colorint = Color.parseColor(this.color);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint));
if(ColorUtils.calculateLuminance(colorint)>0.5){
colorBtn.setTextColor(Color.parseColor("#000000")); // It's a light color
}else{
colorBtn.setTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
}
} }
} }
} }
@ -122,17 +128,9 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
Log.w("SmartShopper", "getInstanceId failed", task.getException()); Log.w("SmartShopper", "getInstanceId failed", task.getException());
return; return;
} }
// Get new Instance ID token // Get new Instance ID token
String token = task.getResult().getToken(); String token = task.getResult().getToken();
Log.d("SmartShopper MSG", token); Log.d("SmartShopper MSG", token);
/* Log and toast
String msg = getString(R.string.msg_token_fmt, token);
Log.d(TAG, msg);
Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();
*/
} }
}); });
} }
@ -162,19 +160,6 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
e.printStackTrace(); e.printStackTrace();
} }
// Damit werden die Shared Shoppinglists angezeigt // Damit werden die Shared Shoppinglists angezeigt
// try {
// TabHost tabhost = (TabHost) findViewById(R.id.tabHost1);
// tabhost.setCurrentTab(1);
// sharedswiperefresh.setRefreshing(true);
// showSharedShoppingList(FirebaseAuth.getInstance().getCurrentUser().getUid());
// sharedswiperefresh.setRefreshing(false);
// } catch (JSONException e) {
// e.printStackTrace();
// } catch (SQLException e) {
// e.printStackTrace();
// }
//Damit wird die hinzugefügte shoppinglist angezeigt //Damit wird die hinzugefügte shoppinglist angezeigt
onShoppinglistClickContainer(sl_idToGo); onShoppinglistClickContainer(sl_idToGo);
} }
@ -210,7 +195,6 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
host.setCurrentTab(1); host.setCurrentTab(1);
} }
} }
try { try {
try { try {
showOwnShoppingList(uid); showOwnShoppingList(uid);
@ -221,7 +205,6 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }
sharedswiperefresh = (SwipeRefreshLayout) findViewById(R.id.sharedSwipe); sharedswiperefresh = (SwipeRefreshLayout) findViewById(R.id.sharedSwipe);
sharedswiperefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { sharedswiperefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@ -338,7 +321,13 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
colorstring = "#" + dbShoppinglist.getcolor(); colorstring = "#" + dbShoppinglist.getcolor();
} }
this.color = colorstring; this.color = colorstring;
colorBtn.setBackgroundColor(Color.parseColor(colorstring)); int colorint = Color.parseColor(colorstring);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint));
if(ColorUtils.calculateLuminance(colorint)>0.5){
colorBtn.setTextColor(Color.parseColor("#000000")); // It's a light color
}else{
colorBtn.setTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
}
name.setText(dbShoppinglist.getname()); name.setText(dbShoppinglist.getname());
description.setText(dbShoppinglist.getdescription()); description.setText(dbShoppinglist.getdescription());
} else { } else {
@ -930,16 +919,6 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
startActivity(Intent.createChooser(sharingIntent, "Teile mit")); startActivity(Intent.createChooser(sharingIntent, "Teile mit"));
} }
}); });
// final Button copyButton = (Button) popupContentView.findViewById(R.id.shareCopy);
// copyButton.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// copyText(linkausgabe.getText().toString());
// popupShare.dismiss();
// }
// });
Button delShare = (Button) popupContentView.findViewById(R.id.delShare); Button delShare = (Button) popupContentView.findViewById(R.id.delShare);
final String finalLink = link; final String finalLink = link;
@ -1191,13 +1170,6 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
popupEditShare.dismiss(); popupEditShare.dismiss();
} }
}); });
// copyBtn.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// copyText(linkAusgabe.getText().toString());
// popupEditShare.dismiss();
// }
// });
ImageButton shareIntentBtn = popupContentView.findViewById(R.id.shareIntentBtn); ImageButton shareIntentBtn = popupContentView.findViewById(R.id.shareIntentBtn);
Picasso.get().load(R.drawable.share).into(shareIntentBtn); Picasso.get().load(R.drawable.share).into(shareIntentBtn);
shareIntentBtn.setOnClickListener(new View.OnClickListener() { shareIntentBtn.setOnClickListener(new View.OnClickListener() {

View File

@ -6,7 +6,6 @@ import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;

View File

@ -279,132 +279,6 @@ public class EditUser extends Activity {
break; break;
} }
} }
// // code for device below 5
// private boolean performCropImage(Uri mFinalImageUri) {
// Uri mCropImagedUri;
// try {
// if (mFinalImageUri != null) {
// //call the standard crop action intent (the user device may not support it)
// Intent cropIntent = new Intent("com.android.camera.action.CROP");
// //indicate image type and Uri
// cropIntent.setDataAndType(mFinalImageUri, "image/*");
// //set crop properties
// cropIntent.putExtra("crop", "true");
// //indicate aspect of desired crop
// cropIntent.putExtra("aspectX", 1);
// cropIntent.putExtra("aspectY", 1);
// cropIntent.putExtra("scale", true);
// // cropIntent.p
// //indicate output X and Y
// cropIntent.putExtra("outputX", 200);
// cropIntent.putExtra("outputY", 200);
// //retrieve data on return
// cropIntent.putExtra("return-data", false);
//
// File f = new File("CROP_");
// try {
// f.createNewFile();
// } catch (IOException ex) {
// Log.e("io", ex.getMessage());
// }
//
// mCropImagedUri = Uri.fromFile(f);
// cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, mCropImagedUri);
// //start the activity - we handle returning in onActivityResult
// startActivityForResult(cropIntent, 2);
// return true;
// }
// } catch (ActivityNotFoundException anfe) {
// //display an error message
// String errorMessage = getString('2');
// Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);
// toast.show();
// return false;
// }
// return false;
// }
//
// // code for 5 or 6
// private void performCrop(Uri picUri) {
// try {
//
// Intent cropIntent = new Intent("com.android.camera.action.CROP");
// // indicate image type and Uri
// cropIntent.setDataAndType(picUri, "image/*");
// // set crop properties
// cropIntent.putExtra("crop", "true");
// // indicate aspect of desired crop
// cropIntent.putExtra("aspectX", 1);
// cropIntent.putExtra("aspectY", 1);
// // indicate output X and Y
// cropIntent.putExtra("outputX", 200);
// cropIntent.putExtra("outputY", 200);
// // retrieve data on return
// cropIntent.putExtra("return-data", true);
// // start the activity - we handle returning in onActivityResult
// startActivityForResult(cropIntent, 2);
// }
// // respond to users whose devices do not support the crop action
// catch (ActivityNotFoundException anfe) {
// // display an error message
// String errorMessage = getString('2');
// Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);
// toast.show();
// }
// }
//
// @Override
// public void onActivityResult(int requestCode, int resultCode, Intent data) {
//
// final InputStream imageStream;
//
//
// if (requestCode == 1) {
// imageUri = data.getData();
// try {
// imageStream = getContentResolver().openInputStream(imageUri);
// BitmapFactory.Options options = new BitmapFactory.Options();
// options.inJustDecodeBounds = true;
// selectedImage = BitmapFactory.decodeFile(imageUri.toString(), options);
//
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// }
// if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
// performCrop(imageUri);
// } else {
// performCropImage(imageUri);
// }
//
// } else if (requestCode == 2) {
// try {
// if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
// Bundle extras = data.getExtras();
// selectedImage = extras.getParcelable("data");
// } else {
// selectedImage = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageUri);
//
// }
// userBitmap = selectedImage;
// userbild.setImageBitmap(selectedImage);
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
//
// private Uri getImageUri(Context context, Bitmap inImage) {
// ByteArrayOutputStream bytes = new ByteArrayOutputStream();
// inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
// String path = MediaStore.Images.Media.insertImage(context.getContentResolver(), inImage, "Title", null);
// return Uri.parse(path);
// }
private Drawable LoadImageFromWebOperations(String url) { private Drawable LoadImageFromWebOperations(String url) {
try { try {
InputStream is = (InputStream) new URL(url).getContent(); InputStream is = (InputStream) new URL(url).getContent();

View File

@ -2,9 +2,12 @@ package at.smartshopper.smartshopperapp.activitys;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.v4.graphics.ColorUtils;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
@ -83,7 +86,25 @@ public class ItemListActivity extends AppCompatActivity implements ItemAdapter.O
} else { } else {
colorstring = "#" + colorToolbar; colorstring = "#" + colorToolbar;
} }
toolbar.setBackgroundColor(Color.parseColor(colorstring)); int backgroundcolor = Color.parseColor(colorstring);
toolbar.setBackgroundColor(backgroundcolor);
if(ColorUtils.calculateLuminance(backgroundcolor)>0.5){
toolbar.setTitleTextColor(Color.parseColor("#000000")); // It's a light color
Drawable drawable = toolbar.getOverflowIcon();
if(drawable != null) {
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTint(drawable.mutate(), Color.parseColor("#000000"));
toolbar.setOverflowIcon(drawable);
}
}else{
toolbar.setTitleTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
Drawable drawable = toolbar.getOverflowIcon();
if(drawable != null) {
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTint(drawable.mutate(), Color.parseColor("#FFFFFF"));
toolbar.setOverflowIcon(drawable);
}
}
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
this.groupName = (TextView) findViewById(R.id.groupViewName); this.groupName = (TextView) findViewById(R.id.groupViewName);

View File

@ -54,7 +54,7 @@ public class LoginActivity extends AppCompatActivity {
//Für Double Back press to exit //Für Double Back press to exit
private boolean doubleBackToExitPressedOnce = false; private boolean doubleBackToExitPressedOnce = false;
public void getDynamicLink(){ public void getDynamicLink() {
FirebaseDynamicLinks.getInstance() FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent()) .getDynamicLink(getIntent())
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() { .addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
@ -76,7 +76,6 @@ public class LoginActivity extends AppCompatActivity {
} }
// Handle the deep link. For example, open the linked // Handle the deep link. For example, open the linked
// content, or apply promotional credit to the user's // content, or apply promotional credit to the user's
// account. // account.
@ -93,6 +92,7 @@ public class LoginActivity extends AppCompatActivity {
}); });
} }
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
@ -170,7 +170,7 @@ public class LoginActivity extends AppCompatActivity {
Intent intent = new Intent(this, Dash.class); Intent intent = new Intent(this, Dash.class);
if(sl_idToGo != null){ if (sl_idToGo != null) {
intent.putExtra("sl_idToGo", sl_idToGo); intent.putExtra("sl_idToGo", sl_idToGo);
intent.putExtra("inviteToAdd", inviteToAdd); intent.putExtra("inviteToAdd", inviteToAdd);
} }
@ -243,7 +243,7 @@ public class LoginActivity extends AppCompatActivity {
mAuth = FirebaseAuth.getInstance(); mAuth = FirebaseAuth.getInstance();
db = new Database(); db = new Database();
Button register = (Button)findViewById(R.id.registrierenBtn); Button register = (Button) findViewById(R.id.registrierenBtn);
register.setOnClickListener(new View.OnClickListener() { register.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -268,9 +268,9 @@ public class LoginActivity extends AppCompatActivity {
@Override @Override
public void onTextChanged(CharSequence s, int start, int before, int count) { public void onTextChanged(CharSequence s, int start, int before, int count) {
if(!email.getText().toString().isEmpty() && !passwort.getText().toString().isEmpty()){ if (!email.getText().toString().isEmpty() && !passwort.getText().toString().isEmpty()) {
loginEmailBtn.setEnabled(true); loginEmailBtn.setEnabled(true);
}else{ } else {
loginEmailBtn.setEnabled(false); loginEmailBtn.setEnabled(false);
} }
} }
@ -288,9 +288,9 @@ public class LoginActivity extends AppCompatActivity {
@Override @Override
public void onTextChanged(CharSequence s, int start, int before, int count) { public void onTextChanged(CharSequence s, int start, int before, int count) {
if(!email.getText().toString().isEmpty() && !passwort.getText().toString().isEmpty()){ if (!email.getText().toString().isEmpty() && !passwort.getText().toString().isEmpty()) {
loginEmailBtn.setEnabled(true); loginEmailBtn.setEnabled(true);
}else{ } else {
loginEmailBtn.setEnabled(false); loginEmailBtn.setEnabled(false);
} }
} }

View File

@ -3,9 +3,12 @@ package at.smartshopper.smartshopperapp.activitys;
import android.content.Intent; import android.content.Intent;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.v4.graphics.ColorUtils;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
@ -13,6 +16,7 @@ import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log;
import android.view.Gravity; import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -129,7 +133,7 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
Shoppinglist shoppinglist = null; Shoppinglist shoppinglist = null;
try { try {
shoppinglist = db.getShoppinglist(sl_id); shoppinglist = db.getShoppinglist(sl_id);
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} catch (JSONException e) { } catch (JSONException e) {
@ -143,7 +147,25 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
} else { } else {
colorstring = "#" + shoppinglist.getcolor(); colorstring = "#" + shoppinglist.getcolor();
} }
toolbar.setBackgroundColor(Color.parseColor(colorstring)); int backgroundcolor = Color.parseColor(colorstring);
toolbar.setBackgroundColor(backgroundcolor);
if(ColorUtils.calculateLuminance(backgroundcolor)>0.5){
toolbar.setTitleTextColor(Color.parseColor("#000000")); // It's a light color
Drawable drawable = toolbar.getOverflowIcon();
if(drawable != null) {
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTint(drawable.mutate(), Color.parseColor("#000000"));
toolbar.setOverflowIcon(drawable);
}
}else{
toolbar.setTitleTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
Drawable drawable = toolbar.getOverflowIcon();
if(drawable != null) {
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTint(drawable.mutate(), Color.parseColor("#FFFFFF"));
toolbar.setOverflowIcon(drawable);
}
}
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
final String finalSl_id = sl_id; final String finalSl_id = sl_id;
@ -222,7 +244,13 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
} else { } else {
colorstring = "#" + dbgroup.getColor(); colorstring = "#" + dbgroup.getColor();
} }
color.setBackgroundColor(Color.parseColor(colorstring)); int colorint = Color.parseColor(colorstring);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint));
if(ColorUtils.calculateLuminance(colorint)>0.5){
colorBtn.setTextColor(Color.parseColor("#000000")); // It's a light color
}else{
colorBtn.setTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
}
name.setText(dbgroup.getGroupName()); name.setText(dbgroup.getGroupName());
} else { } else {
colorString = "ffffff"; colorString = "ffffff";
@ -351,6 +379,11 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
} }
int colorint = Color.parseColor(colorstring); int colorint = Color.parseColor(colorstring);
colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint)); colorBtn.setBackgroundTintList(ColorStateList.valueOf(colorint));
if(ColorUtils.calculateLuminance(colorint)>0.5){
colorBtn.setTextColor(Color.parseColor("#000000")); // It's a light color
}else{
colorBtn.setTextColor(Color.parseColor("#FFFFFF")); // It's a dark color
}
} }
} }
} }

View File

@ -9,8 +9,7 @@ import android.view.animation.Animation;
import android.view.animation.TranslateAnimation; import android.view.animation.TranslateAnimation;
import android.widget.TabHost; import android.widget.TabHost;
public class AnimatedTabHostListener implements TabHost.OnTabChangeListener public class AnimatedTabHostListener implements TabHost.OnTabChangeListener {
{
private static final int ANIMATION_TIME = 240; private static final int ANIMATION_TIME = 240;
private TabHost tabHost; private TabHost tabHost;
@ -25,21 +24,15 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* @param context * @param context
* @param tabHost * @param tabHost
*/ */
public AnimatedTabHostListener(Context context, TabHost tabHost) public AnimatedTabHostListener(Context context, TabHost tabHost) {
{
this.tabHost = tabHost; this.tabHost = tabHost;
this.previousView = tabHost.getCurrentView(); this.previousView = tabHost.getCurrentView();
gestureDetector = new GestureDetector(context, new MyGestureDetector()); gestureDetector = new GestureDetector(context, new MyGestureDetector());
tabHost.setOnTouchListener(new View.OnTouchListener() tabHost.setOnTouchListener(new View.OnTouchListener() {
{ public boolean onTouch(View v, MotionEvent event) {
public boolean onTouch(View v, MotionEvent event) if (gestureDetector.onTouchEvent(event)) {
{
if (gestureDetector.onTouchEvent(event))
{
return false; return false;
} } else {
else
{
return true; return true;
} }
} }
@ -51,17 +44,13 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* appropriate directions. * appropriate directions.
*/ */
@Override @Override
public void onTabChanged(String tabId) public void onTabChanged(String tabId) {
{
currentView = tabHost.getCurrentView(); currentView = tabHost.getCurrentView();
if (tabHost.getCurrentTab() > currentTab) if (tabHost.getCurrentTab() > currentTab) {
{
previousView.setAnimation(outToLeftAnimation()); previousView.setAnimation(outToLeftAnimation());
currentView.setAnimation(inFromRightAnimation()); currentView.setAnimation(inFromRightAnimation());
} } else {
else
{
previousView.setAnimation(outToRightAnimation()); previousView.setAnimation(outToRightAnimation());
currentView.setAnimation(inFromLeftAnimation()); currentView.setAnimation(inFromLeftAnimation());
} }
@ -75,8 +64,7 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* *
* @return Animation the Animation object * @return Animation the Animation object
*/ */
private Animation inFromRightAnimation() private Animation inFromRightAnimation() {
{
Animation inFromRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 1.0f, Animation inFromRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT,
0.0f); 0.0f);
@ -88,8 +76,7 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* *
* @return Animation the Animation object * @return Animation the Animation object
*/ */
private Animation outToRightAnimation() private Animation outToRightAnimation() {
{
Animation outToRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, Animation outToRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT,
1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); 1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f);
return setProperties(outToRight); return setProperties(outToRight);
@ -100,8 +87,7 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* *
* @return Animation the Animation object * @return Animation the Animation object
*/ */
private Animation inFromLeftAnimation() private Animation inFromLeftAnimation() {
{
Animation inFromLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, -1.0f, Animation inFromLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, -1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT,
0.0f); 0.0f);
@ -113,8 +99,7 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* *
* @return Animation the Animation object * @return Animation the Animation object
*/ */
private Animation outToLeftAnimation() private Animation outToLeftAnimation() {
{
Animation outtoLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, Animation outtoLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT,
-1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f);
return setProperties(outtoLeft); return setProperties(outtoLeft);
@ -123,12 +108,10 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
/** /**
* Helper method that sets some common properties * Helper method that sets some common properties
* *
* @param animation * @param animation the animation to give common properties
* the animation to give common properties
* @return the animation with common properties * @return the animation with common properties
*/ */
private Animation setProperties(Animation animation) private Animation setProperties(Animation animation) {
{
animation.setDuration(ANIMATION_TIME); animation.setDuration(ANIMATION_TIME);
animation.setInterpolator(new AccelerateInterpolator()); animation.setInterpolator(new AccelerateInterpolator());
return animation; return animation;
@ -139,10 +122,8 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* uses an AnimatedTabHost listener. * uses an AnimatedTabHost listener.
* *
* @author Daniel Kvist * @author Daniel Kvist
*
*/ */
class MyGestureDetector extends GestureDetector.SimpleOnGestureListener class MyGestureDetector extends GestureDetector.SimpleOnGestureListener {
{
private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MIN_DISTANCE = 120;
private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_MAX_OFF_PATH = 250;
private static final int SWIPE_THRESHOLD_VELOCITY = 200; private static final int SWIPE_THRESHOLD_VELOCITY = 200;
@ -151,8 +132,7 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
/** /**
* An empty constructor that uses the tabhosts content view to decide how many tabs there are. * An empty constructor that uses the tabhosts content view to decide how many tabs there are.
*/ */
public MyGestureDetector() public MyGestureDetector() {
{
maxTabs = tabHost.getTabContentView().getChildCount(); maxTabs = tabHost.getTabContentView().getChildCount();
} }
@ -162,26 +142,20 @@ public class AnimatedTabHostListener implements TabHost.OnTabChangeListener
* velocity to decide if it was a "true" swipe or just some random touching. * velocity to decide if it was a "true" swipe or just some random touching.
*/ */
@Override @Override
public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) {
{
int newTab = 0; int newTab = 0;
if (Math.abs(event1.getY() - event2.getY()) > SWIPE_MAX_OFF_PATH) if (Math.abs(event1.getY() - event2.getY()) > SWIPE_MAX_OFF_PATH) {
{
return false; return false;
} }
if (event1.getX() - event2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) if (event1.getX() - event2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {
{
// Swipe right to left // Swipe right to left
newTab = currentTab + 1; newTab = currentTab + 1;
} } else if (event2.getX() - event1.getX() > SWIPE_MIN_DISTANCE
else if (event2.getX() - event1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {
&& Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY)
{
// Swipe left to right // Swipe left to right
newTab = currentTab - 1; newTab = currentTab - 1;
} }
if (newTab < 0 || newTab > (maxTabs - 1)) if (newTab < 0 || newTab > (maxTabs - 1)) {
{
return false; return false;
} }
tabHost.setCurrentTab(newTab); tabHost.setCurrentTab(newTab);

View File

@ -1,16 +1,9 @@
package at.smartshopper.smartshopperapp.db; package at.smartshopper.smartshopperapp.db;
import android.net.Uri;
import android.os.StrictMode; import android.os.StrictMode;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.dynamiclinks.DynamicLink;
import com.google.firebase.dynamiclinks.FirebaseDynamicLinks;
import com.google.firebase.dynamiclinks.ShortDynamicLink;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;

View File

@ -1,17 +0,0 @@
package at.smartshopper.smartshopperapp.db;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
public class SerializableDatabase implements JsonSerializer<Database> {
@Override
public JsonElement serialize(Database src, Type typeOfSrc, JsonSerializationContext context) {
JsonObject object = new JsonObject();
return null;
}
}

View File

@ -84,14 +84,6 @@ public class MyFirebaseMessagingService extends FirebaseMessagingService {
NotificationManager notificationManager = NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
// Since android Oreo notification channel is needed.
//if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// NotificationChannel channel = new NotificationChannel(channelId,
// "Channel human readable title",
// NotificationManager.IMPORTANCE_DEFAULT);
// notificationManager.createNotificationChannel(channel);
//}
notificationManager.notify(0 /* ID of notification */, notificationBuilder.build()); notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());
} }
} }

View File

@ -43,13 +43,6 @@ public class MyFirebaseSender {
for (int i = 0; messageIds.size() > i; i++) { for (int i = 0; messageIds.size() > i; i++) {
try { try {
/*
firebaseMessaging.send(new RemoteMessage.Builder(R.string.firebase_sender_id + "@fcm.googleapis.com/fcm/")
.setMessageId(messageIds.get(i))
.addData("my_message", message)
.addData("LoginActivity", action)
.build());
*/
// Create a new HttpClient and Post Header // Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient(); HttpClient httpclient = new DefaultHttpClient();

View File

@ -134,7 +134,6 @@ public class ShoppinglistAdapter extends RecyclerView.Adapter<ShoppinglistAdapte
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }
// holder.imageView.setImageDrawable(Drawable.createFromPath("@drawable/common_google_signin_btn_icon_dark"));
// Check if user's email is verified // Check if user's email is verified

View File

@ -2,7 +2,6 @@ package at.smartshopper.smartshopperapp.shoppinglist;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
import android.net.Uri;
import android.support.v7.widget.CardView; import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -14,7 +13,6 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.squareup.picasso.Picasso; import com.squareup.picasso.Picasso;
import org.json.JSONException; import org.json.JSONException;

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -126,8 +125,9 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:clickable="true" android:clickable="true"
app:backgroundTint="@color/fui_linkColor" app:backgroundTint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/tabHost1" app:layout_constraintEnd_toEndOf="@+id/tabHost1"
app:rippleColor="@color/colorPrimaryDark"
app:srcCompat="@drawable/addoutline" /> app:srcCompat="@drawable/addoutline" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

View File

@ -21,10 +21,10 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:layout_margin="8dp"
android:id="@+id/itemListRefresh" android:id="@+id/itemListRefresh"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_margin="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
@ -144,8 +144,9 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:clickable="true" android:clickable="true"
android:src="@drawable/addoutline" android:src="@drawable/addoutline"
app:backgroundTint="@color/fui_linkColor" app:backgroundTint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent"
app:rippleColor="@color/colorPrimaryDark" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

View File

@ -35,9 +35,12 @@
android:id="@+id/email" android:id="@+id/email"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10" android:ems="10"
android:hint="Email" android:hint="Email"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
tools:layout_editor_absoluteX="33dp" tools:layout_editor_absoluteX="33dp"
tools:layout_editor_absoluteY="33dp" /> tools:layout_editor_absoluteY="33dp" />
</TableRow> </TableRow>
@ -51,11 +54,12 @@
android:id="@+id/password" android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:backgroundTint="@color/browser_actions_title_color"
android:layout_marginEnd="8dp"
android:ems="10" android:ems="10"
android:hint="Passwort" android:hint="Passwort"
android:inputType="textPassword" android:inputType="textPassword"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="232dp" /> tools:layout_editor_absoluteY="232dp" />
@ -69,11 +73,11 @@
<Button <Button
android:id="@+id/loginEmailBtn" android:id="@+id/loginEmailBtn"
style="@style/AppTheme" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/colorButton" android:text="Login Email"
android:text="Login Email" /> android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -86,7 +90,8 @@
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Mit Email Registrieren" /> android:text="Mit Email Registrieren"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
<TableRow <TableRow

View File

@ -35,9 +35,12 @@
android:id="@+id/nameregister" android:id="@+id/nameregister"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10" android:ems="10"
android:hint="Name" android:hint="Name"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
tools:layout_editor_absoluteX="33dp" tools:layout_editor_absoluteX="33dp"
tools:layout_editor_absoluteY="33dp" /> tools:layout_editor_absoluteY="33dp" />
</TableRow> </TableRow>
@ -51,9 +54,12 @@
android:id="@+id/emailregister" android:id="@+id/emailregister"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10" android:ems="10"
android:hint="Email" android:hint="Email"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
tools:layout_editor_absoluteX="33dp" tools:layout_editor_absoluteX="33dp"
tools:layout_editor_absoluteY="33dp" /> tools:layout_editor_absoluteY="33dp" />
</TableRow> </TableRow>
@ -67,11 +73,12 @@
android:id="@+id/passwordregister" android:id="@+id/passwordregister"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:backgroundTint="@color/browser_actions_title_color"
android:layout_marginEnd="8dp"
android:ems="10" android:ems="10"
android:hint="Passwort" android:hint="Passwort"
android:inputType="textPassword" android:inputType="textPassword"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="232dp" /> tools:layout_editor_absoluteY="232dp" />
@ -88,7 +95,8 @@
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Jetzt Registrieren" /> android:text="Jetzt Registrieren"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
@ -102,14 +110,15 @@
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Zurück zum Login" /> android:text="Zurück zum Login"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_horizontal"/> android:gravity="center_horizontal" />
</TableLayout> </TableLayout>

View File

@ -58,8 +58,9 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:clickable="true" android:clickable="true"
android:src="@drawable/addoutline" android:src="@drawable/addoutline"
app:backgroundTint="@color/fui_linkColor" app:backgroundTint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent"
app:rippleColor="@color/colorPrimaryDark" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardBackgroundColor="@color/colorPrimary"
app:cardElevation="4dp"> app:cardElevation="4dp">
<TableLayout <TableLayout
@ -35,22 +36,16 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <TextView
android:id="@+id/addgruppetitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center" android:text="Gruppe Bearbeiten"
android:orientation="vertical"> android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/addgruppetitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Gruppe Bearbeiten"
android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -58,25 +53,17 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <EditText
android:layout_width="match_parent" android:id="@+id/groupName"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:gravity="center" android:layout_height="wrap_content"
android:orientation="horizontal"> android:backgroundTint="@color/browser_actions_title_color"
android:ems="10"
android:hint="Name"
android:inputType="textPersonName"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:" />
<EditText
android:id="@+id/groupName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -84,20 +71,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <Button
android:id="@+id/groupColor"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center" android:backgroundTint="#00b7ff"
android:orientation="vertical"> android:text="Farbe Auswählen"
android:textColor="@color/colorPrimary" />
<Button
android:id="@+id/groupColor"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Farbe Auswählen" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -105,20 +87,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <Button
android:id="@+id/groupFinish"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center" android:backgroundTint="#00b7ff"
android:orientation="vertical"> android:text="Fertig"
android:textColor="@color/colorPrimary" />
<Button
android:id="@+id/groupFinish"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00b7ff"
android:text="Fertig" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp"> app:cardElevation="4dp">
@ -13,7 +14,8 @@
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="right"> android:gravity="right"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -28,54 +30,6 @@
android:background="@color/fui_transparent" android:background="@color/fui_transparent"
app:srcCompat="@drawable/close" /> app:srcCompat="@drawable/close" />
</LinearLayout> </LinearLayout>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/addItemTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Item Bearbeiten"
android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:" />
<EditText
android:id="@+id/itemName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName" />
</LinearLayout>
</TableRow> </TableRow>
@ -84,27 +38,52 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <TextView
android:id="@+id/addItemTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center" android:text="Item Bearbeiten"
android:orientation="horizontal"> android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
android:textStyle="bold" />
<TextView </TableRow>
android:id="@+id/textView6"
android:layout_width="wrap_content" <TableRow
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_weight="1" android:layout_height="match_parent"
android:text="Anzahl:" /> android:gravity="center">
<EditText
android:id="@+id/itemName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10"
android:hint="Name"
android:inputType="textPersonName"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<EditText
android:id="@+id/itemAnzahl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10"
android:hint="Anzahl"
android:inputType="number"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor" />
<EditText
android:id="@+id/itemAnzahl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="number" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -123,7 +102,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:text="Fertig" /> android:text="Fertig"
android:textColor="@color/colorPrimary" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View File

@ -5,6 +5,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardBackgroundColor="@color/colorPrimary"
app:cardElevation="4dp"> app:cardElevation="4dp">
<TableLayout <TableLayout
@ -15,7 +16,7 @@
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="right">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -45,6 +46,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Shared Link" android:text="Shared Link"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
</TableRow> </TableRow>
@ -58,11 +60,15 @@
android:id="@+id/shareLink" android:id="@+id/shareLink"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:editable="false" android:editable="false"
android:ems="10" android:ems="10"
android:inputType="textPersonName" android:hint="Shared Link"
android:text="Shared Link" android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
android:textIsSelectable="true" android:textIsSelectable="true"
android:inputType="textMultiLine"
android:singleLine="false"
tools:layout_editor_absoluteY="731dp" /> tools:layout_editor_absoluteY="731dp" />
</TableRow> </TableRow>
@ -81,15 +87,15 @@
</TableRow> </TableRow>
<!--<TableRow--> <!--<TableRow-->
<!--android:layout_width="match_parent"--> <!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"--> <!--android:layout_height="match_parent"-->
<!--android:gravity="center">--> <!--android:gravity="center">-->
<!--<Button--> <!--<Button-->
<!--android:id="@+id/shareCopy"--> <!--android:id="@+id/shareCopy"-->
<!--android:layout_width="wrap_content"--> <!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"--> <!--android:layout_height="wrap_content"-->
<!--android:text="In die zwischenablage kopieren" />--> <!--android:text="In die zwischenablage kopieren" />-->
<!--</TableRow>--> <!--</TableRow>-->
<TableRow <TableRow
@ -103,7 +109,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:text=" Share Aufheben" /> android:text=" Share Aufheben"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View File

@ -4,7 +4,11 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardElevation="4dp"> app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<TableLayout <TableLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -14,7 +18,7 @@
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="right">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -28,7 +32,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/fui_transparent" android:background="@color/fui_transparent"
app:srcCompat="@drawable/close" /> app:srcCompat="@drawable/close" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
@ -44,6 +47,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Hier den Invite Link eingeben:" android:text="Hier den Invite Link eingeben:"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
</TableRow> </TableRow>
@ -57,9 +61,14 @@
android:id="@+id/addShareLinkInput" android:id="@+id/addShareLinkInput"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10" android:ems="10"
android:textIsSelectable="true" android:hint="Invite Link"
android:inputType="textPersonName" /> android:inputType="textMultiLine"
android:singleLine="false"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
android:textIsSelectable="true" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -73,7 +82,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:text="Fertig" /> android:text="Fertig"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp" app:cardElevation="4dp"
app:cardPreventCornerOverlap="true" app:cardPreventCornerOverlap="true"
@ -15,7 +16,7 @@
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="right">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -31,6 +32,7 @@
android:background="@color/fui_transparent" android:background="@color/fui_transparent"
app:srcCompat="@drawable/close" /> app:srcCompat="@drawable/close" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -38,22 +40,16 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center"> android:gravity="center">
<LinearLayout <TextView
android:id="@+id/shoppinglisteAddTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center" android:text="Shoppingliste Hinzufügen"
android:orientation="vertical"> android:textAlignment="center"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/shoppinglisteAddTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Shoppingliste Hinzufügen"
android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</TableRow> </TableRow>
<TableRow <TableRow
@ -67,22 +63,19 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:id="@+id/nameTv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Name:" />
<EditText <EditText
android:id="@+id/addName" android:id="@+id/addName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:ems="10" android:backgroundTint="@color/browser_actions_title_color"
android:editable="true" android:editable="true"
android:textIsSelectable="true" android:ems="10"
android:inputType="textPersonName" /> android:hint="Name"
android:inputType="textPersonName"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
android:textIsSelectable="true" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
@ -97,22 +90,19 @@
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:id="@+id/descriptionTv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Beschreibung:" />
<EditText <EditText
android:id="@+id/addDescription" android:id="@+id/addDescription"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:backgroundTint="@color/browser_actions_title_color"
android:ems="10" android:ems="10"
android:editable="true" android:hint="Beschreibung"
android:textIsSelectable="true" android:inputType="textMultiLine"
android:inputType="textPersonName" /> android:singleLine="false"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
@ -134,7 +124,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:backgroundTintMode="src_atop" android:backgroundTintMode="src_atop"
android:text="Farbe auswählen" /> android:text="Farbe auswählen"
android:textColor="@color/colorPrimary" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
@ -155,7 +146,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:text="Fertig" /> android:text="Fertig"
android:textColor="@color/colorPrimary" />
</LinearLayout> </LinearLayout>
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View File

@ -2,7 +2,8 @@
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
app:cardBackgroundColor="@color/colorPrimary">
<TableLayout <TableLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -30,6 +31,22 @@
</TableRow> </TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shared Link"
android:textAlignment="center"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textSize="18sp"
android:textStyle="bold" />
</TableRow>
<TableRow <TableRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -39,9 +56,13 @@
android:id="@+id/linkausgabe" android:id="@+id/linkausgabe"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/browser_actions_title_color"
android:editable="false" android:editable="false"
android:ems="10" android:ems="10"
android:hint="Shared Link"
android:inputType="textPersonName" android:inputType="textPersonName"
android:textColor="@color/common_google_signin_btn_text_dark_focused"
android:textColorHint="@color/texthintcolor"
android:textIsSelectable="true" /> android:textIsSelectable="true" />
</TableRow> </TableRow>
@ -59,15 +80,15 @@
</TableRow> </TableRow>
<!--<TableRow--> <!--<TableRow-->
<!--android:layout_width="match_parent"--> <!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"--> <!--android:layout_height="match_parent"-->
<!--android:gravity="center">--> <!--android:gravity="center">-->
<!--<Button--> <!--<Button-->
<!--android:id="@+id/copyButton"--> <!--android:id="@+id/copyButton"-->
<!--android:layout_width="wrap_content"--> <!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"--> <!--android:layout_height="wrap_content"-->
<!--android:text="in die zwischenablage kopieren" />--> <!--android:text="in die zwischenablage kopieren" />-->
<!--</TableRow>--> <!--</TableRow>-->
<TableRow <TableRow
@ -81,7 +102,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="#00b7ff" android:backgroundTint="#00b7ff"
android:text="Listen Sharing beenden!" /> android:text="Listen Sharing beenden!"
android:textColor="@color/colorPrimary" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View File

@ -2,6 +2,6 @@
<resources> <resources>
<color name="colorPrimary">#FFFFFF</color> <color name="colorPrimary">#FFFFFF</color>
<color name="colorPrimaryDark">#176988</color> <color name="colorPrimaryDark">#176988</color>
<color name="colorAccent">#00b7ff</color> <color name="colorAccent">#00B7FF</color>
<color name="colorButton"></color> <color name="texthintcolor">#99999b</color>
</resources> </resources>

View File

@ -11,6 +11,8 @@
<item name="colorButtonNormal">@color/colorAccent</item> <item name="colorButtonNormal">@color/colorAccent</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item> <item name="colorControlHighlight">@color/colorPrimaryDark</item>
<item name="android:buttonStyle">@style/Widget.AppCompat.Button.Colored</item> <item name="android:buttonStyle">@style/Widget.AppCompat.Button.Colored</item>
<item name="android:popupBackground">@color/colorPrimary</item>
<item name="android:popupTheme">@style/AppTheme</item>
</style> </style>
<style name="popup_window_animation_phone"> <style name="popup_window_animation_phone">