Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-02-26 14:55:25 +01:00
commit 106a257654
4 changed files with 258 additions and 237 deletions

View file

@ -1,91 +1,97 @@
<LinearLayout <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:osmand="http://schemas.android.com/apk/res-auto" xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" tools:context="net.osmand.plus.liveupdates.ReportsFragment">
tools:context="net.osmand.plus.liveupdates.ReportsFragment" >
<include layout="@layout/card_top_divider" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/card_top_divider"/>
<GridLayout <GridLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/bg_color" android:background="?attr/bg_color"
android:columnCount="2" > android:columnCount="2">
<LinearLayout <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_columnSpan="2" android:layout_columnSpan="2"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:gravity="center_vertical"
android:minHeight="48dp" android:minHeight="48dp"
android:layout_width="match_parent" android:orientation="horizontal">
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/select_month_and_country" android:text="@string/select_month_and_country"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary"/>
<net.osmand.plus.widgets.ButtonEx <net.osmand.plus.widgets.ButtonEx
android:id="@+id/show_all" android:id="@+id/show_all"
style="@style/DashboardGeneralButton" style="@style/DashboardGeneralButton"
android:text="@string/shared_string_all" android:text="@string/shared_string_all"
osmand:textAllCapsCompat="true" osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium" /> osmand:typeface="@string/font_roboto_medium"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_height="1dp" android:layout_height="1dp"
android:layout_columnSpan="2" android:layout_columnSpan="2"
android:background="?attr/dashboard_divider" /> android:background="?attr/dashboard_divider"/>
<ImageView <ImageView
android:id="@+id/calendarImageView" android:id="@+id/calendarImageView"
android:layout_width="56dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginLeft="16dp" android:scaleType="center"
android:src="@drawable/ic_action_data" /> android:src="@drawable/ic_action_data"/>
<Spinner <Spinner
android:id="@+id/montReportsSpinner" android:id="@+id/montReportsSpinner"
android:layout_gravity="fill_horizontal|fill_vertical" android:layout_gravity="fill_horizontal|fill_vertical"
android:layout_marginLeft="8dp"
android:layout_marginRight="56dp" android:layout_marginRight="56dp"
android:gravity="center_vertical" /> android:gravity="center_vertical"/>
<View <View
android:layout_height="1dp" android:layout_height="1dp"
android:layout_column="1" android:layout_column="1"
android:background="?attr/dashboard_divider" /> android:background="?attr/dashboard_divider"/>
<ImageView <ImageView
android:id="@+id/regionIconImageView" android:id="@+id/regionIconImageView"
android:layout_height="60dp" android:layout_width="56dp"
android:layout_marginLeft="16dp" android:layout_height="56dp"
android:src="@drawable/ic_world_globe_dark" /> android:paddingTop="4dp"
android:scaleType="center"
android:src="@drawable/ic_world_globe_dark"/>
<LinearLayout <LinearLayout
android:id="@+id/reportsButton" android:id="@+id/reportsButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginLeft="16dp"
android:background="?attr/expandable_list_item_background"
android:gravity="center" android:gravity="center"
android:orientation="vertical" > android:orientation="vertical"
android:paddingTop="4dp">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/reports_for" android:text="@string/reports_for"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" /> android:textSize="@dimen/default_sub_text_size"/>
<TextView <TextView
android:id="@android:id/text1" android:id="@android:id/text1"
@ -93,36 +99,41 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal" android:layout_gravity="fill_horizontal"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
tools:text="Worldwide" /> tools:text="Worldwide"/>
</LinearLayout> </LinearLayout>
<View <View
android:id="@+id/divider_to_hide"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_columnSpan="2" android:layout_columnSpan="2"
android:background="?attr/dashboard_divider" /> android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:background="?attr/dashboard_divider"/>
<ProgressBar <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="9dp"
android:layout_columnSpan="2" /> android:layout_columnSpan="2"
android:indeterminate="true"/>
<ImageView <ImageView
android:id="@+id/numberOfContributorsIcon" android:id="@+id/numberOfContributorsIcon"
android:layout_height="60dp" android:layout_width="56dp"
android:layout_marginLeft="16dp" android:layout_height="56dp"
android:src="@drawable/ic_group" /> android:paddingBottom="4dp"
android:scaleType="center"
android:src="@drawable/ic_group"/>
<LinearLayout <LinearLayout
android:id="@+id/numberOfContributorsLayout" android:id="@+id/numberOfContributorsLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginLeft="16dp"
android:background="?attr/expandable_list_item_background"
android:gravity="center" android:gravity="center"
android:orientation="vertical" > android:orientation="vertical"
android:paddingBottom="4dp">
<TextView <TextView
android:id="@+id/numberOfContributorsTitle" android:id="@+id/numberOfContributorsTitle"
@ -130,36 +141,35 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/number_of_contributors" android:text="@string/number_of_contributors"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" /> android:textSize="@dimen/default_sub_text_size"/>
<TextView <TextView
android:id="@+id/contributorsTextView" android:id="@+id/contributorsTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0" android:text="0"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_height="1dp" android:layout_height="1dp"
android:layout_column="1" android:layout_column="1"
android:background="?attr/dashboard_divider" /> android:background="?attr/dashboard_divider"/>
<ImageView <ImageView
android:id="@+id/numberOfEditsIcon" android:id="@+id/numberOfEditsIcon"
android:layout_width="56dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginLeft="16dp" android:scaleType="center"
android:src="@drawable/ic_world_globe_dark" /> android:src="@drawable/ic_world_globe_dark"/>
<LinearLayout <LinearLayout
android:id="@+id/numberOfEditsLayout" android:id="@+id/numberOfEditsLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginLeft="16dp"
android:background="?attr/expandable_list_item_background"
android:gravity="center" android:gravity="center"
android:orientation="vertical" > android:orientation="vertical">
<TextView <TextView
android:id="@+id/numberOfEditsTitle" android:id="@+id/numberOfEditsTitle"
@ -167,84 +177,87 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/number_of_edits" android:text="@string/number_of_edits"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" /> android:textSize="@dimen/default_sub_text_size"/>
<TextView <TextView
android:id="@+id/editsTextView" android:id="@+id/editsTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0" android:text="0"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary"/>
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:id="@+id/donationsIcon" android:id="@+id/donationsIcon"
android:layout_width="56dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginLeft="16dp" android:scaleType="center"
android:src="@drawable/ic_action_message" /> android:src="@drawable/ic_action_message"/>
<LinearLayout <LinearLayout
android:id="@+id/donationsLayout" android:id="@+id/donationsLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginLeft="16dp"
android:gravity="center" android:gravity="center"
android:orientation="vertical" > android:orientation="vertical">
<TextView <TextView
android:layout_width="match_parent"
android:id="@+id/donationsTitle" android:id="@+id/donationsTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/donations" android:text="@string/donations"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" /> android:textSize="@dimen/default_sub_text_size"/>
<TextView <TextView
android:id="@+id/donationsTextView" android:id="@+id/donationsTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="-" android:text="-"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_height="1dp" android:layout_height="1dp"
android:layout_column="1" android:layout_column="1"
android:background="?attr/dashboard_divider" /> android:background="?attr/dashboard_divider"/>
<ImageView <ImageView
android:id="@+id/numberOfRecipientsIcon" android:id="@+id/numberOfRecipientsIcon"
android:layout_width="56dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginLeft="16dp" android:scaleType="center"
android:src="@drawable/ic_group" /> android:src="@drawable/ic_group"/>
<LinearLayout <LinearLayout
android:id="@+id/numberOfRecipientsLayout" android:id="@+id/numberOfRecipientsLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginLeft="16dp"
android:gravity="center" android:gravity="center"
android:orientation="vertical" > android:orientation="vertical">
<TextView <TextView
android:id="@+id/numberOfRecipientsTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/numberOfRecipientsTitle"
android:text="@string/number_of_recipients" android:text="@string/number_of_recipients"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" /> android:textSize="@dimen/default_sub_text_size"/>
<TextView <TextView
android:id="@+id/recipientsTextView" android:id="@+id/recipientsTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="-" android:text="-"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary"/>
</LinearLayout> </LinearLayout>
<include layout="@layout/card_bottom_divider" />
</GridLayout> </GridLayout>
</LinearLayout> <include layout="@layout/card_bottom_divider"/>
</LinearLayout>
</ScrollView>

