Fix Layout

Wegen dem Layout wurde es auf meinem Handy nicht angezeigt
This commit is contained in:
Georg Reisinger 2019-03-20 17:07:06 +01:00
parent a967c8748e
commit da56b912d4
19 changed files with 453 additions and 346 deletions

Binary file not shown.

View File

@ -27,16 +27,16 @@ dependencies {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.1.0' implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4' implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-core:16.0.6' implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-storage:16.0.5' implementation 'com.google.firebase:firebase-storage:16.1.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5' implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.google.android.gms:play-services-auth:16.0.1' implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0' implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation group: 'postgresql', name: 'postgresql', version: '9.1-901.jdbc4' implementation group: 'postgresql', name: 'postgresql', version: '9.1-901.jdbc4'
implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:swiperefreshlayout:28.0.0-alpha1' implementation 'com.android.support:swiperefreshlayout:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.danielnilsson9:color-picker-view:1.4.0@aar' implementation 'com.github.danielnilsson9:color-picker-view:1.4.0@aar'
implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0'

BIN
app/release/app-release.apk Normal file

Binary file not shown.

19
app/release/output.json Normal file
View File

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

View File

@ -37,14 +37,14 @@
--> -->
<meta-data <meta-data
android:name="com.google.firebase.messaging.default_notification_icon" android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_launcher_foreground" /> android:resource="@mipmap/ic_launcher_round" />
<!-- <!--
Set color used with incoming notification messages. This is used when no color is set for the incoming Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. notification message. See README(https://goo.gl/6BKBk7) for more.
--> -->
<meta-data <meta-data
android:name="com.google.firebase.messaging.default_notification_color" android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" /> <!-- [START firebase_service] --> android:resource="@color/colorPrimaryDark" /> <!-- [START firebase_service] -->
<service <service
android:name="at.smartshopper.smartshopperapp.messaging.MyFirebaseMessagingService" android:name="at.smartshopper.smartshopperapp.messaging.MyFirebaseMessagingService"
android:stopWithTask="false"> android:stopWithTask="false">

View File

@ -566,8 +566,7 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
e.printStackTrace(); e.printStackTrace();
} }
} } else if (i == 1) {
else if (i ==1) {
try { try {
showSharedShoppingList(uid); showSharedShoppingList(uid);
} catch (JSONException e) { } catch (JSONException e) {

View File

@ -50,15 +50,54 @@ import at.smartshopper.smartshopperapp.shoppinglist.Member;
public class EditUser extends Activity { public class EditUser extends Activity {
public static final int RequestPermissionCode = 1;
private final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
private EditText editname; private EditText editname;
private ImageView userbild; private ImageView userbild;
private Button finish, chooseImg; private Button finish, chooseImg;
private Database db; private Database db;
private final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
private Uri uri; private Uri uri;
private Intent CamIntent, GalIntent, CropIntent; private Intent CamIntent, GalIntent, CropIntent;
private File file; private File file;
public static final int RequestPermissionCode = 1;
public static void doRestart(Context c) {
try {
//check if the context is given
if (c != null) {
//fetch the packagemanager so we can get the default launch activity
// (you can replace this intent with any other activity if you want
PackageManager pm = c.getPackageManager();
//check if we got the PackageManager
if (pm != null) {
//create the intent with the default start activity for your application
Intent mStartActivity = pm.getLaunchIntentForPackage(
c.getPackageName()
);
if (mStartActivity != null) {
mStartActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//create a pending intent so the application is restarted after System.exit(0) was called.
// We use an AlarmManager to call this intent in 100ms
int mPendingIntentId = 223344;
PendingIntent mPendingIntent = PendingIntent
.getActivity(c, mPendingIntentId, mStartActivity,
PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager mgr = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, mPendingIntent);
//kill the application
System.exit(0);
} else {
Log.e("SmartShopper", "Was not able to restart application, mStartActivity null");
}
} else {
Log.e("SmartShopper", "Was not able to restart application, PM null");
}
} else {
Log.e("SmartShopper", "Was not able to restart application, Context null");
}
} catch (Exception ex) {
Log.e("SmartShopper", "Was not able to restart application");
}
}
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -128,45 +167,6 @@ public class EditUser extends Activity {
}); });
} }
public static void doRestart(Context c) {
try {
//check if the context is given
if (c != null) {
//fetch the packagemanager so we can get the default launch activity
// (you can replace this intent with any other activity if you want
PackageManager pm = c.getPackageManager();
//check if we got the PackageManager
if (pm != null) {
//create the intent with the default start activity for your application
Intent mStartActivity = pm.getLaunchIntentForPackage(
c.getPackageName()
);
if (mStartActivity != null) {
mStartActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//create a pending intent so the application is restarted after System.exit(0) was called.
// We use an AlarmManager to call this intent in 100ms
int mPendingIntentId = 223344;
PendingIntent mPendingIntent = PendingIntent
.getActivity(c, mPendingIntentId, mStartActivity,
PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager mgr = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, mPendingIntent);
//kill the application
System.exit(0);
} else {
Log.e("SmartShopper", "Was not able to restart application, mStartActivity null");
}
} else {
Log.e("SmartShopper", "Was not able to restart application, PM null");
}
} else {
Log.e("SmartShopper", "Was not able to restart application, Context null");
}
} catch (Exception ex) {
Log.e("SmartShopper", "Was not able to restart application");
}
}
public void ClickImageFromCamera() { public void ClickImageFromCamera() {
CamIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); CamIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

View File

@ -6,8 +6,8 @@ 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.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
@ -53,6 +53,15 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
private Button colorBtn; private Button colorBtn;
private SwipeRefreshLayout detailsSwiperefresh; private SwipeRefreshLayout detailsSwiperefresh;
/**
* Convertiert eine int farbe in eine hexa dezimale Farbe
*
* @param color Farbe zum umwandeln in int
* @return farbe als hex im string
*/
private static String colorToHexString(int color) {
return String.format("#%06X", 0xFFFFFFFF & color);
}
/** /**
* Menu item Action listener * Menu item Action listener
@ -105,16 +114,6 @@ public class ShoppinglistDetails extends AppCompatActivity implements DetailsAda
startActivity(intent); startActivity(intent);
} }
/**
* Convertiert eine int farbe in eine hexa dezimale Farbe
*
* @param color Farbe zum umwandeln in int
* @return farbe als hex im string
*/
private static String colorToHexString(int color) {
return String.format("#%06X", 0xFFFFFFFF & color);
}
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
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.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -72,11 +73,14 @@ public class ShoppinglistAdapter extends RecyclerView.Adapter<ShoppinglistAdapte
final Shoppinglist shoppinglist = this.shoppinglist.get(position); final Shoppinglist shoppinglist = this.shoppinglist.get(position);
final ImageButton shareButton = holder.share; final ImageButton shareButton = holder.share;
TextView beschreibung = holder.textViewBeschreibung; TextView beschreibung = holder.textViewBeschreibung;
ImageButton bearbeiten = holder.bearbeiten;
ImageButton delete = holder.del;
beschreibung.setText(shoppinglist.getdescription()); beschreibung.setText(shoppinglist.getdescription());
Picasso.get().load(R.drawable.share).into(shareButton); Picasso.get().load(R.drawable.share).into(shareButton);
Picasso.get().load(R.drawable.bearbeiten).into(holder.bearbeiten); Picasso.get().load(R.drawable.bearbeiten).into(bearbeiten);
Picasso.get().load(R.drawable.delete).into(holder.del); Picasso.get().load(R.drawable.delete).into(delete);
//binding the data with the viewholder views //binding the data with the viewholder views
holder.textViewTitle.setText(shoppinglist.getname()); holder.textViewTitle.setText(shoppinglist.getname());
@ -121,7 +125,6 @@ public class ShoppinglistAdapter extends RecyclerView.Adapter<ShoppinglistAdapte
String uid = FirebaseAuth.getInstance().getUid(); String uid = FirebaseAuth.getInstance().getUid();
try { try {
Member user = db.getUser(uid); Member user = db.getUser(uid);
holder.ownerName.setText(user.getName()); holder.ownerName.setText(user.getName());
@ -141,9 +144,6 @@ String uid = FirebaseAuth.getInstance().getUid();
} }
/** /**
* Holt die anzahl der items in dem Adapter * Holt die anzahl der items in dem Adapter
* *
@ -226,7 +226,8 @@ String uid = FirebaseAuth.getInstance().getUid();
TextView textViewTitle, textViewBeschreibung, ownerName; TextView textViewTitle, textViewBeschreibung, ownerName;
ImageView imageView; ImageView imageView;
CardView ownList; CardView ownList;
ImageButton bearbeiten, del, share; ImageButton del, share;
ImageButton bearbeiten;
View shoppinglistColor; View shoppinglistColor;
public ShoppinglistViewHolder(View itemView) { public ShoppinglistViewHolder(View itemView) {
@ -237,10 +238,11 @@ String uid = FirebaseAuth.getInstance().getUid();
imageView = itemView.findViewById(R.id.shoppinglistOwner); imageView = itemView.findViewById(R.id.shoppinglistOwner);
ownerName = itemView.findViewById(R.id.ownerName); ownerName = itemView.findViewById(R.id.ownerName);
ownList = itemView.findViewById(R.id.ownLists); ownList = itemView.findViewById(R.id.ownLists);
bearbeiten = itemView.findViewById(R.id.bearbeiteShoppinglist); bearbeiten = itemView.findViewById(R.id.shpEdit);
del = itemView.findViewById(R.id.deleteShoppinglist); Log.d("SmartShopper", bearbeiten.toString());
del = itemView.findViewById(R.id.shpDel);
shoppinglistColor = itemView.findViewById(R.id.shoppinglistColor); shoppinglistColor = itemView.findViewById(R.id.shoppinglistColor);
share = itemView.findViewById(R.id.shareButton); share = itemView.findViewById(R.id.shareEditButton);
} }

View File

@ -77,6 +77,8 @@ public class ShoppinglistSharedAdapter extends RecyclerView.Adapter<Shoppinglist
beschreibung.setText(shoppinglist.getdescription()); beschreibung.setText(shoppinglist.getdescription());
Picasso.get().load(R.drawable.share).into(shareButton); Picasso.get().load(R.drawable.share).into(shareButton);
Picasso.get().load(R.drawable.bearbeiten).into(holder.bearbeiten);
//binding the data with the viewholder views //binding the data with the viewholder views
holder.textViewTitle.setText(shoppinglist.getname()); holder.textViewTitle.setText(shoppinglist.getname());
System.out.println(shoppinglist.getname()); System.out.println(shoppinglist.getname());

View File

@ -13,11 +13,10 @@
<!-- This rectangle for the top arrow edge --> <!-- This rectangle for the top arrow edge -->
<!-- Its color should be the same as the layout's background --> <!-- Its color should be the same as the layout's background -->
<item <item
android:top="-40dp"
android:bottom="65dp" android:bottom="65dp"
android:right="-30dp"> android:right="-30dp"
<rotate android:top="-40dp">
android:fromDegrees="45"> <rotate android:fromDegrees="45">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="#ffffff" /> <solid android:color="#ffffff" />
</shape> </shape>
@ -26,11 +25,10 @@
<!-- This rectangle for the lower arrow edge --> <!-- This rectangle for the lower arrow edge -->
<!-- Its color should be the same as the layout's background --> <!-- Its color should be the same as the layout's background -->
<item <item
android:top="65dp"
android:bottom="-40dp" android:bottom="-40dp"
android:right="-30dp"> android:right="-30dp"
<rotate android:top="65dp">
android:fromDegrees="-45"> <rotate android:fromDegrees="-45">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="#ffffff" /> <solid android:color="#ffffff" />
</shape> </shape>

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">

View File

@ -9,13 +9,23 @@
card_view:cardElevation="4dp" card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"> card_view:cardUseCompatPadding="true">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<android.support.constraint.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="118dp" />
<android.support.constraint.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="32dp" />
<View <View
android:id="@+id/shoppinglistColor" android:id="@+id/shoppinglistColor"
@ -31,9 +41,18 @@
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent" /> card_view:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline6"
card_view:layout_constraintStart_toStartOf="@+id/guideline4"
card_view:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:id="@+id/linearLayout2" android:id="@+id/linearLayout2"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
@ -41,131 +60,159 @@
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintStart_toStartOf="@+id/guideline4" card_view:layout_constraintTop_toTopOf="parent">
card_view:layout_constraintTop_toTopOf="parent"
card_view:layout_constraintVertical_bias="0.436">
<ImageView <ImageView
android:id="@+id/shoppinglistOwner" android:id="@+id/shoppinglistOwner"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/common_google_signin_btn_icon_dark"
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent" card_view:layout_constraintTop_toTopOf="parent" />
tools:srcCompat="@drawable/common_google_signin_btn_icon_dark" />
<TextView <TextView
android:id="@+id/ownerName" android:id="@+id/ownerName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="OwnerName" android:text="OwnerName"
android:textSize="10sp" android:textSize="12sp"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistOwner" /> card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistOwner" />
</LinearLayout> </LinearLayout>
<android.support.constraint.Guideline </android.support.constraint.ConstraintLayout>
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="111dp" />
<LinearLayout <TableLayout
android:id="@+id/linearLayout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline2"
card_view:layout_constraintStart_toStartOf="@+id/guideline"
card_view:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/shoppinglistName"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:text="Name" android:gravity="fill"
android:textSize="18sp" card_view:layout_constraintBottom_toBottomOf="parent"
android:textStyle="bold"
card_view:layout_constraintEnd_toEndOf="parent" card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toEndOf="@+id/shoppinglistOwner" card_view:layout_constraintStart_toStartOf="@+id/guideline6"
card_view:layout_constraintTop_toTopOf="parent" /> card_view:layout_constraintTop_toTopOf="parent">
<TextView <TableRow
android:id="@+id/shoppinglistBeschreibung" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/shareEditButton"
android:layout_width="@dimen/buttonSize"
android:layout_height="@dimen/buttonSize"
android:layout_marginStart="8dp"
android:background="@color/fui_transparent"
android:contentDescription="Share Button"
android:scaleType="fitXY"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent"
card_view:srcCompat="@drawable/share" />
<ImageButton
android:id="@+id/shpEdit"
android:layout_width="@dimen/buttonSize"
android:layout_height="@dimen/buttonSize"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@color/fui_transparent"
android:contentDescription="Edit Button"
android:scaleType="fitXY"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/shpDel"
card_view:layout_constraintStart_toEndOf="@+id/shareEditButton"
card_view:layout_constraintTop_toTopOf="parent"
card_view:srcCompat="@drawable/bearbeiten"
tools:srcCompat="@drawable/bearbeiten" />
<ImageButton
android:id="@+id/shpDel"
android:layout_width="@dimen/buttonSize"
android:layout_height="@dimen/buttonSize"
android:background="@color/fui_transparent"
android:contentDescription="Delete Button"
android:scaleType="fitXY"
android:src="@drawable/delete"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/delete" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:text="Beschreibung"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent" card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toEndOf="@+id/shoppinglistOwner" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistName" />
</LinearLayout>
<android.support.constraint.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="319dp" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:gravity="right|top"
android:orientation="horizontal"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="@+id/guideline2"
card_view:layout_constraintTop_toTopOf="parent"> card_view:layout_constraintTop_toTopOf="parent">
<ImageButton <TextView
android:id="@+id/shareButton" android:id="@+id/shoppinglistBeschreibung"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/fui_transparent" android:layout_marginStart="8dp"
card_view:srcCompat="@drawable/share" /> android:layout_marginEnd="8dp"
android:text="Beschreibung"
android:textAlignment="center"
android:textSize="18sp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="parent" />
<ImageButton <TextView
android:id="@+id/bearbeiteShoppinglist" android:id="@+id/shoppinglistName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/fui_transparent" android:layout_marginStart="8dp"
card_view:srcCompat="@drawable/bearbeiten" /> android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
<ImageButton android:text="Name"
android:id="@+id/deleteShoppinglist" android:textAlignment="center"
android:layout_width="wrap_content" android:textSize="30sp"
android:layout_height="wrap_content" android:textStyle="bold"
android:background="@color/fui_transparent" card_view:layout_constraintBottom_toTopOf="@+id/shoppinglistBeschreibung"
card_view:srcCompat="@drawable/delete" /> card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="parent"
</LinearLayout> card_view:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="32dp" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</TableRow> </TableRow>
</TableLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>

View File

@ -9,13 +9,23 @@
card_view:cardElevation="4dp" card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"> card_view:cardUseCompatPadding="true">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<android.support.constraint.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="118dp" />
<android.support.constraint.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="32dp" />
<View <View
android:id="@+id/shoppinglistColor" android:id="@+id/shoppinglistColor"
@ -31,9 +41,18 @@
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent" /> card_view:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline6"
card_view:layout_constraintStart_toStartOf="@+id/guideline4"
card_view:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:id="@+id/linearLayout2" android:id="@+id/linearLayout2"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
@ -41,124 +60,146 @@
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintStart_toStartOf="@+id/guideline4" card_view:layout_constraintTop_toTopOf="parent">
card_view:layout_constraintTop_toTopOf="parent"
card_view:layout_constraintVertical_bias="0.436">
<ImageView <ImageView
android:id="@+id/shoppinglistOwner" android:id="@+id/shoppinglistOwner"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/common_google_signin_btn_icon_dark"
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent" card_view:layout_constraintTop_toTopOf="parent" />
tools:srcCompat="@drawable/common_google_signin_btn_icon_dark" />
<TextView <TextView
android:id="@+id/ownerName" android:id="@+id/ownerName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="OwnerName" android:text="OwnerName"
android:textSize="10sp" android:textSize="12sp"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintStart_toStartOf="parent" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistOwner" /> card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistOwner" />
</LinearLayout> </LinearLayout>
<android.support.constraint.Guideline </android.support.constraint.ConstraintLayout>
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="111dp" />
<LinearLayout <TableLayout
android:id="@+id/linearLayout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toStartOf="@+id/guideline2"
card_view:layout_constraintStart_toStartOf="@+id/guideline"
card_view:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/shoppinglistName"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:text="Name" android:gravity="fill"
android:textSize="18sp" card_view:layout_constraintBottom_toBottomOf="parent"
android:textStyle="bold"
card_view:layout_constraintEnd_toEndOf="parent" card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toEndOf="@+id/shoppinglistOwner" card_view:layout_constraintStart_toStartOf="@+id/guideline6"
card_view:layout_constraintTop_toTopOf="parent" /> card_view:layout_constraintTop_toTopOf="parent">
<TextView <TableRow
android:id="@+id/shoppinglistBeschreibung" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<android.support.constraint.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/shareEditButton"
android:layout_width="@dimen/buttonSize"
android:layout_height="@dimen/buttonSize"
android:layout_marginStart="8dp"
android:background="@color/fui_transparent"
android:contentDescription="Share Button"
android:scaleType="fitXY"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent"
card_view:srcCompat="@drawable/share" />
<ImageButton
android:id="@+id/bearbeiteShoppinglist"
android:layout_width="@dimen/buttonSize"
android:layout_height="@dimen/buttonSize"
android:layout_marginStart="8dp"
android:background="@color/fui_transparent"
android:contentDescription="Edit Button"
android:scaleType="fitXY"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toEndOf="@+id/shareEditButton"
card_view:layout_constraintTop_toTopOf="parent"
card_view:srcCompat="@drawable/bearbeiten"
tools:srcCompat="@drawable/bearbeiten" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:text="Beschreibung"
card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent" card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toEndOf="@+id/shoppinglistOwner" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toBottomOf="@+id/shoppinglistName" />
</LinearLayout>
<android.support.constraint.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
card_view:layout_constraintGuide_begin="319dp" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:gravity="right|top"
android:orientation="horizontal"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="@+id/guideline2"
card_view:layout_constraintTop_toTopOf="parent"> card_view:layout_constraintTop_toTopOf="parent">
<ImageButton <TextView
android:id="@+id/shareEditButton" android:id="@+id/shoppinglistBeschreibung"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/fui_transparent" android:layout_marginStart="8dp"
card_view:srcCompat="@drawable/share" /> android:layout_marginEnd="8dp"
android:text="Beschreibung"
android:textAlignment="center"
android:textSize="18sp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="parent" />
<ImageButton <TextView
android:id="@+id/bearbeiteShoppinglist" android:id="@+id/shoppinglistName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/fui_transparent" android:layout_marginStart="8dp"
card_view:srcCompat="@drawable/bearbeiten" /> android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
</LinearLayout> android:text="Name"
android:textAlignment="center"
<android.support.constraint.Guideline android:textSize="30sp"
android:id="@+id/guideline4" android:textStyle="bold"
android:layout_width="wrap_content" card_view:layout_constraintBottom_toTopOf="@+id/shoppinglistBeschreibung"
android:layout_height="wrap_content" card_view:layout_constraintEnd_toEndOf="parent"
android:orientation="vertical" card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintGuide_begin="32dp" /> card_view:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</TableRow> </TableRow>
</TableLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>

View File

@ -1,4 +1,5 @@
<resources> <resources>
<dimen name="fab_margin">16dp</dimen> <dimen name="fab_margin">16dp</dimen>
<dimen name="item_spacing">8dp</dimen> <dimen name="item_spacing">8dp</dimen>
<dimen name="buttonSize">40dp</dimen>
</resources> </resources>