Merge branch 'feature/dark-theme' into dev

pull/84/head
Alinson S. Xavier 10 years ago
commit b601a643dd

@ -9,7 +9,7 @@ android {
minSdkVersion 15
targetSdkVersion 23
buildConfigField "Integer", "databaseVersion", "13"
buildConfigField "Integer", "databaseVersion", "14"
buildConfigField "String", "databaseFilename", "\"uhabits.db\""
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

@ -23,7 +23,6 @@ import android.content.Context;
import android.support.annotation.Nullable;
import android.util.Log;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
@ -66,7 +65,7 @@ public class HabitFixtures
Habit habit = new Habit();
habit.name = "Meditate";
habit.description = "Did you meditate this morning?";
habit.color = ColorHelper.palette[3];
habit.color = 3;
habit.freqNum = 1;
habit.freqDen = 1;
habit.save();
@ -78,7 +77,7 @@ public class HabitFixtures
Habit habit = createEmptyHabit();
habit.freqNum = 3;
habit.freqDen = 7;
habit.color = ColorHelper.palette[4];
habit.color = 4;
habit.save();
long day = DateHelper.millisecondsInOneDay;

@ -24,7 +24,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.ChangeHabitColorCommand;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
@ -53,12 +52,12 @@ public class ChangeHabitColorCommandTest extends BaseTest
for(int i = 0; i < 3; i ++)
{
Habit habit = HabitFixtures.createShortHabit();
habit.color = ColorHelper.palette[i+1];
habit.color = i+1;
habit.save();
habits.add(habit);
}
command = new ChangeHabitColorCommand(habits, ColorHelper.palette[0]);
command = new ChangeHabitColorCommand(habits, 0);
}
@Test
@ -80,12 +79,12 @@ public class ChangeHabitColorCommandTest extends BaseTest
{
int k = 0;
for(Habit h : habits)
assertThat(h.color, equalTo(ColorHelper.palette[++k]));
assertThat(h.color, equalTo(++k));
}
private void checkNewColors()
{
for(Habit h : habits)
assertThat(h.color, equalTo(ColorHelper.palette[0]));
assertThat(h.color, equalTo(0));
}
}

@ -19,7 +19,6 @@
package org.isoron.uhabits.unit.models;
import android.graphics.Color;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
@ -78,7 +77,7 @@ public class HabitTest extends BaseTest
Habit model = new Habit();
model.archived = 1;
model.highlight = 1;
model.color = Color.BLACK;
model.color = 0;
model.freqNum = 10;
model.freqDen = 20;
model.reminderDays = 1;

@ -23,7 +23,6 @@ import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.views.NumberView;
import org.junit.Before;
import org.junit.Test;
@ -45,7 +44,7 @@ public class NumberViewTest extends ViewTest
view = new NumberView(targetContext);
view.setLabel("Hello world");
view.setNumber(31);
view.setColor(ColorHelper.palette[0]);
view.setColor(0);
measureView(dpToPixels(100), dpToPixels(100), view);
}
@ -68,7 +67,7 @@ public class NumberViewTest extends ViewTest
public void testRender_withDifferentParams() throws IOException
{
view.setNumber(500);
view.setColor(ColorHelper.palette[5]);
view.setColor(5);
view.setTextSize(targetContext.getResources().getDimension(R.dimen.tinyTextSize));
measureView(dpToPixels(200), dpToPixels(200), view);

@ -22,7 +22,6 @@ package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.views.RingView;
import org.junit.Before;
import org.junit.Test;
@ -44,7 +43,7 @@ public class RingViewTest extends ViewTest
view = new RingView(targetContext);
view.setLabel("Hello world");
view.setPercentage(0.6f);
view.setColor(ColorHelper.palette[0]);
view.setColor(0);
view.setMaxDiameter(dpToPixels(100));
}
@ -70,7 +69,7 @@ public class RingViewTest extends ViewTest
view.setLabel("Habit Strength");
view.setPercentage(0.25f);
view.setMaxDiameter(dpToPixels(50));
view.setColor(ColorHelper.palette[5]);
view.setColor(5);
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "RingView/renderDifferentParams.png");

@ -0,0 +1,14 @@
update habits set color=0 where color=-2937041;
update habits set color=1 where color=-1684967;
update habits set color=2 where color=-415707;
update habits set color=3 where color=-5262293;
update habits set color=4 where color=-13070788;
update habits set color=5 where color=-16742021;
update habits set color=6 where color=-16732991;
update habits set color=7 where color=-16540699;
update habits set color=8 where color=-10603087;
update habits set color=9 where color=-7461718;
update habits set color=10 where color=-2614432;
update habits set color=11 where color=-13619152;
update habits set color=12 where color=-5592406;
update habits set color=0 where color<0 or color>12;