View file

@ -4,6 +4,7 @@ import android.app.AlarmManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.support.annotation.NonNull;
import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R; import net.osmand.plus.R;
@ -67,10 +68,9 @@ public class LiveUpdatesHelper {
} }
public static String getNameToDisplay(LocalIndexInfo child, OsmandActionBarActivity activity) { public static String getNameToDisplay(LocalIndexInfo child, OsmandActionBarActivity activity) {
String mapName = FileNameTranslationHelper.getFileName(activity, return FileNameTranslationHelper.getFileName(activity,
activity.getMyApplication().getResourceManager().getOsmandRegions(), activity.getMyApplication().getResourceManager().getOsmandRegions(),
child.getFileName()); child.getFileName());
return mapName;
} }
public static String formatDateTime(Context ctx, long dateTime) { public static String formatDateTime(Context ctx, long dateTime) {
@ -79,7 +79,8 @@ public class LiveUpdatesHelper {
return dateFormat.format(dateTime) + " " + timeFormat.format(dateTime); return dateFormat.format(dateTime) + " " + timeFormat.format(dateTime);
} }
public static PendingIntent getPendingIntent(Context context, LocalIndexInfo localIndexInfo) { public static PendingIntent getPendingIntent(@NonNull Context context,
@NonNull LocalIndexInfo localIndexInfo) {
Intent intent = new Intent(context, LiveUpdatesAlarmReceiver.class); Intent intent = new Intent(context, LiveUpdatesAlarmReceiver.class);
final File file = new File(localIndexInfo.getFileName()); final File file = new File(localIndexInfo.getFileName());
final String fileName = Algorithms.getFileNameWithoutExtension(file); final String fileName = Algorithms.getFileNameWithoutExtension(file);
@ -118,7 +119,7 @@ public class LiveUpdatesHelper {
return calendar.getTimeInMillis(); return calendar.getTimeInMillis();
} }
public static enum TimeOfDay { public enum TimeOfDay {
MORNING(R.string.morning), MORNING(R.string.morning),
NIGHT(R.string.night); NIGHT(R.string.night);
private final int localizedId; private final int localizedId;
@ -138,7 +139,7 @@ public class LiveUpdatesHelper {
} }
} }
public static enum UpdateFrequency { public enum UpdateFrequency {
HOURLY(R.string.hourly, AlarmManager.INTERVAL_HOUR), HOURLY(R.string.hourly, AlarmManager.INTERVAL_HOUR),
DAILY(R.string.daily, AlarmManager.INTERVAL_DAY), DAILY(R.string.daily, AlarmManager.INTERVAL_DAY),
WEEKLY(R.string.weekly, AlarmManager.INTERVAL_DAY * 7); WEEKLY(R.string.weekly, AlarmManager.INTERVAL_DAY * 7);
@ -160,6 +161,6 @@ public class LiveUpdatesHelper {
public static void runLiveUpdate(Context context, final LocalIndexInfo info, boolean forceUpdate) { public static void runLiveUpdate(Context context, final LocalIndexInfo info, boolean forceUpdate) {
final String fnExt = Algorithms.getFileNameWithoutExtension(new File(info.getFileName())); final String fnExt = Algorithms.getFileNameWithoutExtension(new File(info.getFileName()));
new PerformLiveUpdateAsyncTask(context, info, forceUpdate).execute(new String[]{fnExt}); new PerformLiveUpdateAsyncTask(context, info, forceUpdate).execute(fnExt);
} }
} }

View file

@ -5,6 +5,7 @@ import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.support.annotation.NonNull;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
@ -29,11 +30,14 @@ public class PerformLiveUpdateAsyncTask
extends AsyncTask<String, Object, IncrementalChangesManager.IncrementalUpdateList> { extends AsyncTask<String, Object, IncrementalChangesManager.IncrementalUpdateList> {
private final static Log LOG = PlatformUtil.getLog(PerformLiveUpdateAsyncTask.class); private final static Log LOG = PlatformUtil.getLog(PerformLiveUpdateAsyncTask.class);
@NonNull
private final Context context; private final Context context;
@NonNull
private final LocalIndexInfo localIndexInfo; private final LocalIndexInfo localIndexInfo;
private final boolean forceUpdate; private final boolean forceUpdate;
public PerformLiveUpdateAsyncTask(Context context, LocalIndexInfo localIndexInfo, public PerformLiveUpdateAsyncTask(@NonNull Context context,
@NonNull LocalIndexInfo localIndexInfo,
boolean forceUpdate) { boolean forceUpdate) {
this.context = context; this.context = context;
this.localIndexInfo = localIndexInfo; this.localIndexInfo = localIndexInfo;
@ -127,8 +131,9 @@ public class PerformLiveUpdateAsyncTask
} }
} }
public static void tryRescheduleDownload(Context context, OsmandSettings settings, public static void tryRescheduleDownload(@NonNull Context context,
LocalIndexInfo localIndexInfo) { @NonNull OsmandSettings settings,
@NonNull LocalIndexInfo localIndexInfo) {
final OsmandSettings.CommonPreference<Integer> updateFrequencyPreference = final OsmandSettings.CommonPreference<Integer> updateFrequencyPreference =
preferenceUpdateFrequency(localIndexInfo, settings); preferenceUpdateFrequency(localIndexInfo, settings);
final Integer frequencyOrdinal = updateFrequencyPreference.get(); final Integer frequencyOrdinal = updateFrequencyPreference.get();

View file

@ -1,18 +1,5 @@
package net.osmand.plus.liveupdates; package net.osmand.plus.liveupdates;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Locale;
import net.osmand.PlatformUtil;
import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.R;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.liveupdates.CountrySelectionFragment.CountryItem;
import org.apache.commons.logging.Log;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -37,6 +24,19 @@ import android.widget.TextView;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException; import com.google.gson.JsonSyntaxException;
import net.osmand.PlatformUtil;
import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.R;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.liveupdates.CountrySelectionFragment.CountryItem;
import org.apache.commons.logging.Log;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Locale;
public class ReportsFragment extends BaseOsmAndFragment implements CountrySelectionFragment.OnFragmentInteractionListener { public class ReportsFragment extends BaseOsmAndFragment implements CountrySelectionFragment.OnFragmentInteractionListener {
public static final String TITLE = "Report"; public static final String TITLE = "Report";
public static final String DOMAIN = "http://download.osmand.net/"; public static final String DOMAIN = "http://download.osmand.net/";
@ -72,14 +72,12 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
private TextView numberOfRecipientsTitle; private TextView numberOfRecipientsTitle;
private TextView donationsTitle; private TextView donationsTitle;
private ProgressBar progressBar; private ProgressBar progressBar;
private View dividerToHide;
private int inactiveColor; private int inactiveColor;
private int textColorPrimary; private int textColorPrimary;
private int textColorSecondary; private int textColorSecondary;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
@ -120,7 +118,7 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
} }
}; };
view.findViewById(R.id.numberOfContributorsLayout).setOnClickListener(listener); view.findViewById(R.id.numberOfContributorsLayout).setOnClickListener(listener);
view.findViewById(R.id.numberOfEditsLayout).setOnClickListener(listener);; view.findViewById(R.id.numberOfEditsLayout).setOnClickListener(listener);
countrySelectionFragment.initCountries(getMyApplication()); countrySelectionFragment.initCountries(getMyApplication());
selectedCountryItem = countrySelectionFragment.getCountryItems().get(0); selectedCountryItem = countrySelectionFragment.getCountryItems().get(0);
@ -154,6 +152,8 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
donationsTextView = (TextView) view.findViewById(R.id.donationsTextView); donationsTextView = (TextView) view.findViewById(R.id.donationsTextView);
recipientsTextView = (TextView) view.findViewById(R.id.recipientsTextView); recipientsTextView = (TextView) view.findViewById(R.id.recipientsTextView);
dividerToHide = view.findViewById(R.id.divider_to_hide);
requestAndUpdateUi(); requestAndUpdateUi();
AdapterView.OnItemSelectedListener onItemSelectedListener = new AdapterView.OnItemSelectedListener() { AdapterView.OnItemSelectedListener onItemSelectedListener = new AdapterView.OnItemSelectedListener() {
@ -352,6 +352,7 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
donationsTitle.setTextColor(inactiveColor); donationsTitle.setTextColor(inactiveColor);
progressBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE);
dividerToHide.setVisibility(View.GONE);
contributorsTextView.setTextColor(inactiveColor); contributorsTextView.setTextColor(inactiveColor);
donationsTextView.setTextColor(inactiveColor); donationsTextView.setTextColor(inactiveColor);
@ -370,7 +371,8 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
numberOfRecipientsTitle.setTextColor(textColorSecondary); numberOfRecipientsTitle.setTextColor(textColorSecondary);
donationsTitle.setTextColor(textColorSecondary); donationsTitle.setTextColor(textColorSecondary);
progressBar.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.GONE);
dividerToHide.setVisibility(View.VISIBLE);
contributorsTextView.setTextColor(textColorPrimary); contributorsTextView.setTextColor(textColorPrimary);
editsTextView.setTextColor(textColorPrimary); editsTextView.setTextColor(textColorPrimary);