Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3ade746 authored by tobias's avatar tobias
Browse files

merged

parent fab47ebd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
    <color name="priority_red">#FF412B</color>
    <color name="priority_yellow">#FFFD16</color>
    
    
    <color name="list_background_pressed">#11000000</color>
    <color name="list_background_activated">#33000000</color>

@@ -38,4 +37,8 @@
    <!-- A really bright Holo shade of blue -->
    <color name="holo_blue_bright">#ff00ddff</color>

    <!-- Our primary color - a nice shade of teal -->
    <color name="colorPrimary">#009688</color>
    <color name="colorPrimaryDarker">#00796b</color>

</resources>
 No newline at end of file
+1 −11
Original line number Diff line number Diff line
@@ -324,21 +324,11 @@ public class QuickAddDialogFragment extends SupportDialogFragment implements OnE
	}


	private static int darkenColor(int color)
	{
		float[] hsv = new float[3];
		Color.colorToHSV(color, hsv);
		hsv[2] = hsv[2] * 0.75f;
		color = Color.HSVToColor(hsv);
		return color;
	}


	@Override
	public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
	{
		Cursor c = (Cursor) parent.getItemAtPosition(position);
		mLastColor = darkenColor(TaskFieldAdapters.LIST_COLOR.get(c));
		mLastColor = TaskFieldAdapters.LIST_COLOR.get(c);
		mColorBackground.setBackgroundColor(mLastColor);
		mSelectedListId = id;
	}
+9 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ public class ViewTaskActivity extends ActionBarActivity implements ViewTaskFragm
		// If should be in two-pane mode, finish to return to main activity
		if (getResources().getBoolean(R.bool.has_two_panes))
		{
			Intent taskListIntent = new Intent(this, TaskListActivity.class);
			startActivity(taskListIntent);
			finish();
			return;
		}
@@ -114,4 +116,11 @@ public class ViewTaskActivity extends ActionBarActivity implements ViewTaskFragm
		finish();
	}


	@Override
	public void updateColor(int color)
	{
		// nothing to do here
	}

}
+10 −0
Original line number Diff line number Diff line
@@ -179,6 +179,15 @@ public class ViewTaskFragment extends SupportFragment implements OnModelLoadedLi
		 *            The {@link Uri} of the deleted task. Note that the Uri is likely to be invalid at the time of calling this method.
		 */
		public void onDelete(Uri taskUri);


		/**
		 * Notifies the listener about the list color of the current task.
		 * 
		 * @param color
		 *            The color.
		 */
		public void updateColor(int color);
	}


@@ -688,6 +697,7 @@ public class ViewTaskFragment extends SupportFragment implements OnModelLoadedLi
		if (contentSet.containsKey(Tasks.ACCOUNT_TYPE))
		{
			mListColor = TaskFieldAdapters.LIST_COLOR.get(contentSet);
			((Callback) getActivity()).updateColor(darkenColor2(mListColor));

			if (VERSION.SDK_INT >= 11)
			{