@ -19,6 +19,7 @@
package org.isoron.uhabits;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
@ -29,6 +30,7 @@ import android.view.View;
import android.widget.TextView;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.UIHelper;
public class AboutActivity extends Activity implements View.OnClickListener
{
@ -37,13 +39,16 @@ public class AboutActivity extends Activity implements View.OnClickListener
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
UIHelper.applyCurrentTheme(this);
setContentView(R.layout.about);
if (android.os.Build.VERSION.SDK_INT >= 21)
if (android.os.Build.VERSION.SDK_INT >= 21 && !UIHelper.isNightMode())
{
int color = getResources().getColor(R.color.blue_700);
int color = UIHelper.getStyledColor(this, R.attr.aboutScreenColor);
int darkerColor = ColorHelper.mixColors(color, Color.BLACK, 0.75f);
getActionBar().setBackgroundDrawable(new ColorDrawable(color));
ActionBar actionBar = getActionBar();
if(actionBar != null) actionBar.setBackgroundDrawable(new ColorDrawable(color));
getWindow().setStatusBarColor(darkerColor);
}

@ -26,6 +26,7 @@ import android.os.Bundle;
import android.widget.Toast;
import org.isoron.uhabits.commands.Command;
import org.isoron.uhabits.helpers.UIHelper;
import java.util.LinkedList;
@ -44,6 +45,8 @@ abstract public class BaseActivity extends Activity implements Thread.UncaughtEx
{
super.onCreate(savedInstanceState);
UIHelper.applyCurrentTheme(this);
androidExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(this);

@ -30,16 +30,17 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.view.Menu;
import android.view.MenuItem;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.fragments.ListHabitsFragment;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.ReminderHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.BaseTask;
import org.isoron.uhabits.widgets.CheckmarkWidgetProvider;
@ -70,6 +71,7 @@ public class MainActivity extends BaseActivity
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.list_habits_activity);
prefs = PreferenceManager.getDefaultSharedPreferences(this);
@ -122,6 +124,10 @@ public class MainActivity extends BaseActivity
public boolean onCreateOptionsMenu(Menu menu)
{
getMenuInflater().inflate(R.menu.list_habits_menu, menu);
MenuItem nightModeItem = menu.findItem(R.id.action_night_mode);
nightModeItem.setChecked(UIHelper.isNightMode());
return true;
}
@ -130,6 +136,17 @@ public class MainActivity extends BaseActivity
{
switch (item.getItemId())
{
case R.id.action_night_mode:
{
if(UIHelper.isNightMode())
UIHelper.setCurrentTheme(UIHelper.THEME_LIGHT);
else
UIHelper.setCurrentTheme(UIHelper.THEME_DARK);
refreshTheme();
return true;
}
case R.id.action_settings:
{
Intent intent = new Intent(this, SettingsActivity.class);
@ -158,6 +175,23 @@ public class MainActivity extends BaseActivity
}
}
private void refreshTheme()
{
new Handler().postDelayed(new Runnable()
{
@Override
public void run()
{
Intent intent = new Intent(MainActivity.this, MainActivity.class);
MainActivity.this.finish();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
startActivity(intent);
}
}, 500); // Let the menu disappear first
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{

@ -23,6 +23,7 @@ import android.app.Activity;
import android.os.Bundle;
import org.isoron.uhabits.fragments.SettingsFragment;
import org.isoron.uhabits.helpers.UIHelper;
public class SettingsActivity extends Activity
{
@ -30,6 +31,9 @@ public class SettingsActivity extends Activity
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
UIHelper.applyCurrentTheme(this);
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();

@ -21,10 +21,13 @@ package org.isoron.uhabits;
import android.app.ActionBar;
import android.content.ContentUris;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
public class ShowHabitActivity extends BaseActivity
@ -43,8 +46,18 @@ public class ShowHabitActivity extends BaseActivity
if(actionBar != null && getHabit() != null)
{
actionBar.setTitle(getHabit().name);
if (android.os.Build.VERSION.SDK_INT >= 21)
actionBar.setBackgroundDrawable(new ColorDrawable(getHabit().color));
if (android.os.Build.VERSION.SDK_INT >= 21 &&
UIHelper.getStyledBoolean(this, R.attr.useHabitColorAsPrimary))
{
int androidColor = ColorHelper.getColor(this, getHabit().color);
ColorDrawable drawable = new ColorDrawable(androidColor);
actionBar.setBackgroundDrawable(drawable);
int color = ColorHelper.getColor(this, habit.color);
int darkerHabitColor = ColorHelper.mixColors(color, Color.BLACK, 0.75f);
getWindow().setStatusBarColor(darkerHabitColor);
}
}
setContentView(R.layout.show_habit_activity);

@ -40,14 +40,14 @@ import com.android.colorpicker.ColorPickerSwatch;
import com.android.datetimepicker.time.RadialPickerLayout;
import com.android.datetimepicker.time.TimePickerDialog;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper.OnSavedListener;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.Command;
import org.isoron.uhabits.commands.CreateHabitCommand;
import org.isoron.uhabits.commands.EditHabitCommand;
import org.isoron.uhabits.dialogs.WeekdayPickerDialog;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper.OnSavedListener;
import org.isoron.uhabits.models.Habit;
import java.util.Arrays;
@ -138,7 +138,7 @@ public class EditHabitFragment extends DialogFragment
modifiedHabit = new Habit();
modifiedHabit.freqNum = 1;
modifiedHabit.freqDen = 1;
modifiedHabit.color = prefs.getInt("pref_default_habit_color", modifiedHabit.color);
modifiedHabit.color = prefs.getInt("pref_default_habit_palette_color", modifiedHabit.color);
}
else if (mode == EDIT_MODE)
{
@ -174,13 +174,13 @@ public class EditHabitFragment extends DialogFragment
return view;
}
private void changeColor(Integer color)
private void changeColor(int paletteColor)
{
modifiedHabit.color = color;
tvName.setTextColor(color);
modifiedHabit.color = paletteColor;
tvName.setTextColor(ColorHelper.getColor(getActivity(), paletteColor));
SharedPreferences.Editor editor = prefs.edit();
editor.putInt("pref_default_habit_color", color);
editor.putInt("pref_default_habit_palette_color", paletteColor);
editor.apply();
}
@ -237,15 +237,18 @@ public class EditHabitFragment extends DialogFragment
private void onColorButtonClick()
{
int originalAndroidColor = ColorHelper.getColor(getActivity(), modifiedHabit.color);
ColorPickerDialog picker = ColorPickerDialog.newInstance(
R.string.color_picker_default_title, ColorHelper.palette, modifiedHabit.color, 4,
ColorPickerDialog.SIZE_SMALL);
R.string.color_picker_default_title, ColorHelper.getPalette(getActivity()),
originalAndroidColor, 4, ColorPickerDialog.SIZE_SMALL);
picker.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener()
{
public void onColorSelected(int color)
public void onColorSelected(int androidColor)
{
changeColor(color);
int paletteColor = ColorHelper.colorToPaletteIndex(getActivity(), androidColor);
changeColor(paletteColor);
}
});
picker.show(getFragmentManager(), "picker");

@ -24,11 +24,9 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.ListHabitsHelper;
import org.isoron.uhabits.loaders.HabitListLoader;
import org.isoron.uhabits.models.Habit;
@ -74,28 +72,15 @@ class HabitListAdapter extends BaseAdapter
public View getView(int position, View view, ViewGroup parent)
{
final Habit habit = loader.habitsList.get(position);
boolean selected = selectedPositions.contains(position);
if (view == null || (Long) view.getTag(R.id.timestamp_key) != DateHelper.getStartOfToday())
{
view = inflater.inflate(R.layout.list_habits_item, null);
helper.initializeLabelAndIcon(view);
helper.inflateCheckmarkButtons(view, onCheckmarkLongClickListener,
onCheckmarkClickListener, inflater);
view = helper.inflateHabitCard(inflater, onCheckmarkLongClickListener,
onCheckmarkClickListener);
}
TextView tvStar = ((TextView) view.findViewById(R.id.tvStar));
TextView tvName = (TextView) view.findViewById(R.id.label);
LinearLayout llInner = (LinearLayout) view.findViewById(R.id.llInner);
LinearLayout llButtons = (LinearLayout) view.findViewById(R.id.llButtons);
llInner.setTag(R.string.habit_key, habit.getId());
helper.updateNameAndIcon(habit, tvStar, tvName);
helper.updateCheckmarkButtons(habit, llButtons);
boolean selected = selectedPositions.contains(position);
helper.updateHabitBackground(llInner, selected);
helper.updateHabitCard(view, habit, selected);
return view;
}

@ -29,8 +29,8 @@ import android.widget.ProgressBar;
import com.android.colorpicker.ColorPickerDialog;
import com.android.colorpicker.ColorPickerSwatch;
import org.isoron.uhabits.R;
import org.isoron.uhabits.BaseActivity;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.ArchiveHabitsCommand;
import org.isoron.uhabits.commands.ChangeHabitColorCommand;
import org.isoron.uhabits.commands.DeleteHabitsCommand;
@ -163,15 +163,20 @@ public class HabitSelectionCallback implements ActionMode.Callback
case R.id.action_color:
{
ColorPickerDialog picker = ColorPickerDialog.newInstance(R.string.color_picker_default_title,
ColorHelper.palette, firstHabit.color, 4, ColorPickerDialog.SIZE_SMALL);
int originalAndroidColor = ColorHelper.getColor(activity, firstHabit.color);
ColorPickerDialog picker = ColorPickerDialog.newInstance(
R.string.color_picker_default_title, ColorHelper.getPalette(activity),
originalAndroidColor, 4, ColorPickerDialog.SIZE_SMALL);
picker.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener()
{
public void onColorSelected(int color)
public void onColorSelected(int androidColor)
{
activity.executeCommand(
new ChangeHabitColorCommand(selectedHabits, color), null);
int paletteColor = ColorHelper.colorToPaletteIndex(activity,
androidColor);
activity.executeCommand(new ChangeHabitColorCommand(selectedHabits,
paletteColor), null);
mode.finish();
}
});

@ -21,7 +21,6 @@ package org.isoron.uhabits.fragments;
import android.app.Fragment;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
@ -163,20 +162,13 @@ public class ShowHabitFragment extends Fragment
float percentage = todayValue / Score.MAX_VALUE;
RingView scoreRing = (RingView) view.findViewById(R.id.scoreRing);
scoreRing.setColor(habit.color);
int androidColor = ColorHelper.getColor(getActivity(), habit.color);
scoreRing.setColor(androidColor);
scoreRing.setPercentage(percentage);
}
private void updateHeaders(View view)
{
if(habit == null | activity == null) return;
if (android.os.Build.VERSION.SDK_INT >= 21)
{
int darkerHabitColor = ColorHelper.mixColors(habit.color, Color.BLACK, 0.75f);
activity.getWindow().setStatusBarColor(darkerHabitColor);
}
updateColor(view, R.id.tvHistory);
updateColor(view, R.id.tvOverview);
updateColor(view, R.id.tvStrength);
@ -186,10 +178,11 @@ public class ShowHabitFragment extends Fragment
private void updateColor(View view, int viewId)
{
if(habit == null) return;
if(habit == null || activity == null) return;
TextView textView = (TextView) view.findViewById(viewId);
textView.setTextColor(habit.color);
int androidColor = ColorHelper.getColor(activity, habit.color);
textView.setTextColor(androidColor);
}
@Override

@ -19,11 +19,14 @@
package org.isoron.uhabits.helpers;
import android.content.Context;
import android.graphics.Color;
import org.isoron.uhabits.R;
public class ColorHelper
{
public static final int[] palette =
public static int CSV_PALETTE[] =
{
Color.parseColor("#D32F2F"), // red
Color.parseColor("#E64A19"), // orange
@ -40,6 +43,35 @@ public class ColorHelper
Color.parseColor("#aaaaaa") // light grey
};
public static int colorToPaletteIndex(Context context, int color)
{
int[] palette = getPalette(context);
for(int k = 0; k < palette.length; k++)
if(palette[k] == color) return k;
return -1;
}
public static int[] getPalette(Context context)
{
int resourceId = UIHelper.getStyleResource(context, R.attr.palette);
if(resourceId < 0) return CSV_PALETTE;
return context.getResources().getIntArray(resourceId);
}
public static int getColor(Context context, int paletteColor)
{
if(context == null) throw new IllegalArgumentException("Context is null");
int palette[] = getPalette(context);
if(paletteColor < 0 || paletteColor >= palette.length)
throw new IllegalArgumentException(String.format("Invalid color: %d", paletteColor));
return palette[paletteColor];
}
public static int mixColors(int color1, int color2, float amount)
{
final byte ALPHA_CHANNEL = 24;

@ -20,13 +20,12 @@
package org.isoron.uhabits.helpers;
import android.content.Context;
import android.graphics.Color;
import android.graphics.Typeface;
import android.util.DisplayMetrics;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
@ -39,8 +38,8 @@ import java.util.GregorianCalendar;
public class ListHabitsHelper
{
public static final int INACTIVE_COLOR = Color.rgb(200, 200, 200);
public static final int INACTIVE_CHECKMARK_COLOR = Color.rgb(230, 230, 230);
private final int lowContrastColor;
private final int mediumContrastColor;
private final Context context;
private final HabitListLoader loader;
@ -51,6 +50,8 @@ public class ListHabitsHelper
this.context = context;
this.loader = loader;
lowContrastColor = UIHelper.getStyledColor(context, R.attr.lowContrastTextColor);
mediumContrastColor = UIHelper.getStyledColor(context, R.attr.mediumContrastTextColor);
fontawesome = Typeface.createFromAsset(context.getAssets(), "fontawesome-webfont.ttf");
}
@ -61,16 +62,18 @@ public class ListHabitsHelper
public int getButtonCount()
{
DisplayMetrics dm = context.getResources().getDisplayMetrics();
int width = (int) (dm.widthPixels / dm.density);
return Math.max(0, (int) ((width - 160) / 42.0));
float screenWidth = UIHelper.getScreenWidth(context);
float labelWidth = context.getResources().getDimension(R.dimen.habitNameWidth);
float buttonWidth = context.getResources().getDimension(R.dimen.checkmarkWidth);
return Math.max(0, (int) ((screenWidth - labelWidth) / buttonWidth));
}
public int getHabitNameWidth()
{
DisplayMetrics dm = context.getResources().getDisplayMetrics();
int width = (int) (dm.widthPixels / dm.density);
return (int) ((width - 30 - getButtonCount() * 42) * dm.density);
float screenWidth = UIHelper.getScreenWidth(context);
float buttonWidth = context.getResources().getDimension(R.dimen.checkmarkWidth);
float padding = UIHelper.dpToPixels(context, 15);
return (int) (screenWidth - padding - getButtonCount() * buttonWidth);
}
public void updateCheckmarkButtons(Habit habit, LinearLayout llButtons)
@ -94,8 +97,8 @@ public class ListHabitsHelper
public int getActiveColor(Habit habit)
{
int activeColor = habit.color;
if(habit.isArchived()) activeColor = INACTIVE_COLOR;
int activeColor = ColorHelper.getColor(context, habit.color);
if(habit.isArchived()) activeColor = mediumContrastColor;
return activeColor;
}
@ -129,12 +132,12 @@ public class ListHabitsHelper
if (score < Score.HALF_STAR_CUTOFF)
{
tvStar.setText(context.getString(R.string.fa_star_o));
tvStar.setTextColor(INACTIVE_COLOR);
tvStar.setTextColor(lowContrastColor);
}
else if (score < Score.FULL_STAR_CUTOFF)
{
tvStar.setText(context.getString(R.string.fa_star_half_o));
tvStar.setTextColor(INACTIVE_COLOR);
tvStar.setTextColor(lowContrastColor);
}
else
{
@ -156,27 +159,64 @@ public class ListHabitsHelper
case 1:
tvCheck.setText(R.string.fa_check);
tvCheck.setTextColor(INACTIVE_CHECKMARK_COLOR);
tvCheck.setTextColor(lowContrastColor);
tvCheck.setTag(R.string.toggle_key, 1);
break;
case 0:
tvCheck.setText(R.string.fa_times);
tvCheck.setTextColor(INACTIVE_CHECKMARK_COLOR);
tvCheck.setTextColor(lowContrastColor);
tvCheck.setTag(R.string.toggle_key, 0);
break;
}
}
public void updateHabitBackground(View view, boolean isSelected)
public View inflateHabitCard(LayoutInflater inflater,
View.OnLongClickListener onCheckmarkLongClickListener,
View.OnClickListener onCheckmarkClickListener)
{
View view = inflater.inflate(R.layout.list_habits_item, null);
initializeLabelAndIcon(view);
inflateCheckmarkButtons(view, onCheckmarkLongClickListener, onCheckmarkClickListener,
inflater);
return view;
}
public void updateHabitCard(View view, Habit habit, boolean selected)
{
TextView tvStar = ((TextView) view.findViewById(R.id.tvStar));
TextView tvName = (TextView) view.findViewById(R.id.label);
LinearLayout llInner = (LinearLayout) view.findViewById(R.id.llInner);
LinearLayout llButtons = (LinearLayout) view.findViewById(R.id.llButtons);
llInner.setTag(R.string.habit_key, habit.getId());
llInner.setOnTouchListener(new HotspotTouchListener());
updateNameAndIcon(habit, tvStar, tvName);
updateCheckmarkButtons(habit, llButtons);
updateHabitCardBackground(llInner, selected);
}
public void updateHabitCardBackground(View view, boolean isSelected)
{
if (android.os.Build.VERSION.SDK_INT >= 21)
{
if (isSelected)
view.setBackgroundResource(R.drawable.selected_box);
else
view.setBackgroundResource(R.drawable.ripple);
}
else
{
if (android.os.Build.VERSION.SDK_INT >= 21)
view.setBackgroundResource(R.drawable.ripple_white);
else view.setBackgroundResource(R.drawable.card_background);
Drawable background;
if (isSelected)
background = UIHelper.getStyledDrawable(context, R.attr.selectedBackground);
else
background = UIHelper.getStyledDrawable(context, R.attr.cardBackground);
view.setBackgroundDrawable(background);
}
}
@ -206,7 +246,7 @@ public class ListHabitsHelper
for (int i = 0; i < getButtonCount(); i++)
{
View tvDay = inflater.inflate(R.layout.list_habits_header_check, null);
Button btCheck = (Button) tvDay.findViewById(R.id.tvCheck);
TextView btCheck = (TextView) tvDay.findViewById(R.id.tvCheck);
btCheck.setText(DateHelper.formatHeaderDate(day));
header.addView(tvDay);
@ -222,9 +262,22 @@ public class ListHabitsHelper
public void toggleCheckmarkView(View v, Habit habit)
{
int androidColor = ColorHelper.getColor(context, habit.color);
if (v.getTag(R.string.toggle_key).equals(2))
updateCheckmark(habit.color, (TextView) v, 0);
updateCheckmark(androidColor, (TextView) v, 0);
else
updateCheckmark(habit.color, (TextView) v, 2);
updateCheckmark(androidColor, (TextView) v, 2);
}
private static class HotspotTouchListener implements View.OnTouchListener
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
if (android.os.Build.VERSION.SDK_INT >= 21)
v.getBackground().setHotspot(event.getX(), event.getY());
return false;
}
}
}

@ -19,10 +19,13 @@
package org.isoron.uhabits.helpers;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Debug;
import android.os.Looper;
@ -35,14 +38,19 @@ import android.view.View;
import android.view.inputmethod.InputMethodManager;
import org.isoron.uhabits.BuildConfig;
import org.isoron.uhabits.HabitsApplication;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.Command;
import java.util.Locale;
public abstract class UIHelper
{
public static final String ISORON_NAMESPACE = "http://isoron.org/android";
public static final int THEME_LIGHT = 0;
public static final int THEME_DARK = 1;
private static Typeface fontawesome;
public interface OnSavedListener
@ -165,4 +173,92 @@ public abstract class UIHelper
return false;
}
public static float getScreenWidth(Context context)
{
return context.getResources().getDisplayMetrics().widthPixels;
}
public static int getStyledColor(Context context, int attrId)
{
int[] attrs = new int[]{ attrId };
TypedArray ta = context.obtainStyledAttributes(attrs);
int color = ta.getColor(0, 0);
ta.recycle();
return color;
}
public static Drawable getStyledDrawable(Context context, int attrId)
{
int[] attrs = new int[]{ attrId };
TypedArray ta = context.obtainStyledAttributes(attrs);
Drawable drawable = ta.getDrawable(0);
ta.recycle();
return drawable;
}
public static boolean getStyledBoolean(Context context, int attrId)
{
int[] attrs = new int[]{ attrId };
TypedArray ta = context.obtainStyledAttributes(attrs);
boolean bool = ta.getBoolean(0, false);
ta.recycle();
return bool;
}
static int getStyleResource(Context context, int attrId)
{
int[] attr = new int[] { attrId };
TypedArray array = context.obtainStyledAttributes(attr);
int resourceId = array.getResourceId(0, -1);
array.recycle();
return resourceId;
}
public static void applyCurrentTheme(Activity activity)
{
switch(getCurrentTheme())
{
case THEME_DARK:
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
boolean pureBlackEnabled = prefs.getBoolean("pref_pure_black", false);
if(pureBlackEnabled)
activity.setTheme(R.style.AppBaseThemeDark_PureBlack);
else
activity.setTheme(R.style.AppBaseThemeDark);
break;
}
case THEME_LIGHT:
default:
activity.setTheme(R.style.AppBaseTheme);
break;
}
}
private static int getCurrentTheme()
{
Context appContext = HabitsApplication.getContext();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext);
return prefs.getInt("pref_theme", THEME_LIGHT);
}
public static void setCurrentTheme(int theme)
{
Context appContext = HabitsApplication.getContext();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext);
prefs.edit().putInt("pref_theme", theme).apply();
}
public static boolean isNightMode()
{
return getCurrentTheme() == THEME_DARK;
}
}

