From 847bbe2d5f40f4eae43d42cdd0a088a28164a9c5 Mon Sep 17 00:00:00 2001 From: kenkeiras Date: Tue, 23 Jan 2018 21:49:42 +0100 Subject: [PATCH] Remove backgroud color picker from create card menu. --- .../minicards/DeckPreviewActivity.java | 9 ++++----- app/src/main/res/layout/create_new_card_view.xml | 13 ++----------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java b/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java index 265f0b4..d688d3e 100644 --- a/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java +++ b/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java @@ -60,7 +60,6 @@ public class DeckPreviewActivity extends AppCompatActivity { .inflate(R.layout.create_new_card_view, null)); final EditText cardNameEditText = (EditText) openCardOptions.findViewById(R.id.card_name_edit_text); - final ColorPicker backgroundColorPicker = (ColorPicker) openCardOptions.findViewById(R.id.card_background_color_picker); builder.setTitle("Create a new card") .setView(openCardOptions) @@ -74,15 +73,15 @@ public class DeckPreviewActivity extends AppCompatActivity { public void onClick(DialogInterface dialog, int which) { CardFile cardfile = new CardFile(CardFile.getDefaultCardStorage(DeckPreviewActivity.this)); cardfile.setName(cardNameEditText.getText().toString()); - cardfile.setBackgroundColor(backgroundColorPicker.getColor()); + cardfile.setBackgroundColor(CardFile.DEFAULT_BACKGROUND_COLOR); try { cardfile.save(DeckPreviewActivity.this); } catch (IOException e) { Log.e("Minicards DeckPreview", "Error creating card "+ e, e); - Toast - .makeText(DeckPreviewActivity.this, "Error creating card " + e, Toast.LENGTH_LONG) - .show(); + Toast.makeText(DeckPreviewActivity.this, + "Error creating card " + e, + Toast.LENGTH_LONG).show(); return; } diff --git a/app/src/main/res/layout/create_new_card_view.xml b/app/src/main/res/layout/create_new_card_view.xml index a876fba..bca17af 100644 --- a/app/src/main/res/layout/create_new_card_view.xml +++ b/app/src/main/res/layout/create_new_card_view.xml @@ -7,6 +7,8 @@ android:layout_centerHorizontal="true"> @@ -27,15 +29,4 @@ android:layout_toRightOf="@id/card_name_text_view" android:text="My new card" /> - - - - - \ No newline at end of file