1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

First batch of Material Design with complete new themes, styles and ActionBar drawables.

This commit is contained in:
Christophe Beyls 2015-01-06 01:39:50 +01:00
parent bc689437ac
commit 28828062bd
346 changed files with 534 additions and 376 deletions

View file

@ -1,18 +1,13 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
compileSdkVersion 19 compileSdkVersion 21
buildToolsVersion "21.1.2" buildToolsVersion "21.1.2"
defaultConfig { defaultConfig {
applicationId "be.digitalia.fosdem" applicationId "be.digitalia.fosdem"
minSdkVersion 7 minSdkVersion 7
targetSdkVersion 19 targetSdkVersion 21
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
} }
buildTypes { buildTypes {
@ -24,6 +19,7 @@ android {
} }
dependencies { dependencies {
compile 'com.android.support:appcompat-v7:20.0.+' compile 'com.android.support:appcompat-v7:21.0.+'
compile 'com.github.chrisbanes.photoview:library:1.2.+' // Version 1.2.3 has a bug and crashes when detecting 2-finger gestures. Use 1.2.2 instead.
compile 'com.github.chrisbanes.photoview:library:1.2.2'
} }

View file

@ -1,26 +1,27 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest
package="be.digitalia.fosdem" package="be.digitalia.fosdem"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="700110" android:versionCode="700130"
android:versionName="1.1.0" > android:versionName="1.3.0">
<uses-sdk <uses-sdk
android:minSdkVersion="7" android:minSdkVersion="7"
android:targetSdkVersion="19" /> android:targetSdkVersion="21"/>
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.NFC" /> <uses-permission android:name="android.permission.NFC"/>
<!-- Permissions required for alarms --> <!-- Permissions required for alarms -->
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE"/>
<!-- Make touch screen optional since all screens can be used with a pad --> <!-- Make touch screen optional since all screens can be used with a pad -->
<uses-feature <uses-feature
android:name="android.hardware.touchscreen" android:name="android.hardware.touchscreen"
android:required="false" /> android:required="false"/>
<application <application
android:name="be.digitalia.fosdem.FosdemApplication" android:name="be.digitalia.fosdem.FosdemApplication"
@ -28,73 +29,74 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@style/AppTheme">
<activity <activity
android:name=".activities.MainActivity" android:name=".activities.MainActivity"
android:label="@string/app_name" > android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.app.default_searchable" android:name="android.app.default_searchable"
android:value=".activities.SearchResultActivity" /> android:value=".activities.SearchResultActivity"/>
</activity> </activity>
<activity android:name=".activities.TrackScheduleActivity" > <activity android:name=".activities.TrackScheduleActivity">
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" /> android:value=".activities.MainActivity"/>
</activity> </activity>
<activity android:name=".activities.TrackScheduleEventActivity" /> <activity android:name=".activities.TrackScheduleEventActivity"/>
<activity android:name=".activities.EventDetailsActivity" > <activity android:name=".activities.EventDetailsActivity">
<intent-filter> <intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" /> <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/be.digitalia.fosdem" /> <data android:mimeType="application/be.digitalia.fosdem"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".activities.PersonInfoActivity" /> <activity android:name=".activities.PersonInfoActivity"/>
<activity <activity
android:name=".activities.SearchResultActivity" android:name=".activities.SearchResultActivity"
android:launchMode="singleTop" > android:launchMode="singleTop">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEARCH" /> <action android:name="android.intent.action.SEARCH"/>
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.app.searchable" android:name="android.app.searchable"
android:resource="@xml/main_searchable" /> android:resource="@xml/main_searchable"/>
</activity> </activity>
<!-- Clearing the Task Affinity allows this dialog activity to be displayed without bringing to front the main application with it. --> <!-- Clearing the Task Affinity allows this dialog activity to be displayed without bringing to front the main application with it. -->
<activity <activity
android:name=".activities.RoomImageDialogActivity" android:name=".activities.RoomImageDialogActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:taskAffinity="" android:taskAffinity=""
android:theme="@style/DialogTheme" /> android:theme="@style/DialogTheme"/>
<activity <activity
android:name=".activities.SettingsActivity" android:name=".activities.SettingsActivity"
android:label="@string/settings" /> android:label="@string/settings"/>
<receiver <receiver
android:name=".receivers.AlarmReceiver" android:name=".receivers.AlarmReceiver"
android:exported="false" > android:exported="false">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter> </intent-filter>
</receiver> </receiver>
<service <service
android:name=".services.AlarmIntentService" android:name=".services.AlarmIntentService"
android:exported="false" /> android:exported="false"/>
<provider <provider
android:name=".providers.SearchSuggestionProvider" android:name=".providers.SearchSuggestionProvider"
android:authorities="be.digitalia.fosdem.search" android:authorities="be.digitalia.fosdem.search"
android:exported="true" /> android:exported="true"/>
</application> </application>
</manifest> </manifest>

View file

@ -1,9 +1,5 @@
package be.digitalia.fosdem.activities; package be.digitalia.fosdem.activities;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
@ -15,14 +11,16 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.TypedArray;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.StringRes; import android.support.annotation.StringRes;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.app.DialogFragment; import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
@ -31,21 +29,31 @@ import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.MenuItemCompat; import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.SearchView; import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan;
import android.view.Gravity; import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Window; import android.view.animation.AnimationUtils;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.ListView; import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import be.digitalia.fosdem.R; import be.digitalia.fosdem.R;
import be.digitalia.fosdem.api.FosdemApi; import be.digitalia.fosdem.api.FosdemApi;
import be.digitalia.fosdem.db.DatabaseManager; import be.digitalia.fosdem.db.DatabaseManager;
@ -63,11 +71,11 @@ import be.digitalia.fosdem.fragments.TracksFragment;
public class MainActivity extends ActionBarActivity implements ListView.OnItemClickListener { public class MainActivity extends ActionBarActivity implements ListView.OnItemClickListener {
private enum Section { private enum Section {
TRACKS(TracksFragment.class, R.string.menu_tracks, R.drawable.ic_action_event, true), TRACKS(TracksFragment.class, R.string.menu_tracks, R.drawable.ic_event_grey600_24dp, true),
BOOKMARKS(BookmarksListFragment.class, R.string.menu_bookmarks, R.drawable.ic_action_important, false), BOOKMARKS(BookmarksListFragment.class, R.string.menu_bookmarks, R.drawable.ic_bookmark_grey600_24dp, false),
LIVE(LiveFragment.class, R.string.menu_live, R.drawable.ic_action_play_over_video, false), LIVE(LiveFragment.class, R.string.menu_live, R.drawable.ic_play_circle_outline_grey600_24dp, false),
SPEAKERS(PersonsListFragment.class, R.string.menu_speakers, R.drawable.ic_action_group, false), SPEAKERS(PersonsListFragment.class, R.string.menu_speakers, R.drawable.ic_people_grey600_24dp, false),
MAP(MapFragment.class, R.string.menu_map, R.drawable.ic_action_map, false); MAP(MapFragment.class, R.string.menu_map, R.drawable.ic_map_grey600_24dp, false);
private final String fragmentClassName; private final String fragmentClassName;
private final int titleResId; private final int titleResId;
@ -108,6 +116,7 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
private Section currentSection; private Section currentSection;
private ProgressBar progressBar;
private DrawerLayout drawerLayout; private DrawerLayout drawerLayout;
private ActionBarDrawerToggle drawerToggle; private ActionBarDrawerToggle drawerToggle;
private View mainMenu; private View mainMenu;
@ -120,8 +129,8 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
setSupportProgressBarIndeterminate(false); progressBar.setIndeterminate(false);
setSupportProgress(intent.getIntExtra(FosdemApi.EXTRA_PROGRESS, 0) * 100); progressBar.setProgress(intent.getIntExtra(FosdemApi.EXTRA_PROGRESS, 0));
} }
}; };
@ -130,8 +139,10 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
// Hide the progress bar with a fill and fade out animation // Hide the progress bar with a fill and fade out animation
setSupportProgressBarIndeterminate(false); progressBar.setIndeterminate(false);
setSupportProgress(10000); progressBar.setProgress(100);
progressBar.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, android.R.anim.fade_out));
progressBar.setVisibility(View.GONE);
int result = intent.getIntExtra(FosdemApi.EXTRA_RESULT, FosdemApi.RESULT_ERROR); int result = intent.getIntExtra(FosdemApi.EXTRA_RESULT, FosdemApi.RESULT_ERROR);
String message; String message;
@ -177,14 +188,18 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_PROGRESS);
setContentView(R.layout.main); setContentView(R.layout.main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
progressBar = (ProgressBar) findViewById(R.id.progress);
// Setup drawer layout // Setup drawer layout
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
drawerLayout.setDrawerShadow(getResources().getDrawable(R.drawable.drawer_shadow), Gravity.LEFT); drawerLayout.setDrawerShadow(getResources().getDrawable(R.drawable.drawer_shadow), Gravity.LEFT);
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.drawable.ic_drawer, R.string.main_menu, R.string.close_menu) { drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.main_menu, R.string.close_menu) {
@Override @Override
public void onDrawerOpened(View drawerView) { public void onDrawerOpened(View drawerView) {
@ -277,7 +292,7 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
super.onStart(); super.onStart();
// Ensure the progress bar is hidden when starting // Ensure the progress bar is hidden when starting
setSupportProgressBarVisibility(false); progressBar.setVisibility(View.GONE);
// Monitor the schedule download // Monitor the schedule download
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
@ -390,8 +405,9 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
@SuppressLint("NewApi") @SuppressLint("NewApi")
public void startDownloadSchedule() { public void startDownloadSchedule() {
// Start by displaying indeterminate progress, determinate will come later // Start by displaying indeterminate progress, determinate will come later
setSupportProgressBarIndeterminate(true); progressBar.clearAnimation();
setSupportProgressBarVisibility(true); progressBar.setIndeterminate(true);
progressBar.setVisibility(View.VISIBLE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
new DownloadScheduleAsyncTask(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new DownloadScheduleAsyncTask(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else { } else {
@ -420,10 +436,18 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
private Section[] sections = Section.values(); private Section[] sections = Section.values();
private LayoutInflater inflater; private LayoutInflater inflater;
private int currentSectionForegroundColor;
private int currentSectionBackgroundColor; private int currentSectionBackgroundColor;
public MainMenuAdapter(LayoutInflater inflater) { public MainMenuAdapter(LayoutInflater inflater) {
this.inflater = inflater; this.inflater = inflater;
// Select the primary color to tint the current section
TypedArray a = getTheme().obtainStyledAttributes(new int[]{R.attr.colorPrimary});
try {
currentSectionForegroundColor = a.getColor(0, Color.TRANSPARENT);
} finally {
a.recycle();
}
currentSectionBackgroundColor = getResources().getColor(R.color.translucent_grey); currentSectionBackgroundColor = getResources().getColor(R.color.translucent_grey);
} }
@ -451,10 +475,22 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
Section section = getItem(position); Section section = getItem(position);
TextView tv = (TextView) convertView.findViewById(R.id.section_text); TextView tv = (TextView) convertView.findViewById(R.id.section_text);
tv.setText(section.getTitleResId()); SpannableString sectionTitle = new SpannableString(getString(section.getTitleResId()));
tv.setCompoundDrawablesWithIntrinsicBounds(section.getIconResId(), 0, 0, 0); Drawable sectionIcon = getResources().getDrawable(section.getIconResId());
// Show highlighted background for current section int backgroundColor;
tv.setBackgroundColor((section == currentSection) ? currentSectionBackgroundColor : Color.TRANSPARENT); if (section == currentSection) {
// Special color for the current section
//sectionTitle.setSpan(new StyleSpan(Typeface.BOLD), 0, sectionTitle.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
sectionTitle.setSpan(new ForegroundColorSpan(currentSectionForegroundColor), 0, sectionTitle.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
// We need to mutate the drawable before applying the ColorFilter, or else all the similar drawable instances will be tinted.
sectionIcon.mutate().setColorFilter(currentSectionForegroundColor, PorterDuff.Mode.SRC_IN);
backgroundColor = currentSectionBackgroundColor;
} else {
backgroundColor = Color.TRANSPARENT;
}
tv.setText(sectionTitle);
tv.setCompoundDrawablesWithIntrinsicBounds(sectionIcon, null, null, null);
tv.setBackgroundColor(backgroundColor);
return convertView; return convertView;
} }

View file

@ -73,7 +73,7 @@ public class EventsAdapter extends CursorAdapter {
} }
spannableString.setSpan(holder.titleSizeSpan, 0, eventTitle.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(holder.titleSizeSpan, 0, eventTitle.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
holder.title.setText(spannableString); holder.title.setText(spannableString);
int bookmarkDrawable = DatabaseManager.toBookmarkStatus(cursor) ? R.drawable.ic_small_starred : 0; int bookmarkDrawable = DatabaseManager.toBookmarkStatus(cursor) ? R.drawable.ic_bookmark_grey600_24dp : 0;
holder.title.setCompoundDrawablesWithIntrinsicBounds(0, 0, bookmarkDrawable, 0); holder.title.setCompoundDrawablesWithIntrinsicBounds(0, 0, bookmarkDrawable, 0);
holder.trackName.setText(event.getTrack().getName()); holder.trackName.setText(event.getTrack().getName());

View file

@ -14,6 +14,7 @@ import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.ListView; import android.widget.ListView;
import be.digitalia.fosdem.R; import be.digitalia.fosdem.R;
import be.digitalia.fosdem.activities.EventDetailsActivity; import be.digitalia.fosdem.activities.EventDetailsActivity;
import be.digitalia.fosdem.adapters.EventsAdapter; import be.digitalia.fosdem.adapters.EventsAdapter;
@ -24,9 +25,8 @@ import be.digitalia.fosdem.widgets.BookmarksMultiChoiceModeListener;
/** /**
* Bookmarks list, optionally filterable. * Bookmarks list, optionally filterable.
* *
* @author Christophe Beyls * @author Christophe Beyls
*
*/ */
public class BookmarksListFragment extends ListFragment implements LoaderCallbacks<Cursor> { public class BookmarksListFragment extends ListFragment implements LoaderCallbacks<Cursor> {
@ -75,7 +75,9 @@ public class BookmarksListFragment extends ListFragment implements LoaderCallbac
private void updateOptionsMenu() { private void updateOptionsMenu() {
if (filterMenuItem != null) { if (filterMenuItem != null) {
filterMenuItem.setIcon(upcomingOnly ? R.drawable.ic_action_filter_selected : R.drawable.ic_action_filter); filterMenuItem.setIcon(upcomingOnly ?
R.drawable.ic_filter_list_selected_white_24dp
: R.drawable.ic_filter_list_white_24dp);
upcomingOnlyMenuItem.setChecked(upcomingOnly); upcomingOnlyMenuItem.setChecked(upcomingOnly);
} }
} }
@ -90,12 +92,12 @@ public class BookmarksListFragment extends ListFragment implements LoaderCallbac
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.upcoming_only: case R.id.upcoming_only:
upcomingOnly = !upcomingOnly; upcomingOnly = !upcomingOnly;
updateOptionsMenu(); updateOptionsMenu();
getActivity().getPreferences(Context.MODE_PRIVATE).edit().putBoolean(PREF_UPCOMING_ONLY, upcomingOnly).commit(); getActivity().getPreferences(Context.MODE_PRIVATE).edit().putBoolean(PREF_UPCOMING_ONLY, upcomingOnly).commit();
getLoaderManager().restartLoader(BOOKMARKS_LOADER_ID, null, this); getLoaderManager().restartLoader(BOOKMARKS_LOADER_ID, null, this);
return true; return true;
} }
return false; return false;
} }

View file

@ -1,9 +1,5 @@
package be.digitalia.fosdem.fragments; package be.digitalia.fosdem.fragments;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -32,6 +28,11 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
import be.digitalia.fosdem.R; import be.digitalia.fosdem.R;
import be.digitalia.fosdem.activities.PersonInfoActivity; import be.digitalia.fosdem.activities.PersonInfoActivity;
import be.digitalia.fosdem.db.DatabaseManager; import be.digitalia.fosdem.db.DatabaseManager;
@ -201,10 +202,10 @@ public class EventDetailsFragment extends Fragment {
if (isBookmarked) { if (isBookmarked) {
bookmarkMenuItem.setTitle(R.string.remove_bookmark); bookmarkMenuItem.setTitle(R.string.remove_bookmark);
bookmarkMenuItem.setIcon(R.drawable.ic_action_important); bookmarkMenuItem.setIcon(R.drawable.ic_bookmark_white_24dp);
} else { } else {
bookmarkMenuItem.setTitle(R.string.add_bookmark); bookmarkMenuItem.setTitle(R.string.add_bookmark);
bookmarkMenuItem.setIcon(R.drawable.ic_action_not_important); bookmarkMenuItem.setIcon(R.drawable.ic_bookmark_outline_white_24dp);
} }
} }
} }
@ -219,14 +220,14 @@ public class EventDetailsFragment extends Fragment {
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.bookmark: case R.id.bookmark:
if (isBookmarked != null) { if (isBookmarked != null) {
new UpdateBookmarkAsyncTask(event).execute(isBookmarked); new UpdateBookmarkAsyncTask(event).execute(isBookmarked);
} }
return true; return true;
case R.id.add_to_agenda: case R.id.add_to_agenda:
addToAgenda(); addToAgenda();
return true; return true;
} }
return false; return false;
} }

View file

@ -321,7 +321,7 @@ public class TrackScheduleListFragment extends ListFragment implements Handler.C
spannableString.setSpan(holder.boldStyleSpan, 0, eventTitle.length() + personsSummary.length() + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(holder.boldStyleSpan, 0, eventTitle.length() + personsSummary.length() + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
holder.text.setText(spannableString); holder.text.setText(spannableString);
int bookmarkDrawable = DatabaseManager.toBookmarkStatus(cursor) ? R.drawable.ic_small_starred : 0; int bookmarkDrawable = DatabaseManager.toBookmarkStatus(cursor) ? R.drawable.ic_bookmark_grey600_24dp : 0;
holder.text.setCompoundDrawablesWithIntrinsicBounds(0, 0, bookmarkDrawable, 0); holder.text.setCompoundDrawablesWithIntrinsicBounds(0, 0, bookmarkDrawable, 0);
} }

View file

@ -202,7 +202,7 @@ public class AlarmIntentService extends IntentService {
PendingIntent mapPendingIntent = PendingIntent.getActivity(this, 0, mapIntent, PendingIntent mapPendingIntent = PendingIntent.getActivity(this, 0, mapIntent,
PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT);
CharSequence mapTitle = getString(R.string.room_map); CharSequence mapTitle = getString(R.string.room_map);
notificationBuilder.addAction(new NotificationCompat.Action(R.drawable.ic_action_place, mapTitle, notificationBuilder.addAction(new NotificationCompat.Action(R.drawable.ic_place_white_24dp, mapTitle,
mapPendingIntent)); mapPendingIntent));
// Use bigger action icon for wearable notification // Use bigger action icon for wearable notification
wearableExtender.addAction(new NotificationCompat.Action(R.drawable.ic_place_white_wear, mapTitle, wearableExtender.addAction(new NotificationCompat.Action(R.drawable.ic_place_white_wear, mapTitle,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

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