@ -71,7 +71,11 @@ public class Habit extends Model
public Integer freqDen;
/**
* Color of the habit. The format is the same as android.graphics.Color.
* Color of the habit.
*
* This number is not an android.graphics.Color, but an index to the activity color palette,
* which changes according to the theme. To convert this color into an android.graphics.Color,
* use ColorHelper.getColor(context, habit.color).
*/
@Column(name = "color")
public Integer color;
@ -166,7 +170,7 @@ public class Habit extends Model
*/
public Habit()
{
this.color = ColorHelper.palette[5];
this.color = 5;
this.position = Habit.countWithArchived();
this.highlight = 0;
this.archived = 0;
@ -492,8 +496,15 @@ public class Habit extends Model
for(Habit habit : habits)
{
String[] cols = { habit.name, habit.description, Integer.toString(habit.freqNum),
Integer.toString(habit.freqDen), ColorHelper.toHTML(habit.color) };
String[] cols =
{
habit.name,
habit.description,
Integer.toString(habit.freqNum),
Integer.toString(habit.freqDen),
ColorHelper.toHTML(ColorHelper.CSV_PALETTE[habit.color])
};
csv.writeNext(cols, false);
}

@ -94,7 +94,7 @@ public class CheckmarkView extends View implements HabitDataView
fa_check = context.getString(R.string.fa_check);
fa_times = context.getString(R.string.fa_times);
primaryColor = ColorHelper.palette[10];
primaryColor = ColorHelper.getColor(getContext(), 10);
timesColor = Color.argb(128, 255, 255, 255);
darkGrey = Color.argb(64, 0, 0, 0);
@ -184,8 +184,9 @@ public class CheckmarkView extends View implements HabitDataView
public void refreshData()
{
this.check_status = habit.checkmarks.getTodayValue();
this.primaryColor = Color.argb(230, Color.red(habit.color), Color.green(habit.color),
Color.blue(habit.color));
int color = ColorHelper.getColor(getContext(), habit.color);
this.primaryColor = Color.argb(230, Color.red(color), Color.green(color),
Color.blue(color));
this.label = habit.name;
updateLabel();

@ -26,8 +26,10 @@ import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
import java.text.SimpleDateFormat;
@ -56,7 +58,7 @@ public class HabitFrequencyView extends ScrollableDataView implements HabitDataV
private int nColumns;
private int textColor;
private int dimmedTextColor;
private int gridColor;
private int[] colors;
private int primaryColor;
private boolean isBackgroundTransparent;
@ -72,7 +74,7 @@ public class HabitFrequencyView extends ScrollableDataView implements HabitDataV
public HabitFrequencyView(Context context, AttributeSet attrs)
{
super(context, attrs);
this.primaryColor = ColorHelper.palette[7];
this.primaryColor = ColorHelper.getColor(getContext(), 7);
this.frequency = new HashMap<>();
init();
}
@ -98,7 +100,9 @@ public class HabitFrequencyView extends ScrollableDataView implements HabitDataV
private void createColors()
{
if(habit != null)
this.primaryColor = habit.color;
{
this.primaryColor = ColorHelper.getColor(getContext(), habit.color);
}
if (isBackgroundTransparent)
{
@ -106,17 +110,17 @@ public class HabitFrequencyView extends ScrollableDataView implements HabitDataV
primaryColor = ColorHelper.setValue(primaryColor, 1.0f);
textColor = Color.argb(192, 255, 255, 255);
dimmedTextColor = Color.argb(128, 255, 255, 255);
gridColor = Color.argb(128, 255, 255, 255);
}
else
{
textColor = Color.argb(64, 0, 0, 0);
dimmedTextColor = Color.argb(16, 0, 0, 0);
textColor = UIHelper.getStyledColor(getContext(), R.attr.mediumContrastTextColor);
gridColor = UIHelper.getStyledColor(getContext(), R.attr.lowContrastTextColor);
}
colors = new int[4];
colors[0] = Color.rgb(230, 230, 230);
colors[0] = gridColor;
colors[3] = primaryColor;
colors[1] = ColorHelper.mixColors(colors[0], colors[3], 0.66f);
colors[2] = ColorHelper.mixColors(colors[0], colors[3], 0.33f);
@ -286,7 +290,7 @@ public class HabitFrequencyView extends ScrollableDataView implements HabitDataV
pText.setTextAlign(Paint.Align.LEFT);
pText.setColor(textColor);
pGrid.setColor(dimmedTextColor);
pGrid.setColor(gridColor);
for (String day : DateHelper.getLocaleDayNames(Calendar.SHORT)) {
canvas.drawText(day, rGrid.right - columnWidth,

@ -70,6 +70,7 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
private boolean isBackgroundTransparent;
private int textColor;
private int reverseTextColor;
private boolean isEditable;
public HabitHistoryView(Context context)
@ -92,12 +93,12 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
private void init()
{
createPaints();
createColors();
createPaints();
isEditable = false;
checkmarks = new int[0];
primaryColor = ColorHelper.palette[7];
primaryColor = ColorHelper.getColor(getContext(), 7);
dfMonth = DateHelper.getDateFormat("MMM");
dfYear = DateHelper.getDateFormat("yyyy");
@ -164,7 +165,7 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
private void createColors()
{
if(habit != null)
this.primaryColor = habit.color;
this.primaryColor = ColorHelper.getColor(getContext(), habit.color);
if(isBackgroundTransparent)
primaryColor = ColorHelper.setMinValue(primaryColor, 0.75f);
@ -179,15 +180,17 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
colors[0] = Color.argb(16, 255, 255, 255);
colors[1] = Color.argb(128, red, green, blue);
colors[2] = primaryColor;
textColor = Color.rgb(255, 255, 255);
textColor = Color.WHITE;
reverseTextColor = Color.WHITE;
}
else
{
colors = new int[3];
colors[0] = Color.argb(25, 0, 0, 0);
colors[0] = UIHelper.getStyledColor(getContext(), R.attr.lowContrastTextColor);
colors[1] = Color.argb(127, red, green, blue);
colors[2] = primaryColor;
textColor = Color.argb(64, 0, 0, 0);
textColor = UIHelper.getStyledColor(getContext(), R.attr.mediumContrastTextColor);
reverseTextColor = UIHelper.getStyledColor(getContext(), R.attr.highContrastReverseTextColor);
}
}
@ -198,10 +201,8 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
pTextHeader.setAntiAlias(true);
pSquareBg = new Paint();
pSquareBg.setColor(primaryColor);
pSquareFg = new Paint();
pSquareFg.setColor(Color.WHITE);
pSquareFg.setAntiAlias(true);
pSquareFg.setTextAlign(Align.CENTER);
}
@ -292,6 +293,7 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
if (checkmarkOffset >= checkmarks.length) pSquareBg.setColor(colors[0]);
else pSquareBg.setColor(colors[checkmarks[checkmarkOffset]]);
pSquareFg.setColor(reverseTextColor);
canvas.drawRect(location, pSquareBg);
String text = Integer.toString(date.get(Calendar.DAY_OF_MONTH));
canvas.drawText(text, location.centerX(), location.centerY() + squareTextOffset, pSquareFg);

@ -32,6 +32,7 @@ import android.util.AttributeSet;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.models.Score;
@ -65,7 +66,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
private int nColumns;
private int textColor;
private int dimmedTextColor;
private int gridColor;
@Nullable
private int[] scores;
@ -74,6 +75,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
private boolean isBackgroundTransparent;
private int bucketSize = 7;
private int footerHeight;
private int backgroundColor;
public HabitScoreView(Context context)
{
@ -84,7 +86,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
public HabitScoreView(Context context, AttributeSet attrs)
{
super(context, attrs);
this.primaryColor = ColorHelper.palette[7];
this.primaryColor = ColorHelper.getColor(getContext(), 7);
init();
}
@ -110,7 +112,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
private void createColors()
{
if(habit != null)
this.primaryColor = habit.color;
this.primaryColor = ColorHelper.getColor(getContext(), habit.color);
if (isBackgroundTransparent)
{
@ -118,12 +120,13 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
primaryColor = ColorHelper.setValue(primaryColor, 1.0f);
textColor = Color.argb(192, 255, 255, 255);
dimmedTextColor = Color.argb(128, 255, 255, 255);
gridColor = Color.argb(128, 255, 255, 255);
}
else
{
textColor = Color.argb(64, 0, 0, 0);
dimmedTextColor = Color.argb(16, 0, 0, 0);
textColor = UIHelper.getStyledColor(getContext(), R.attr.mediumContrastTextColor);
gridColor = UIHelper.getStyledColor(getContext(), R.attr.lowContrastTextColor);
backgroundColor = UIHelper.getStyledColor(getContext(), R.attr.cardBackgroundColor);
}
}
@ -172,7 +175,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
pGraph.setTextSize(baseSize * 0.5f);
pGraph.setStrokeWidth(baseSize * 0.1f);
pGrid.setStrokeWidth(baseSize * 0.05f);
pGrid.setStrokeWidth(baseSize * 0.025f);
}
public void refreshData()
@ -322,7 +325,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
pText.setTextAlign(Paint.Align.LEFT);
pText.setColor(textColor);
pGrid.setColor(dimmedTextColor);
pGrid.setColor(gridColor);
for (int i = 0; i < nRows; i++)
{
@ -345,7 +348,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
private void drawMarker(Canvas canvas, RectF rect)
{
rect.inset(baseSize * 0.15f, baseSize * 0.15f);
setModeOrColor(pGraph, XFERMODE_CLEAR, Color.WHITE);
setModeOrColor(pGraph, XFERMODE_CLEAR, backgroundColor);
canvas.drawOval(rect, pGraph);
rect.inset(baseSize * 0.1f, baseSize * 0.1f);
@ -353,7 +356,7 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
canvas.drawOval(rect, pGraph);
rect.inset(baseSize * 0.1f, baseSize * 0.1f);
setModeOrColor(pGraph, XFERMODE_CLEAR, Color.WHITE);
setModeOrColor(pGraph, XFERMODE_CLEAR, backgroundColor);
canvas.drawOval(rect, pGraph);
if(isBackgroundTransparent)

@ -29,6 +29,7 @@ import android.view.View;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.models.Streak;
@ -53,7 +54,6 @@ public class HabitStreakView extends View implements HabitDataView
private List<Streak> streaks;
private boolean isBackgroundTransparent;
private int textColor;
private DateFormat dateFormat;
private int width;
private float em;
@ -61,6 +61,8 @@ public class HabitStreakView extends View implements HabitDataView
private float textMargin;
private boolean shouldShowLabels;
private int maxStreakCount;
private int textColor;
private int reverseTextColor;
public HabitStreakView(Context context)
{
@ -71,7 +73,7 @@ public class HabitStreakView extends View implements HabitDataView
public HabitStreakView(Context context, AttributeSet attrs)
{
super(context, attrs);
this.primaryColor = ColorHelper.palette[7];
this.primaryColor = ColorHelper.getColor(getContext(), 7);
init();
}
@ -122,7 +124,7 @@ public class HabitStreakView extends View implements HabitDataView
private void createColors()
{
if(habit != null)
this.primaryColor = habit.color;
this.primaryColor = ColorHelper.getColor(getContext(), habit.color);
if(isBackgroundTransparent)
{
@ -141,7 +143,8 @@ public class HabitStreakView extends View implements HabitDataView
colors[2] = Color.argb(213, red, green, blue);
colors[1] = Color.argb(170, red, green, blue);
colors[0] = Color.argb(128, red, green, blue);
textColor = Color.rgb(255, 255, 255);
textColor = Color.WHITE;
reverseTextColor = Color.WHITE;
}
else
{
@ -149,8 +152,9 @@ public class HabitStreakView extends View implements HabitDataView
colors[3] = primaryColor;
colors[2] = Color.argb(192, red, green, blue);
colors[1] = Color.argb(96, red, green, blue);
colors[0] = Color.argb(32, 0, 0, 0);
textColor = Color.argb(64, 0, 0, 0);
colors[0] = UIHelper.getStyledColor(getContext(), R.attr.lowContrastTextColor);
textColor = UIHelper.getStyledColor(getContext(), R.attr.mediumContrastTextColor);
reverseTextColor = UIHelper.getStyledColor(getContext(), R.attr.highContrastReverseTextColor);
}
}
@ -216,7 +220,7 @@ public class HabitStreakView extends View implements HabitDataView
if(shouldShowLabels) availableWidth -= 2 * textMargin;
float barWidth = percentage * availableWidth;
float minBarWidth = paint.measureText(streak.length.toString());
float minBarWidth = paint.measureText(streak.length.toString()) + em;
barWidth = Math.max(barWidth, minBarWidth);
float gap = (width - barWidth) / 2;
@ -229,7 +233,7 @@ public class HabitStreakView extends View implements HabitDataView
float yOffset = rect.centerY() + 0.3f * em;
paint.setColor(Color.WHITE);
paint.setColor(reverseTextColor);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(streak.length.toString(), rect.centerX(), yOffset, paint);

@ -71,7 +71,7 @@ public class NumberView extends View
this.textSize = UIHelper.getFloatAttribute(context, attrs, "textSize",
getResources().getDimension(R.dimen.regularTextSize));
this.color = ColorHelper.palette[7];
this.color = ColorHelper.getColor(getContext(), 7);
init();
}

@ -23,6 +23,7 @@ import android.content.Context;
import android.util.AttributeSet;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
@ -79,6 +80,6 @@ public class RepetitionCountView extends NumberView implements HabitDataView
public void setHabit(Habit habit)
{
this.habit = habit;
setColor(habit.color);
setColor(ColorHelper.getColor(getContext(), habit.color));
}
}

@ -22,7 +22,6 @@ package org.isoron.uhabits.views;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.text.Layout;
@ -50,7 +49,8 @@ public class RingView extends View
private float maxDiameter;
private float textSize;
private int fadedTextColor;
private int textColor;
private int backgroundColor;
public RingView(Context context)
{
@ -97,7 +97,8 @@ public class RingView extends View
pRing.setColor(color);
pRing.setTextAlign(Paint.Align.CENTER);
fadedTextColor = getResources().getColor(R.color.fadedTextColor);
backgroundColor = UIHelper.getStyledColor(getContext(), R.attr.cardBackgroundColor);
textColor = UIHelper.getStyledColor(getContext(), R.attr.mediumContrastTextColor);
textSize = getResources().getDimension(R.dimen.smallTextSize);
rect = new RectF();
@ -136,14 +137,15 @@ public class RingView extends View
rect.offset((width - diameter) / 2, 0);
canvas.drawArc(rect, -90, 360 * percentage, true, pRing);
pRing.setColor(Color.argb(255, 230, 230, 230));
int grey = UIHelper.getStyledColor(getContext(), R.attr.lowContrastTextColor);
pRing.setColor(grey);
canvas.drawArc(rect, 360 * percentage - 90 + 2, 360 * (1 - percentage) - 4, true, pRing);
pRing.setColor(Color.WHITE);
pRing.setColor(backgroundColor);
rect.inset(thickness, thickness);
canvas.drawArc(rect, -90, 360, true, pRing);
pRing.setColor(fadedTextColor);
pRing.setColor(textColor);
pRing.setTextSize(textSize);
float lineHeight = pRing.getFontSpacing();
canvas.drawText(String.format("%.0f%%", percentage * 100), rect.centerX(),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 196 B

@ -20,5 +20,5 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:drawable="@color/white" />
<item android:drawable="?attr/cardBackgroundColor" />
</ripple>

@ -18,11 +18,7 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_edit_habit"
android:showAsAction="ifRoom"
android:icon="@drawable/ic_action_edit_dark"
android:title="@string/edit"/>
</menu>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="?highlightedBackgroundColor" />
<stroke android:width="2dip" android:color="@color/grey_500"/>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 547 B

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/apptheme_textfield_default_holo_light" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/apptheme_textfield_disabled_holo_light" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/apptheme_textfield_activated_holo_light" />
<item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/apptheme_textfield_focused_holo_light" />
<item android:state_enabled="true" android:drawable="@drawable/apptheme_textfield_default_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/apptheme_textfield_disabled_focused_holo_light" />
<item android:drawable="@drawable/apptheme_textfield_disabled_holo_light" />
</selector>

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="0dp"
android:bottom="0dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="@color/black" />
</shape>
</item>
<item
android:top="0dp"
android:bottom="1dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="@color/black" />
</shape>
</item>
<item
android:top="0dp"
android:bottom="1.5dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="@color/black"/>
</shape>
</item>
<item
android:top="0.5dp"
android:bottom="1.5dp"
android:left="0.5dp"
android:right="0.5dp">
<shape>
<solid android:color="@color/black"/>
</shape>
</item>
</layer-list>

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="0dp"
android:bottom="0dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="#202020" />
</shape>
</item>
<item
android:top="0dp"
android:bottom="1dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="#101010" />
</shape>
</item>
<item
android:top="0dp"
android:bottom="1.5dp"
android:left="0dp"
android:right="0dp">
<shape>
<solid android:color="#202020"/>
</shape>
</item>
<item
android:top="0.5dp"
android:bottom="1.5dp"
android:left="0.5dp"
android:right="0.5dp">
<shape>
<solid android:color="@color/grey_850"/>
</shape>
</item>
</layer-list>

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="40dp">
<shape android:shape="rectangle" >
<gradient
android:startColor="@color/black"
android:endColor="@color/black"
android:angle="270"/>
</shape>
</item>
<item android:bottom="2dp">
<shape android:shape="rectangle" >
<solid android:color="@color/black" />
</shape>
</item>
</layer-list>

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="40dp">
<shape android:shape="rectangle" >
<gradient
android:startColor="#30000000"
android:endColor="#00000000"
android:angle="270"/>
</shape>
</item>
<item android:bottom="2dp">
<shape android:shape="rectangle" >
<solid android:color="#202020" />
</shape>
</item>
</layer-list>

@ -20,7 +20,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="40dp">
<item android:top="44dp">
<shape android:shape="rectangle" >
<gradient
android:startColor="#30000000"

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
@ -17,12 +18,7 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.isoron.uhabits.MainActivity" >
<item
android:id="@+id/action_add"
android:title="@string/add_habit" android:showAsAction="always" android:icon="@drawable/ic_action_add_dark"/>
</menu>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/black" />
<stroke android:width="2dip" android:color="@color/grey_500"/>
</shape>

@ -18,31 +18,7 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_edit_habit"
android:title="@string/edit"
android:icon="@drawable/ic_action_edit_dark"/>
<item
android:id="@+id/action_color"
android:title="@string/color_picker_default_title"
android:icon="@drawable/ic_action_color_dark"/>
<item
android:id="@+id/action_archive_habit"
android:title="@string/archive"
android:icon="@drawable/ic_action_archive_dark" />
<item
android:id="@+id/action_unarchive_habit"
android:title="@string/unarchive"
android:icon="@drawable/ic_action_unarchive_dark"/>
<item
android:id="@+id/action_delete"
android:title="@string/delete"
android:showAsAction="never" />
</menu>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/grey_800" />
<stroke android:width="2dip" android:color="@color/grey_500"/>
</shape>

@ -21,14 +21,14 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/windowBackground"
android:background="?windowBackgroundColor"
android:fillViewport="true">
<LinearLayout
style="@style/cardsListStyle">
style="@style/CardList">
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="center">
<ImageView
@ -44,7 +44,7 @@
android:textStyle="bold"
android:textSize="16sp"
android:layout_margin="6dp"
android:textColor="@color/blue_700"
android:textColor="?aboutScreenColor"
android:text="@string/app_name"/>
<TextView
@ -57,124 +57,124 @@
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/links"
android:textColor="@color/blue_700"/>
android:textColor="?aboutScreenColor"/>
<TextView
android:id="@+id/tvRate"
style="@style/aboutClickableItemStyle"
style="@style/About.Item.Clickable"
android:text="@string/pref_rate_this_app"/>
<TextView
android:id="@+id/tvFeedback"
style="@style/aboutClickableItemStyle"
style="@style/About.Item.Clickable"
android:text="@string/pref_send_feedback"/>
<TextView
android:id="@+id/tvSource"
style="@style/aboutClickableItemStyle"
style="@style/About.Item.Clickable"
android:text="@string/pref_view_source_code"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/developers"
android:textColor="@color/blue_700"/>
android:textColor="?aboutScreenColor"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Álinson Xavier"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/translators"
android:textColor="@color/blue_700"/>
android:textColor="?aboutScreenColor"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Limin Lu (中文)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="François Mahé (Français)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Naofumi F (日本語)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Matthias Meisser (Deutsch)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Al Alloush (العَرَبِية‎)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Thibaut Girka (Français)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Can Altas (Deutsch)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Marco Cavazza (Italiano)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Adam Jurkiewicz (Polski)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Dmitriy Bogdanov (Русский)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Dalecarlian (Svenska)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Robin (Svenska)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Josh (한국어 )"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Ander Raso Vazquez (Español)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="XuToTo (中文)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Tomáš Borovec (Čeština)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Mathis Chenuet (Français)"/>
<TextView
style="@style/aboutItemStyle"
style="@style/About.Item"
android:text="Álinson Xavier (Português)"/>
</LinearLayout>
</LinearLayout>

@ -45,7 +45,7 @@
android:id="@+id/buttonPickColor"
style="@style/dialogFormInputColor"
android:contentDescription="@string/color_picker_default_title"
android:src="@drawable/ic_action_color_light"/>
android:src="?dialogIconChangeColor"/>
</LinearLayout>
<EditText
@ -63,7 +63,7 @@
<Spinner
android:id="@+id/sFrequency"
style="@style/dialogFormSpinner"
style="?dialogFormSpinnerTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="@array/frequencyQuickSelect"
@ -111,7 +111,7 @@
<TextView
android:id="@+id/inputReminderTime"
style="@style/dialogFormSpinner"/>
style="?dialogFormSpinnerTheme"/>
</LinearLayout>
<LinearLayout
@ -125,7 +125,7 @@
<TextView
android:id="@+id/inputReminderDays"
style="@style/dialogFormSpinner"/>
style="?dialogFormSpinnerTheme"/>
</LinearLayout>
</LinearLayout>

@ -26,12 +26,17 @@
<com.mobeta.android.dslv.DragSortListView
android:id="@+id/listView"
style="@style/habitsListStyle"
dslv:drag_enabled="true"
dslv:drag_start_mode="onLongPress"
dslv:sort_enabled="true"
dslv:track_drag_sort="false"
/>
android:layout_width="match_parent"
android:background="?windowBackgroundColor"
android:paddingTop="@dimen/checkmarkHeight"
android:layout_height="match_parent"
android:divider="?windowBackgroundColor"
android:listSelector="@android:color/transparent"
android:dividerHeight="1dp"/>
<LinearLayout
android:id="@+id/llEmpty"
@ -42,30 +47,32 @@
<TextView
android:id="@+id/tvStarEmpty"
style="@style/habitsListEmptyStyle"
style="@style/ListHabits.EmptyState"
android:text="@string/fa_star_half_o"
android:textSize="80sp"/>
<TextView
style="@style/habitsListEmptyStyle"
style="@style/ListHabits.EmptyState"
android:text="@string/no_habits_found"/>
</LinearLayout>
<LinearLayout style="@style/habitsListHeaderStyle">
<LinearLayout
android:id="@+id/header"
style="@style/ListHabits.Header">
<TextView
android:id="@+id/tvStarHeader"
style="@style/habitsListStarStyle"/>
style="@style/ListHabits.Star"/>
<TextView
android:id="@+id/tvNameHeader"
style="@style/habitsListNameStyle"
style="@style/ListHabits.Label"
android:text=""/>
<LinearLayout
android:id="@+id/llButtonsHeader"
style="@style/habitsListButtonsPanelStyle"/>
style="@style/ListHabits.CheckmarkPanel"/>
</LinearLayout>
<ProgressBar
@ -73,7 +80,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal"
android:layout_marginTop="37dp"
android:layout_below="@id/header"
/>
<LinearLayout
@ -85,7 +92,7 @@
android:orientation="vertical"
android:animateLayoutChanges="true"
android:visibility="invisible"
style="@style/cardStyle">
style="@style/Card">
<TextView
android:layout_width="wrap_content"

@ -18,6 +18,14 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<Button xmlns:android="http://schemas.android.com/apk/res/android"
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tvCheck"
style="@style/habitsListHeaderCheckStyle" />
style="@style/ListHabits.Checkmark"
android:layout_width="20dp"
android:layout_height="20dp"
android:background="@color/transparent"
android:textColor="?mediumContrastTextColor"
android:textAllCaps="true"
android:textStyle="bold"
android:textSize="10sp"/>

@ -20,23 +20,23 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llOuter"
style="@style/habitsListItemStyle">
style="@style/ListHabits.Item">
<LinearLayout
android:id="@+id/llInner"
style="@style/habitsListItemInnerPanelStyle">
style="@style/ListHabits.HabitCard">
<TextView
android:id="@+id/tvStar"
style="@style/habitsListStarStyle" />
style="@style/ListHabits.Star" />
<TextView
android:id="@+id/label"
style="@style/habitsListNameStyle" />
style="@style/ListHabits.Label" />
<LinearLayout
android:id="@+id/llButtons"
style="@style/habitsListButtonsPanelStyle" />
style="@style/ListHabits.CheckmarkPanel" />
</LinearLayout>
</LinearLayout>

@ -20,4 +20,4 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tvCheck"
style="@style/habitsListCheckStyle" />
style="@style/ListHabits.Checkmark" />

@ -22,20 +22,20 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/windowBackground"
android:background="?windowBackgroundColor"
android:fillViewport="true">
<LinearLayout
style="@style/cardsListStyle"
style="@style/CardList"
tools:context="org.isoron.uhabits.ShowHabitActivity">
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="start">
<TextView
android:id="@+id/tvOverview"
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/overview"/>
<LinearLayout
@ -47,7 +47,7 @@
<org.isoron.uhabits.views.RingView
android:id="@+id/scoreRing"
style="@style/smallDataViewStyle"
style="@style/SmallDataView"
android:layout_width="100dp"
app:label="@string/strength"
app:maxDiameter="80"
@ -58,7 +58,7 @@
</LinearLayout>
<RelativeLayout
style="@style/cardStyle"
style="@style/Card"
android:gravity="center">
<Spinner
@ -74,7 +74,7 @@
<TextView
android:id="@+id/tvStrength"
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/habit_strength"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
@ -89,14 +89,14 @@
</RelativeLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingBottom="0dp">
<TextView
android:id="@+id/tvHistory"
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/history"/>
<org.isoron.uhabits.views.HabitHistoryView
@ -118,12 +118,12 @@
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:orientation="vertical">
<TextView
android:id="@+id/tvStreaks"
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/best_streaks"/>
<org.isoron.uhabits.views.HabitStreakView
@ -133,12 +133,12 @@
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
style="@style/Card"
android:orientation="vertical">
<TextView
android:id="@+id/tvWeekdayFreq"
style="@style/cardHeaderStyle"
style="@style/CardHeader"
android:text="@string/frequency"/>
<org.isoron.uhabits.views.HabitFrequencyView

@ -23,25 +23,26 @@
<item
android:id="@+id/action_edit_habit"
android:title="@string/edit"
android:icon="@drawable/ic_action_edit_light"/>
android:icon="?iconEdit"/>
<item
android:id="@+id/action_color"
android:title="@string/color_picker_default_title"
android:icon="@drawable/ic_action_color_light"/>
android:icon="?iconChangeColor"/>
<item
android:id="@+id/action_archive_habit"
android:title="@string/archive"
android:icon="@drawable/ic_action_archive_light" />
android:icon="?iconArchive" />
<item
android:id="@+id/action_unarchive_habit"
android:title="@string/unarchive"
android:icon="@drawable/ic_action_unarchive_light"/>
android:icon="?iconUnarchive"/>
<item
android:id="@+id/action_delete"
android:title="@string/delete" />
android:title="@string/delete"
android:showAsAction="never"/>
</menu>

@ -28,6 +28,12 @@
android:enabled="true"
android:title="@string/show_archived"/>
<item
android:id="@+id/action_night_mode"
android:checkable="true"
android:enabled="true"
android:title="@string/night_mode"/>
<item
android:id="@+id/action_settings"
android:orderInCategory="100"

@ -23,7 +23,7 @@
<item
android:id="@+id/action_add"
android:icon="@drawable/ic_action_add"
android:icon="?iconAdd"
android:title="@string/add_habit"
android:showAsAction="always"/>

@ -22,7 +22,7 @@
<item
android:id="@+id/action_edit_habit"
android:icon="@drawable/ic_action_edit_light"
android:icon="?iconEdit"
android:title="@string/edit"
android:showAsAction="ifRoom"/>

@ -20,15 +20,91 @@
<resources>
<style name="AppBaseTheme" parent="android:Theme.Material.Light.DarkActionBar">
<item name="android:textColor">#606060</item>
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_darker</item>
<item name="android:dialogTheme">@style/MyDialogStyle</item>
<item name="android:alertDialogTheme">@style/MyDialogStyle</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:spinnerItemStyle">@style/dialogFormSmallText</item>
<item name="android:colorPrimary">@color/blue_grey_800</item>
<item name="android:colorPrimaryDark">@color/blue_grey_900</item>
<item name="cardBackgroundColor">@color/grey_50</item>
<item name="windowBackgroundColor">@color/grey_200</item>
<item name="headerBackgroundColor">@color/grey_200</item>
<item name="highlightedBackgroundColor">@color/grey_100</item>
<item name="android:textColor">@color/grey_800</item>
<item name="useHabitColorAsPrimary">true</item>
<item name="palette">@array/lightPalette</item>
<item name="highContrastReverseTextColor">@color/white</item>
<item name="mediumContrastReverseTextColor">@color/grey_500</item>
<item name="lowContrastReverseTextColor">@color/grey_700</item>
<item name="highContrastTextColor">@color/grey_800</item>
<item name="mediumContrastTextColor">@color/grey_500</item>
<item name="lowContrastTextColor">@color/grey_300</item>
<item name="iconAdd">@drawable/ic_action_add_dark</item>
<item name="iconArchive">@drawable/ic_action_archive_dark</item>
<item name="iconEdit">@drawable/ic_action_edit_dark</item>
<item name="iconUnarchive">@drawable/ic_action_unarchive_dark</item>
<item name="iconChangeColor">@drawable/ic_action_color_dark</item>
<item name="dialogIconChangeColor">@drawable/ic_action_color_light</item>
<item name="dialogFormSpinnerTheme">@style/dialogFormSpinnerLight</item>
<item name="aboutScreenColor">@color/blue_700</item>
</style>
<style name="AppBaseThemeDark" parent="android:Theme.Material">
<item name="android:dialogTheme">@style/MyDialogStyleDark</item>
<item name="android:alertDialogTheme">@style/MyDialogStyleDark</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:colorPrimary">@color/grey_950</item>
<item name="android:colorPrimaryDark">@color/black</item>
<item name="cardBackgroundColor">@color/grey_850</item>
<item name="windowBackgroundColor">@color/grey_900</item>
<item name="headerBackgroundColor">@color/grey_900</item>
<item name="highlightedBackgroundColor">@color/grey_800</item>
<item name="android:textColor">@color/grey_100</item>
<item name="useHabitColorAsPrimary">false</item>
<item name="highContrastTextColor">@color/grey_100</item>
<item name="mediumContrastTextColor">@color/grey_500</item>
<item name="lowContrastTextColor">@color/grey_800</item>
<item name="highContrastReverseTextColor">@color/grey_900</item>
<item name="mediumContrastReverseTextColor">@color/grey_700</item>
<item name="lowContrastReverseTextColor">@color/grey_300</item>
<item name="iconAdd">@drawable/ic_action_add_dark</item>
<item name="iconArchive">@drawable/ic_action_archive_dark</item>
<item name="iconEdit">@drawable/ic_action_edit_dark</item>
<item name="iconUnarchive">@drawable/ic_action_unarchive_dark</item>
<item name="iconChangeColor">@drawable/ic_action_color_dark</item>
<item name="dialogIconChangeColor">@drawable/ic_action_color_dark</item>
<item name="dialogFormSpinnerTheme">@style/dialogFormSpinnerDark</item>
<item name="palette">@array/darkPalette</item>
<item name="aboutScreenColor">@color/blue_300</item>
</style>
<style name="AppBaseThemeDark.PureBlack">
<item name="android:colorPrimary">@color/black</item>
<item name="android:colorPrimaryDark">@color/black</item>
<item name="cardBackgroundColor">@color/black</item>
<item name="windowBackgroundColor">@color/black</item>
<item name="headerBackgroundColor">@color/black</item>
<item name="highlightedBackgroundColor">@color/black</item>
<item name="lowContrastTextColor">@color/grey_900</item>
<item name="highContrastReverseTextColor">@color/black</item>
</style>
<style name="MyDialogStyle" parent="android:Theme.Material.Light.Dialog">
@ -36,12 +112,17 @@
<item name="android:spinnerDropDownItemStyle">@style/dialogFormSpinnerDropDown</item>
</style>
<style name="cardStyle" parent="cardBasicStyle">
<item name="android:background">@color/white</item>
<style name="MyDialogStyleDark" parent="android:Theme.Material.Dialog">
<item name="android:spinnerItemStyle">@style/dialogFormText</item>
<item name="android:spinnerDropDownItemStyle">@style/dialogFormSpinnerDropDown</item>
</style>
<style name="Card" parent="CardCommon">
<item name="android:elevation">1dp</item>
<item name="android:background">?attr/cardBackgroundColor</item>
</style>
<style name="aboutClickableItemStyle" parent="aboutItemStyle">
<style name="About.Item.Clickable" parent="About.Item">
<item name="android:paddingBottom">12dp</item>
<item name="android:paddingTop">12dp</item>
<item name="android:background">@drawable/ripple_transparent</item>

@ -20,19 +20,16 @@
<resources>
<style name="habitsListHeaderStyle" parent="habitsListHeaderBasicStyle">
<item name="android:background">#f0f0f0</item>
<style name="ListHabits.Header">
<item name="android:background">?headerBackgroundColor</item>
<item name="android:elevation">2dp</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentTop">true</item>
<item name="android:paddingRight">4dp</item>
</style>
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
<style name="ListHabits.Checkmark" parent="ListHabits.CheckmarkCommon">
<item name="android:background">@drawable/ripple_transparent</item>
</style>
<style name="habitsListItemInnerPanelStyle" parent="cardStyle">
<item name="android:orientation">horizontal</item>
<item name="android:padding">3dp</item>
<item name="android:background">@drawable/ripple_white</item>
<item name="android:elevation">1dp</item>
</style>
</resources>

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<attr name="windowBackgroundColor" format="reference"/>
<attr name="cardBackgroundColor" format="reference"/>
<attr name="headerBackgroundColor" format="reference"/>
<attr name="highlightedBackgroundColor" format="reference"/>
<attr name="useHabitColorAsPrimary" format="boolean"/>
<attr name="palette" format="reference"/>
<attr name="aboutScreenColor" format="reference"/>
<attr name="highContrastTextColor" format="reference"/>
<attr name="mediumContrastTextColor" format="reference"/>
<attr name="lowContrastTextColor" format="reference"/>
<attr name="highContrastReverseTextColor" format="reference"/>
<attr name="mediumContrastReverseTextColor" format="reference"/>
<attr name="lowContrastReverseTextColor" format="reference"/>
<attr name="iconAdd" format="reference"/>
<attr name="iconArchive" format="reference"/>
<attr name="iconChangeColor" format="reference"/>
<attr name="iconEdit" format="reference"/>
<attr name="iconUnarchive" format="reference"/>
<attr name="dialogIconChangeColor" format="reference"/>
<attr name="dialogFormSpinnerTheme" format="reference"/>
<!-- Pre-Lollipop -->
<attr name="cardBackground" format="reference"/>
<attr name="headerBackground" format="reference"/>
<attr name="selectedBackground" format="reference"/>
</resources>

@ -16,14 +16,37 @@
-->
<resources>
<color name="primary">#37474f</color>
<color name="primary_darker">#263238</color>
<color name="windowBackground">#e6e6e6</color>
<color name="primaryTextColor">@color/grey_900</color>
<color name="secondaryTextColor">@color/grey_800</color>
<color name="fadedTextColor">@color/grey_600</color>
<array name="lightPalette">
<item>@color/red_700</item>
<item>@color/deep_orange_700</item>
<item>@color/yellow_800</item>
<item>@color/lime_700</item>
<item>@color/green_700</item>
<item>@color/teal_600</item>
<item>@color/cyan_600</item>
<item>@color/light_blue_600</item>
<item>@color/deep_purple_600</item>
<item>@color/purple_600</item>
<item>@color/pink_600</item>
<item>@color/grey_800</item>
<item>@color/grey_500</item>
</array>
<color name="white">#ffffff</color>
<array name="darkPalette">
<item>@color/red_200</item>
<item>@color/deep_orange_200</item>
<item>@color/yellow_200</item>
<item>@color/lime_200</item>
<item>@color/green_A200</item>
<item>@color/teal_200</item>
<item>@color/cyan_200</item>
<item>@color/light_blue_200</item>
<item>@color/deep_purple_200</item>
<item>@color/purple_200</item>
<item>@color/pink_200</item>
<item>@color/grey_100</item>
<item>@color/grey_500</item>
</array>
<!-- Time and Date picker -->
<color name="circle_background">#f2f2f2</color>
@ -53,267 +76,267 @@
<color name="line_dark">#808080</color>
<!-- Material design color palette -->
<!--<color name="red_50">#FFEBEE</color>-->
<!--<color name="red_100">#FFCDD2</color>-->
<!--<color name="red_200">#EF9A9A</color>-->
<!--<color name="red_300">#E57373</color>-->
<!--<color name="red_400">#EF5350</color>-->
<!--<color name="red_500">#F44336</color>-->
<!--<color name="red_600">#E53935</color>-->
<!--<color name="red_700">#D32F2F</color>-->
<!--<color name="red_800">#C62828</color>-->
<!--<color name="red_900">#B71C1C</color>-->
<!--<color name="red_A100">#FF8A80</color>-->
<!--<color name="red_A200">#FF5252</color>-->
<!--<color name="red_A400">#FF1744</color>-->
<!--<color name="red_A700">#D50000</color>-->
<color name="red_50">#FFEBEE</color>
<color name="red_100">#FFCDD2</color>
<color name="red_200">#EF9A9A</color>
<color name="red_300">#E57373</color>
<color name="red_400">#EF5350</color>
<color name="red_500">#F44336</color>
<color name="red_600">#E53935</color>
<color name="red_700">#D32F2F</color>
<color name="red_800">#C62828</color>
<color name="red_900">#B71C1C</color>
<color name="red_A100">#FF8A80</color>
<color name="red_A200">#FF5252</color>
<color name="red_A400">#FF1744</color>
<color name="red_A700">#D50000</color>
<!--<color name="deep_purple_50">#EDE7F6</color>-->
<!--<color name="deep_purple_100">#D1C4E9</color>-->
<!--<color name="deep_purple_200">#B39DDB</color>-->
<!--<color name="deep_purple_300">#9575CD</color>-->
<!--<color name="deep_purple_400">#7E57C2</color>-->
<!--<color name="deep_purple_500">#673AB7</color>-->
<!--<color name="deep_purple_600">#5E35B1</color>-->
<!--<color name="deep_purple_700">#512DA8</color>-->
<!--<color name="deep_purple_800">#4527A0</color>-->
<!--<color name="deep_purple_900">#311B92</color>-->
<!--<color name="deep_purple_A100">#B388FF</color>-->
<!--<color name="deep_purple_A200">#7C4DFF</color>-->
<!--<color name="deep_purple_A400">#651FFF</color>-->
<!--<color name="deep_purple_A700">#6200EA</color>-->
<color name="deep_purple_50">#EDE7F6</color>
<color name="deep_purple_100">#D1C4E9</color>
<color name="deep_purple_200">#B39DDB</color>
<color name="deep_purple_300">#9575CD</color>
<color name="deep_purple_400">#7E57C2</color>
<color name="deep_purple_500">#673AB7</color>
<color name="deep_purple_600">#5E35B1</color>
<color name="deep_purple_700">#512DA8</color>
<color name="deep_purple_800">#4527A0</color>
<color name="deep_purple_900">#311B92</color>
<color name="deep_purple_A100">#B388FF</color>
<color name="deep_purple_A200">#7C4DFF</color>
<color name="deep_purple_A400">#651FFF</color>
<color name="deep_purple_A700">#6200EA</color>
<!--<color name="light_blue_50">#E1F5FE</color>-->
<!--<color name="light_blue_100">#B3E5FC</color>-->
<!--<color name="light_blue_200">#81D4FA</color>-->
<!--<color name="light_blue_300">#4FC3F7</color>-->
<!--<color name="light_blue_400">#29B6F6</color>-->
<!--<color name="light_blue_500">#03A9F4</color>-->
<!--<color name="light_blue_600">#039BE5</color>-->
<!--<color name="light_blue_700">#0288D1</color>-->
<!--<color name="light_blue_800">#0277BD</color>-->
<!--<color name="light_blue_900">#01579B</color>-->
<!--<color name="light_blue_A100">#80D8FF</color>-->
<!--<color name="light_blue_A200">#40C4FF</color>-->
<!--<color name="light_blue_A400">#00B0FF</color>-->
<!--<color name="light_blue_A700">#0091EA</color>-->
<color name="light_blue_50">#E1F5FE</color>
<color name="light_blue_100">#B3E5FC</color>
<color name="light_blue_200">#81D4FA</color>
<color name="light_blue_300">#4FC3F7</color>
<color name="light_blue_400">#29B6F6</color>
<color name="light_blue_500">#03A9F4</color>
<color name="light_blue_600">#039BE5</color>
<color name="light_blue_700">#0288D1</color>
<color name="light_blue_800">#0277BD</color>
<color name="light_blue_900">#01579B</color>
<color name="light_blue_A100">#80D8FF</color>
<color name="light_blue_A200">#40C4FF</color>
<color name="light_blue_A400">#00B0FF</color>
<color name="light_blue_A700">#0091EA</color>
<!--<color name="green_50">#E8F5E9</color>-->
<!--<color name="green_100">#C8E6C9</color>-->
<!--<color name="green_200">#A5D6A7</color>-->
<!--<color name="green_300">#81C784</color>-->
<!--<color name="green_400">#66BB6A</color>-->
<!--<color name="green_500">#4CAF50</color>-->
<!--<color name="green_600">#43A047</color>-->
<!--<color name="green_700">#388E3C</color>-->
<!--<color name="green_800">#2E7D32</color>-->
<!--<color name="green_900">#1B5E20</color>-->
<!--<color name="green_A100">#B9F6CA</color>-->
<!--<color name="green_A200">#69F0AE</color>-->
<!--<color name="green_A400">#00E676</color>-->
<!--<color name="green_A700">#00C853</color>-->
<color name="green_50">#E8F5E9</color>
<color name="green_100">#C8E6C9</color>
<color name="green_200">#A5D6A7</color>
<color name="green_300">#81C784</color>
<color name="green_400">#66BB6A</color>
<color name="green_500">#4CAF50</color>
<color name="green_600">#43A047</color>
<color name="green_700">#388E3C</color>
<color name="green_800">#2E7D32</color>
<color name="green_900">#1B5E20</color>
<color name="green_A100">#B9F6CA</color>
<color name="green_A200">#69F0AE</color>
<color name="green_A400">#00E676</color>
<color name="green_A700">#00C853</color>
<!--<color name="yellow_50">#FFFDE7</color>-->
<!--<color name="yellow_100">#FFF9C4</color>-->
<!--<color name="yellow_200">#FFF59D</color>-->
<!--<color name="yellow_300">#FFF176</color>-->
<!--<color name="yellow_400">#FFEE58</color>-->
<!--<color name="yellow_500">#FFEB3B</color>-->
<!--<color name="yellow_600">#FDD835</color>-->
<!--<color name="yellow_700">#FBC02D</color>-->
<!--<color name="yellow_800">#F9A825</color>-->
<!--<color name="yellow_900">#F57F17</color>-->
<!--<color name="yellow_A100">#FFFF8D</color>-->
<!--<color name="yellow_A200">#FFFF00</color>-->
<!--<color name="yellow_A400">#FFEA00</color>-->
<!--<color name="yellow_A700">#FFD600</color>-->
<color name="yellow_50">#FFFDE7</color>
<color name="yellow_100">#FFF9C4</color>
<color name="yellow_200">#FFF59D</color>
<color name="yellow_300">#FFF176</color>
<color name="yellow_400">#FFEE58</color>
<color name="yellow_500">#FFEB3B</color>
<color name="yellow_600">#FDD835</color>
<color name="yellow_700">#FBC02D</color>
<color name="yellow_800">#F9A825</color>
<color name="yellow_900">#F57F17</color>
<color name="yellow_A100">#FFFF8D</color>
<color name="yellow_A200">#FFFF00</color>
<color name="yellow_A400">#FFEA00</color>
<color name="yellow_A700">#FFD600</color>
<!--<color name="deep_orange_50">#FBE9E7</color>-->
<!--<color name="deep_orange_100">#FFCCBC</color>-->
<!--<color name="deep_orange_200">#FFAB91</color>-->
<!--<color name="deep_orange_300">#FF8A65</color>-->
<!--<color name="deep_orange_400">#FF7043</color>-->
<!--<color name="deep_orange_500">#FF5722</color>-->
<!--<color name="deep_orange_600">#F4511E</color>-->
<!--<color name="deep_orange_700">#E64A19</color>-->
<!--<color name="deep_orange_800">#D84315</color>-->
<!--<color name="deep_orange_900">#BF360C</color>-->
<!--<color name="deep_orange_A100">#FF9E80</color>-->
<!--<color name="deep_orange_A200">#FF6E40</color>-->
<!--<color name="deep_orange_A400">#FF3D00</color>-->
<!--<color name="deep_orange_A700">#DD2C00</color>-->
<color name="deep_orange_50">#FBE9E7</color>
<color name="deep_orange_100">#FFCCBC</color>
<color name="deep_orange_200">#FFAB91</color>
<color name="deep_orange_300">#FF8A65</color>
<color name="deep_orange_400">#FF7043</color>
<color name="deep_orange_500">#FF5722</color>
<color name="deep_orange_600">#F4511E</color>
<color name="deep_orange_700">#E64A19</color>
<color name="deep_orange_800">#D84315</color>
<color name="deep_orange_900">#BF360C</color>
<color name="deep_orange_A100">#FF9E80</color>
<color name="deep_orange_A200">#FF6E40</color>
<color name="deep_orange_A400">#FF3D00</color>
<color name="deep_orange_A700">#DD2C00</color>
<!--<color name="blue_grey_50">#ECEFF1</color>-->
<!--<color name="blue_grey_100">#CFD8DC</color>-->
<!--<color name="blue_grey_200">#B0BEC5</color>-->
<!--<color name="blue_grey_300">#90A4AE</color>-->
<!--<color name="blue_grey_400">#78909C</color>-->
<!--<color name="blue_grey_500">#607D8B</color>-->
<!--<color name="blue_grey_600">#546E7A</color>-->
<!--<color name="blue_grey_700">#455A64</color>-->
<!--<color name="blue_grey_800">#37474F</color>-->
<!--<color name="blue_grey_900">#263238</color>-->
<color name="blue_grey_50">#ECEFF1</color>
<color name="blue_grey_100">#CFD8DC</color>
<color name="blue_grey_200">#B0BEC5</color>
<color name="blue_grey_300">#90A4AE</color>
<color name="blue_grey_400">#78909C</color>
<color name="blue_grey_500">#607D8B</color>
<color name="blue_grey_600">#546E7A</color>
<color name="blue_grey_700">#455A64</color>
<color name="blue_grey_800">#37474F</color>
<color name="blue_grey_900">#263238</color>
<!--<color name="pink_50">#FCE4EC</color>-->
<!--<color name="pink_100">#F8BBD0</color>-->
<!--<color name="pink_200">#F48FB1</color>-->
<!--<color name="pink_300">#F06292</color>-->
<!--<color name="pink_400">#EC407A</color>-->
<!--<color name="pink_500">#E91E63</color>-->
<!--<color name="pink_600">#D81B60</color>-->
<!--<color name="pink_700">#C2185B</color>-->
<!--<color name="pink_800">#AD1457</color>-->
<!--<color name="pink_900">#880E4F</color>-->
<!--<color name="pink_A100">#FF80AB</color>-->
<!--<color name="pink_A200">#FF4081</color>-->
<!--<color name="pink_A400">#F50057</color>-->
<!--<color name="pink_A700">#C51162</color>-->
<color name="pink_50">#FCE4EC</color>
<color name="pink_100">#F8BBD0</color>
<color name="pink_200">#F48FB1</color>
<color name="pink_300">#F06292</color>
<color name="pink_400">#EC407A</color>
<color name="pink_500">#E91E63</color>
<color name="pink_600">#D81B60</color>
<color name="pink_700">#C2185B</color>
<color name="pink_800">#AD1457</color>
<color name="pink_900">#880E4F</color>
<color name="pink_A100">#FF80AB</color>
<color name="pink_A200">#FF4081</color>
<color name="pink_A400">#F50057</color>
<color name="pink_A700">#C51162</color>
<!--<color name="indigo_50">#E8EAF6</color>-->
<!--<color name="indigo_100">#C5CAE9</color>-->
<!--<color name="indigo_200">#9FA8DA</color>-->
<!--<color name="indigo_300">#7986CB</color>-->
<!--<color name="indigo_400">#5C6BC0</color>-->
<color name="indigo_50">#E8EAF6</color>
<color name="indigo_100">#C5CAE9</color>
<color name="indigo_200">#9FA8DA</color>
<color name="indigo_300">#7986CB</color>
<color name="indigo_400">#5C6BC0</color>
<color name="indigo_500">#3F51B5</color>
<!--<color name="indigo_600">#3949AB</color>-->
<!--<color name="indigo_700">#303F9F</color>-->
<!--<color name="indigo_800">#283593</color>-->
<!--<color name="indigo_900">#1A237E</color>-->
<!--<color name="indigo_A100">#8C9EFF</color>-->
<!--<color name="indigo_A200">#536DFE</color>-->
<!--<color name="indigo_A400">#3D5AFE</color>-->
<!--<color name="indigo_A700">#304FFE</color>-->
<color name="indigo_600">#3949AB</color>
<color name="indigo_700">#303F9F</color>
<color name="indigo_800">#283593</color>
<color name="indigo_900">#1A237E</color>
<color name="indigo_A100">#8C9EFF</color>
<color name="indigo_A200">#536DFE</color>
<color name="indigo_A400">#3D5AFE</color>
<color name="indigo_A700">#304FFE</color>
<!--<color name="cyan_50">#E0F7FA</color>-->
<!--<color name="cyan_100">#B2EBF2</color>-->
<!--<color name="cyan_200">#80DEEA</color>-->
<!--<color name="cyan_300">#4DD0E1</color>-->
<!--<color name="cyan_400">#26C6DA</color>-->
<!--<color name="cyan_500">#00BCD4</color>-->
<!--<color name="cyan_600">#00ACC1</color>-->
<!--<color name="cyan_700">#0097A7</color>-->
<!--<color name="cyan_800">#00838F</color>-->
<!--<color name="cyan_900">#006064</color>-->
<!--<color name="cyan_A100">#84FFFF</color>-->
<!--<color name="cyan_A200">#18FFFF</color>-->
<!--<color name="cyan_A400">#00E5FF</color>-->
<!--<color name="cyan_A700">#00B8D4</color>-->
<color name="cyan_50">#E0F7FA</color>
<color name="cyan_100">#B2EBF2</color>
<color name="cyan_200">#80DEEA</color>
<color name="cyan_300">#4DD0E1</color>
<color name="cyan_400">#26C6DA</color>
<color name="cyan_500">#00BCD4</color>
<color name="cyan_600">#00ACC1</color>
<color name="cyan_700">#0097A7</color>
<color name="cyan_800">#00838F</color>
<color name="cyan_900">#006064</color>
<color name="cyan_A100">#84FFFF</color>
<color name="cyan_A200">#18FFFF</color>
<color name="cyan_A400">#00E5FF</color>
<color name="cyan_A700">#00B8D4</color>
<!--<color name="light_green_50">#F1F8E9</color>-->
<!--<color name="light_green_100">#DCEDC8</color>-->
<!--<color name="light_green_200">#C5E1A5</color>-->
<!--<color name="light_green_300">#AED581</color>-->
<!--<color name="light_green_400">#9CCC65</color>-->
<!--<color name="light_green_500">#8BC34A</color>-->
<!--<color name="light_green_600">#7CB342</color>-->
<!--<color name="light_green_700">#689F38</color>-->
<!--<color name="light_green_800">#558B2F</color>-->
<!--<color name="light_green_900">#33691E</color>-->
<!--<color name="light_green_A100">#CCFF90</color>-->
<!--<color name="light_green_A200">#B2FF59</color>-->
<!--<color name="light_green_A400">#76FF03</color>-->
<!--<color name="light_green_A700">#64DD17</color>-->
<color name="light_green_50">#F1F8E9</color>
<color name="light_green_100">#DCEDC8</color>
<color name="light_green_200">#C5E1A5</color>
<color name="light_green_300">#AED581</color>
<color name="light_green_400">#9CCC65</color>
<color name="light_green_500">#8BC34A</color>
<color name="light_green_600">#7CB342</color>
<color name="light_green_700">#689F38</color>
<color name="light_green_800">#558B2F</color>
<color name="light_green_900">#33691E</color>
<color name="light_green_A100">#CCFF90</color>
<color name="light_green_A200">#B2FF59</color>
<color name="light_green_A400">#76FF03</color>
<color name="light_green_A700">#64DD17</color>
<!--<color name="amber_50">#FFF8E1</color>-->
<!--<color name="amber_100">#FFECB3</color>-->
<!--<color name="amber_200">#FFE082</color>-->
<!--<color name="amber_300">#FFD54F</color>-->
<!--<color name="amber_400">#FFCA28</color>-->
<!--<color name="amber_500">#FFC107</color>-->
<!--<color name="amber_600">#FFB300</color>-->
<!--<color name="amber_700">#FFA000</color>-->
<!--<color name="amber_800">#FF8F00</color>-->
<!--<color name="amber_900">#FF6F00</color>-->
<!--<color name="amber_A100">#FFE57F</color>-->
<!--<color name="amber_A200">#FFD740</color>-->
<!--<color name="amber_A400">#FFC400</color>-->
<!--<color name="amber_A700">#FFAB00</color>-->
<color name="amber_50">#FFF8E1</color>
<color name="amber_100">#FFECB3</color>
<color name="amber_200">#FFE082</color>
<color name="amber_300">#FFD54F</color>
<color name="amber_400">#FFCA28</color>
<color name="amber_500">#FFC107</color>
<color name="amber_600">#FFB300</color>
<color name="amber_700">#FFA000</color>
<color name="amber_800">#FF8F00</color>
<color name="amber_900">#FF6F00</color>
<color name="amber_A100">#FFE57F</color>
<color name="amber_A200">#FFD740</color>
<color name="amber_A400">#FFC400</color>
<color name="amber_A700">#FFAB00</color>
<!--<color name="brown_50">#EFEBE9</color>-->
<!--<color name="brown_100">#D7CCC8</color>-->
<!--<color name="brown_200">#BCAAA4</color>-->
<!--<color name="brown_300">#A1887F</color>-->
<!--<color name="brown_400">#8D6E63</color>-->
<!--<color name="brown_500">#795548</color>-->
<!--<color name="brown_600">#6D4C41</color>-->
<!--<color name="brown_700">#5D4037</color>-->
<!--<color name="brown_800">#4E342E</color>-->
<!--<color name="brown_900">#3E2723</color>-->
<color name="brown_50">#EFEBE9</color>
<color name="brown_100">#D7CCC8</color>
<color name="brown_200">#BCAAA4</color>
<color name="brown_300">#A1887F</color>
<color name="brown_400">#8D6E63</color>
<color name="brown_500">#795548</color>
<color name="brown_600">#6D4C41</color>
<color name="brown_700">#5D4037</color>
<color name="brown_800">#4E342E</color>
<color name="brown_900">#3E2723</color>
<!--<color name="purple_50">#F3E5F5</color>-->
<!--<color name="purple_100">#E1BEE7</color>-->
<!--<color name="purple_200">#CE93D8</color>-->
<!--<color name="purple_300">#BA68C8</color>-->
<!--<color name="purple_400">#AB47BC</color>-->
<!--<color name="purple_500">#9C27B0</color>-->
<!--<color name="purple_600">#8E24AA</color>-->
<!--<color name="purple_700">#7B1FA2</color>-->
<!--<color name="purple_800">#6A1B9A</color>-->
<!--<color name="purple_900">#4A148C</color>-->
<!--<color name="purple_A100">#EA80FC</color>-->
<!--<color name="purple_A200">#E040FB</color>-->
<!--<color name="purple_A400">#D500F9</color>-->
<!--<color name="purple_A700">#AA00FF</color>-->
<color name="purple_50">#F3E5F5</color>
<color name="purple_100">#E1BEE7</color>
<color name="purple_200">#CE93D8</color>
<color name="purple_300">#BA68C8</color>
<color name="purple_400">#AB47BC</color>
<color name="purple_500">#9C27B0</color>
<color name="purple_600">#8E24AA</color>
<color name="purple_700">#7B1FA2</color>
<color name="purple_800">#6A1B9A</color>
<color name="purple_900">#4A148C</color>
<color name="purple_A100">#EA80FC</color>
<color name="purple_A200">#E040FB</color>
<color name="purple_A400">#D500F9</color>
<color name="purple_A700">#AA00FF</color>
<!--<color name="blue_50">#E3F2FD</color>-->
<!--<color name="blue_100">#BBDEFB</color>-->
<!--<color name="blue_200">#90CAF9</color>-->
<!--<color name="blue_300">#64B5F6</color>-->
<!--<color name="blue_400">#42A5F5</color>-->
<!--<color name="blue_500">#2196F3</color>-->
<!--<color name="blue_600">#1E88E5</color>-->
<color name="blue_50">#E3F2FD</color>
<color name="blue_100">#BBDEFB</color>
<color name="blue_200">#90CAF9</color>
<color name="blue_300">#64B5F6</color>
<color name="blue_400">#42A5F5</color>
<color name="blue_500">#2196F3</color>
<color name="blue_600">#1E88E5</color>
<color name="blue_700">#1976D2</color>
<!--<color name="blue_800">#1565C0</color>-->
<!--<color name="blue_900">#0D47A1</color>-->
<!--<color name="blue_A100">#82B1FF</color>-->
<!--<color name="blue_A200">#448AFF</color>-->
<!--<color name="blue_A400">#2979FF</color>-->
<!--<color name="blue_A700">#2962FF</color>-->
<color name="blue_800">#1565C0</color>
<color name="blue_900">#0D47A1</color>
<color name="blue_A100">#82B1FF</color>
<color name="blue_A200">#448AFF</color>
<color name="blue_A400">#2979FF</color>
<color name="blue_A700">#2962FF</color>
<!--<color name="teal_50">#E0F2F1</color>-->
<!--<color name="teal_100">#B2DFDB</color>-->
<!--<color name="teal_200">#80CBC4</color>-->
<!--<color name="teal_300">#4DB6AC</color>-->
<!--<color name="teal_400">#26A69A</color>-->
<!--<color name="teal_500">#009688</color>-->
<!--<color name="teal_600">#00897B</color>-->
<!--<color name="teal_700">#00796B</color>-->
<!--<color name="teal_800">#00695C</color>-->
<!--<color name="teal_900">#004D40</color>-->
<!--<color name="teal_A100">#A7FFEB</color>-->
<!--<color name="teal_A200">#64FFDA</color>-->
<!--<color name="teal_A400">#1DE9B6</color>-->
<!--<color name="teal_A700">#00BFA5</color>-->
<color name="teal_50">#E0F2F1</color>
<color name="teal_100">#B2DFDB</color>
<color name="teal_200">#80CBC4</color>
<color name="teal_300">#4DB6AC</color>
<color name="teal_400">#26A69A</color>
<color name="teal_500">#009688</color>
<color name="teal_600">#00897B</color>
<color name="teal_700">#00796B</color>
<color name="teal_800">#00695C</color>
<color name="teal_900">#004D40</color>
<color name="teal_A100">#A7FFEB</color>
<color name="teal_A200">#64FFDA</color>
<color name="teal_A400">#1DE9B6</color>
<color name="teal_A700">#00BFA5</color>
<!--<color name="lime_50">#F9FBE7</color>-->
<!--<color name="lime_100">#F0F4C3</color>-->
<!--<color name="lime_200">#E6EE9C</color>-->
<!--<color name="lime_300">#DCE775</color>-->
<!--<color name="lime_400">#D4E157</color>-->
<!--<color name="lime_500">#CDDC39</color>-->
<!--<color name="lime_600">#C0CA33</color>-->
<!--<color name="lime_700">#AFB42B</color>-->
<!--<color name="lime_800">#9E9D24</color>-->
<!--<color name="lime_900">#827717</color>-->
<!--<color name="lime_A100">#F4FF81</color>-->
<!--<color name="lime_A200">#EEFF41</color>-->
<!--<color name="lime_A400">#C6FF00</color>-->
<!--<color name="lime_A700">#AEEA00</color>-->
<color name="lime_50">#F9FBE7</color>
<color name="lime_100">#F0F4C3</color>
<color name="lime_200">#E6EE9C</color>
<color name="lime_300">#DCE775</color>
<color name="lime_400">#D4E157</color>
<color name="lime_500">#CDDC39</color>
<color name="lime_600">#C0CA33</color>
<color name="lime_700">#AFB42B</color>
<color name="lime_800">#9E9D24</color>
<color name="lime_900">#827717</color>
<color name="lime_A100">#F4FF81</color>
<color name="lime_A200">#EEFF41</color>
<color name="lime_A400">#C6FF00</color>
<color name="lime_A700">#AEEA00</color>
<!--<color name="orange_50">#FFF3E0</color>-->
<!--<color name="orange_100">#FFE0B2</color>-->
<!--<color name="orange_200">#FFCC80</color>-->
<!--<color name="orange_300">#FFB74D</color>-->
<!--<color name="orange_400">#FFA726</color>-->
<!--<color name="orange_500">#FF9800</color>-->
<!--<color name="orange_600">#FB8C00</color>-->
<!--<color name="orange_700">#F57C00</color>-->
<!--<color name="orange_800">#EF6C00</color>-->
<!--<color name="orange_900">#E65100</color>-->
<!--<color name="orange_A100">#FFD180</color>-->
<!--<color name="orange_A200">#FFAB40</color>-->
<!--<color name="orange_A400">#FF9100</color>-->
<!--<color name="orange_A700">#FF6D00</color>-->
<color name="orange_50">#FFF3E0</color>
<color name="orange_100">#FFE0B2</color>
<color name="orange_200">#FFCC80</color>
<color name="orange_300">#FFB74D</color>
<color name="orange_400">#FFA726</color>
<color name="orange_500">#FF9800</color>
<color name="orange_600">#FB8C00</color>
<color name="orange_700">#F57C00</color>
<color name="orange_800">#EF6C00</color>
<color name="orange_900">#E65100</color>
<color name="orange_A100">#FFD180</color>
<color name="orange_A200">#FFAB40</color>
<color name="orange_A400">#FF9100</color>
<color name="orange_A700">#FF6D00</color>
<color name="grey_50">#FAFAFA</color>
<color name="grey_100">#F5F5F5</color>
@ -323,6 +346,13 @@
<color name="grey_500">#9E9E9E</color>
<color name="grey_600">#757575</color>
<color name="grey_700">#616161</color>
<color name="grey_750">#525252</color>
<color name="grey_800">#424242</color>
<color name="grey_850">#303030</color>
<color name="grey_875">#282828</color>
<color name="grey_900">#212121</color>
<color name="grey_950">#101010</color>
<color name="white">#ffffff</color>
<color name="black">#000000</color>
</resources>

@ -19,13 +19,15 @@
<resources>
<dimen name="baseSize">20dp</dimen>
<dimen name="check_square_size">42dp</dimen>
<dimen name="checkmarkWidth">42dp</dimen>
<dimen name="checkmarkHeight">48dp</dimen>
<dimen name="history_editor_max_height">450dp</dimen>
<dimen name="history_editor_padding">8dp</dimen>
<dimen name="history_max_font_size">@dimen/regularTextSize</dimen>
<dimen name="regularTextSize">16sp</dimen>
<dimen name="smallTextSize">14sp</dimen>
<dimen name="tinyTextSize">10sp</dimen>
<dimen name="tinyTextSize">12sp</dimen>
<dimen name="habitNameWidth">160dp</dimen>
<string-array name="snooze_interval_names">
<item>@string/interval_15_minutes</item>

@ -156,4 +156,8 @@
<string name="generate_bug_report">Generate bug report</string>
<string name="troubleshooting">Troubleshooting</string>
<string name="help_translate">Help translate this app</string>
<string name="night_mode">Night mode</string>
<string name="use_pure_black">Pure black for night mode</string>
<string name="pure_black_description">Use pure black instead of grey backgrounds in night mode. Reduces battery usage in phones with AMOLED display.</string>
<string name="interface_preferences">Interface</string>
</resources>

@ -20,8 +20,77 @@
<resources>
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<item name="android:spinnerItemStyle">@style/dialogFormText</item>
<item name="android:spinnerDropDownItemStyle">@style/dialogFormSpinnerDropDown</item>
<item name="selectedBackground">@drawable/selected_box_light</item>
<item name="headerBackground">@drawable/habits_list_header_light_background</item>
<item name="cardBackground">@drawable/card_light_background</item>
<item name="cardBackgroundColor">@color/white</item>
<item name="windowBackgroundColor">@color/grey_200</item>
<item name="headerBackgroundColor">@color/grey_200</item>
<item name="android:textColor">@color/grey_800</item>
<item name="useHabitColorAsPrimary">true</item>
<item name="palette">@array/lightPalette</item>
<item name="highContrastReverseTextColor">@color/white</item>
<item name="mediumContrastReverseTextColor">@color/grey_500</item>
<item name="lowContrastReverseTextColor">@color/grey_700</item>
<item name="highContrastTextColor">@color/grey_800</item>
<item name="mediumContrastTextColor">@color/grey_500</item>
<item name="lowContrastTextColor">@color/grey_300</item>
<item name="iconAdd">@drawable/ic_action_add_light</item>
<item name="iconArchive">@drawable/ic_action_archive_light</item>
<item name="iconEdit">@drawable/ic_action_edit_light</item>
<item name="iconUnarchive">@drawable/ic_action_unarchive_light</item>
<item name="iconChangeColor">@drawable/ic_action_color_light</item>
<item name="dialogIconChangeColor">@drawable/ic_action_color_light</item>
<item name="dialogFormSpinnerTheme">@style/dialogFormSpinnerLight</item>
<item name="aboutScreenColor">@color/blue_700</item>
</style>
<style name="AppBaseThemeDark" parent="android:Theme.Holo">
<item name="selectedBackground">@drawable/selected_box_dark</item>
<item name="headerBackground">@drawable/habits_list_header_dark_background</item>
<item name="cardBackground">@drawable/card_dark_background</item>
<item name="cardBackgroundColor">@color/grey_850</item>
<item name="windowBackgroundColor">@color/grey_900</item>
<item name="headerBackgroundColor">@color/grey_900</item>
<item name="android:textColor">@color/grey_100</item>
<item name="useHabitColorAsPrimary">false</item>
<item name="highContrastTextColor">@color/grey_100</item>
<item name="mediumContrastTextColor">@color/grey_500</item>
<item name="lowContrastTextColor">@color/grey_800</item>
<item name="highContrastReverseTextColor">@color/grey_900</item>
<item name="mediumContrastReverseTextColor">@color/grey_700</item>
<item name="lowContrastReverseTextColor">@color/grey_300</item>
<item name="iconAdd">@drawable/ic_action_add_dark</item>
<item name="iconArchive">@drawable/ic_action_archive_dark</item>
<item name="iconEdit">@drawable/ic_action_edit_dark</item>
<item name="iconUnarchive">@drawable/ic_action_unarchive_dark</item>
<item name="iconChangeColor">@drawable/ic_action_color_dark</item>
<item name="dialogIconChangeColor">@drawable/ic_action_color_dark</item>
<item name="dialogFormSpinnerTheme">@style/dialogFormSpinnerDark</item>
<item name="palette">@array/darkPalette</item>
<item name="aboutScreenColor">@color/blue_300</item>
</style>
<style name="AppBaseThemeDark.PureBlack">
<item name="selectedBackground">@drawable/selected_box_amoled</item>
<item name="headerBackground">@drawable/habits_list_header_amoled_background</item>
<item name="cardBackground">@drawable/card_amoled_background</item>
<item name="cardBackgroundColor">@color/black</item>
<item name="windowBackgroundColor">@color/black</item>
<item name="headerBackgroundColor">@color/black</item>
<item name="lowContrastTextColor">@color/grey_900</item>
<item name="highContrastReverseTextColor">@color/black</item>
</style>
<style name="time_label">
@ -38,14 +107,14 @@
<style name="day_of_week_label_condensed"/>
<style name="cardsListStyle">
<style name="CardList">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@color/windowBackground</item>
<item name="android:background">?windowBackgroundColor</item>
<item name="android:orientation">vertical</item>
</style>
<style name="cardBasicStyle">
<style name="CardCommon">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
@ -56,33 +125,35 @@
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginLeft">3dp</item>
<item name="android:layout_marginRight">3dp</item>
<item name="android:background">?cardBackground</item>
</style>
<style name="cardStyle" parent="cardBasicStyle">
<item name="android:background">@drawable/card_background</item>
<style name="Card" parent="CardCommon">
<item name="android:layout_marginBottom">1dp</item>
</style>
<style name="cardHeaderStyle">
<style name="CardHeader">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">12dp</item>
<item name="android:textSize">@dimen/regularTextSize</item>
</style>
<style name="cardRowStyle">
<style name="CardRow">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">4dp</item>
<item name="android:layout_marginTop">4dp</item>
</style>
<style name="cardLabelStyle">
<style name="CardLabel">
<item name="android:layout_width">120dp</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="aboutItemStyle">
<style name="About" />
<style name="About.Item">
<item name="android:textSize">16sp</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
@ -90,17 +161,17 @@
<item name="android:paddingBottom">6dp</item>
</style>
<style name="aboutClickableItemStyle" parent="aboutItemStyle">
<style name="About.Item.Clickable">
<item name="android:paddingBottom">12dp</item>
<item name="android:paddingTop">12dp</item>
</style>
<style name="smallDataViewStyle">
<style name="SmallDataView">
<item name="android:layout_width">100dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginRight">8dp</item>
<item name="android:textColor">@color/fadedTextColor</item>
<item name="android:textColor">?mediumContrastTextColor</item>
</style>
</resources>

@ -45,19 +45,19 @@
<style name="dialogFormText">
<item name="android:textSize">@dimen/regularTextSize</item>
<item name="android:textColor">@color/secondaryTextColor</item>
<item name="android:textColor">?highContrastTextColor</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="dialogFormSmallText">
<item name="android:textSize">@dimen/smallTextSize</item>
<item name="android:textColor">@color/fadedTextColor</item>
<item name="android:textColor">?mediumContrastTextColor</item>
</style>
<style name="dialogFormSpinnerDropDown" parent="dialogFormText">
<item name="android:padding">12dp</item>
<item name="android:textColor">@color/secondaryTextColor</item>
<item name="android:textColor">?highContrastTextColor</item>
</style>
<style name="dialogFormInput" parent="dialogFormText">
@ -74,16 +74,25 @@
<item name="android:minWidth">100dp</item>
<item name="android:gravity">left</item>
<item name="android:paddingLeft">6dp</item>
<item name="android:textColor">@color/fadedTextColor</item>
<item name="android:textColor">?mediumContrastTextColor</item>
</style>
<style name="dialogFormSpinner" parent="android:Widget.DeviceDefault.Light.Spinner">
<style name="dialogFormSpinnerDark" parent="android:Widget.DeviceDefault.Spinner">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:textSize">@dimen/regularTextSize</item>
<item name="android:minWidth">400dp</item>
<item name="android:textColor">@color/secondaryTextColor</item>
<item name="android:textColor">?highContrastTextColor</item>
</style>
<style name="dialogFormSpinnerLight" parent="android:Widget.DeviceDefault.Light.Spinner">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:textSize">@dimen/regularTextSize</item>
<item name="android:minWidth">400dp</item>
<item name="android:textColor">?highContrastTextColor</item>
</style>
<style name="dialogFormRow">

@ -20,88 +20,66 @@
<resources>
<style name="habitsListStyle">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:divider">@color/windowBackground</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:paddingTop">42dp</item>
<item name="android:background">@color/windowBackground</item>
<style name="ListHabits">
<item name="android:background">@color/transparent</item>
</style>
<style name="habitsListHeaderBasicStyle">
<style name="ListHabits.Header">
<item name="android:background">?headerBackground</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentTop">true</item>
<item name="android:paddingRight">4dp</item>
</style>
<style name="habitsListHeaderStyle" parent="habitsListHeaderBasicStyle">
<item name="android:background">@drawable/habits_list_header_background</item>
</style>
<style name="habitsListStarStyle">
<style name="ListHabits.Star">
<item name="android:paddingTop">2dp</item>
<item name="android:layout_width">30dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_marginTop">0dp</item>
<item name="android:gravity">center</item>
<item name="android:paddingTop">1dp</item>
<item name="android:textSize">16sp</item>
<item name="android:background">@color/transparent</item>
</style>
<style name="habitsListNameStyle">
<style name="ListHabits.Label">
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center_vertical</item>
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">6dp</item>
<item name="android:paddingTop">10dp</item>
</style>
<style name="habitsListButtonsPanelStyle">
<style name="ListHabits.CheckmarkPanel">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">42dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:orientation">horizontal</item>
</style>
<style name="habitsListItemStyle">
<style name="ListHabits.Item">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@color/windowBackground</item>
<item name="android:background">@color/transparent</item>
<item name="android:clipToPadding">false</item>
<item name="android:orientation">horizontal</item>
</style>
<style name="habitsListItemInnerPanelStyle" parent="cardStyle">
<style name="ListHabits.HabitCard" parent="Card">
<item name="android:orientation">horizontal</item>
<item name="android:padding">3dp</item>
<item name="android:padding">0dp</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="habitsListCheckBasicStyle">
<style name="ListHabits.CheckmarkCommon">
<item name="android:focusable">false</item>
<item name="android:minHeight">@dimen/check_square_size</item>
<item name="android:minWidth">@dimen/check_square_size</item>
<item name="android:minHeight">@dimen/checkmarkHeight</item>
<item name="android:width">@dimen/checkmarkWidth</item>
<item name="android:gravity">center</item>
</style>
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
</style>
<style name="habitsListHeaderCheckStyle" parent="habitsListCheckStyle">
<item name="android:layout_width">42dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:background">@color/transparent</item>
<item name="android:focusable">false</item>
<item name="android:textSize">10sp</item>
<item name="android:textColor">#606060</item>
<style name="ListHabits.Checkmark" parent="ListHabits.CheckmarkCommon">
</style>
<style name="habitsListEmptyStyle">
<style name="ListHabits.EmptyState">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save