merges ui_improvements

This commit is contained in:
tom79 2017-08-15 18:14:28 +02:00
commit 3c25813aa7
14 changed files with 39 additions and 115 deletions

View File

@ -55,7 +55,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Mastodon.iml" filepath="$PROJECT_DIR$/Mastodon.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/mastodon_etalab.iml" filepath="$PROJECT_DIR$/mastodon_etalab.iml" />
</modules>
</component>
</project>
</project>

View File

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
</project>

View File

@ -15,7 +15,7 @@
package fr.gouv.etalab.mastodon.activities;
import android.app.Activity;
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
@ -145,7 +145,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
private HorizontalScrollView picture_scrollview;
private int currentCursorPosition, searchLength;
private boolean canDisplayMessage;
private int style;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -154,10 +153,8 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
style = R.style.AlertDialog;
}else {
setTheme(R.style.AppThemeDark);
style = R.style.AlertDialogDark;
}
setContentView(R.layout.activity_toot);
@ -588,7 +585,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
Toast.makeText(getApplicationContext(), R.string.no_draft, Toast.LENGTH_LONG).show();
return true;
}
AlertDialog.Builder builderSingle = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder builderSingle = new AlertDialog.Builder(TootActivity.this);
builderSingle.setTitle(getString(R.string.choose_toot));
final DraftsListAdapter draftsListAdapter = new DraftsListAdapter(TootActivity.this, drafts);
final int[] ids = new int[drafts.size()];
@ -606,7 +603,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
builderSingle.setPositiveButton(R.string.delete_all, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, int which) {
AlertDialog.Builder builder = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder builder = new AlertDialog.Builder(TootActivity.this);
builder.setTitle(R.string.delete_all);
builder.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@ -646,7 +643,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
Toast.makeText(getApplicationContext(),R.string.toot_error_no_content, Toast.LENGTH_LONG).show();
return true;
}
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(TootActivity.this);
LayoutInflater inflater = this.getLayoutInflater();
View dialogView = inflater.inflate(R.layout.datetime_picker, null);
dialogBuilder.setView(dialogView);
@ -814,7 +811,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
*/
private void showRemove(final int viewId){
AlertDialog.Builder dialog = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder dialog = new AlertDialog.Builder(TootActivity.this);
dialog.setMessage(R.string.toot_delete_media);
dialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@ -861,7 +858,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
private void tootVisibilityDialog(){
AlertDialog.Builder dialog = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder dialog = new AlertDialog.Builder(TootActivity.this);
dialog.setTitle(R.string.toot_visibility_tilte);
final String[] stringArray = getResources().getStringArray(R.array.toot_visibility);
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(TootActivity.this, android.R.layout.simple_list_item_1, stringArray);
@ -1124,7 +1121,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
ic_show.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AlertDialog.Builder alert = new AlertDialog.Builder(TootActivity.this, style);
AlertDialog.Builder alert = new AlertDialog.Builder(TootActivity.this);
alert.setTitle(R.string.toot_reply_content_title);
final TextView input = new TextView(TootActivity.this);
//Set the padding

View File

@ -14,7 +14,7 @@ package fr.gouv.etalab.mastodon.drawers;
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
* see <http://www.gnu.org/licenses>. */
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@ -25,7 +25,6 @@ import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.text.Html;
import android.text.util.Linkify;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -69,7 +68,6 @@ public class AccountsListAdapter extends BaseAdapter implements OnPostActionInte
private Context context;
private AccountsListAdapter accountsListAdapter;
private String targetedId;
private int style;
public AccountsListAdapter(Context context, RetrieveAccountsAsyncTask.Type action, String targetedId, List<Account> accounts){
this.context = context;
@ -252,13 +250,7 @@ public class AccountsListAdapter extends BaseAdapter implements OnPostActionInte
String[] stringArrayConf = context.getResources().getStringArray(R.array.more_action_confirm_account);
final API.StatusAction doAction;
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog.Builder dialog = new AlertDialog.Builder(context, style);
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
if( action == RetrieveAccountsAsyncTask.Type.BLOCKED) {
dialog.setMessage(stringArrayConf[1]);

View File

@ -15,7 +15,7 @@ package fr.gouv.etalab.mastodon.drawers;
* see <http://www.gnu.org/licenses>. */
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
@ -48,7 +48,6 @@ public class DraftsListAdapter extends BaseAdapter {
private LayoutInflater layoutInflater;
private Context context;
private DraftsListAdapter draftsListAdapter;
private int style;
public DraftsListAdapter(Context context, List<StoredStatus> storedStatuses){
this.storedStatuses = storedStatuses;
@ -106,12 +105,8 @@ public class DraftsListAdapter extends BaseAdapter {
holder.draft_delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog.Builder builder = new AlertDialog.Builder(context, style);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(draft.getStatus().getContent() + '\n' + Helper.dateToString(context, draft.getCreation_date()));
builder.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(R.string.remove_draft)

View File

@ -14,7 +14,7 @@ package fr.gouv.etalab.mastodon.drawers;
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
* see <http://www.gnu.org/licenses>. */
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@ -83,7 +83,6 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
private NotificationsListAdapter notificationsListAdapter;
private int behaviorWithAttachments;
private boolean isOnWifi;
private int style;
public NotificationsListAdapter(Context context, boolean isOnWifi, int behaviorWithAttachments, List<Notification> notifications){
this.context = context;
@ -463,13 +462,8 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
title = context.getString(R.string.reblog_add);
}
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog.Builder builder = new AlertDialog.Builder(context, style);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
builder.setMessage(Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY));
@ -505,14 +499,7 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
private void displayConfirmationNotificationDialog(final Notification notification){
final ArrayList seletedItems = new ArrayList();
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog dialog = new AlertDialog.Builder(context, style)
AlertDialog dialog = new AlertDialog.Builder(context)
.setTitle(R.string.delete_notification_ask)
.setMultiChoiceItems(new String[]{context.getString(R.string.delete_notification_ask_all)}, null, new DialogInterface.OnMultiChoiceClickListener() {
@Override

View File

@ -14,7 +14,7 @@ package fr.gouv.etalab.mastodon.drawers;
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
* see <http://www.gnu.org/licenses>. */
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@ -43,7 +43,6 @@ import java.util.List;
import fr.gouv.etalab.mastodon.activities.MainActivity;
import fr.gouv.etalab.mastodon.activities.TootActivity;
import fr.gouv.etalab.mastodon.client.Entities.Application;
import fr.gouv.etalab.mastodon.client.Entities.Status;
import fr.gouv.etalab.mastodon.client.Entities.StoredStatus;
import fr.gouv.etalab.mastodon.helper.Helper;
@ -67,7 +66,6 @@ public class ScheduledTootsListAdapter extends BaseAdapter {
private LayoutInflater layoutInflater;
private ScheduledTootsListAdapter scheduledTootsListAdapter;
private RelativeLayout textviewNoAction;
private int style;
public ScheduledTootsListAdapter(Context context, List<StoredStatus> storedStatuses, RelativeLayout textviewNoAction){
this.context = context;
@ -155,12 +153,7 @@ public class ScheduledTootsListAdapter extends BaseAdapter {
holder.scheduled_toot_delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog.Builder builder = new AlertDialog.Builder(context, style);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(status.getContent() + '\n' + Helper.dateToString(context, storedStatus.getCreation_date()));
builder.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(R.string.remove_scheduled)
@ -201,12 +194,7 @@ public class ScheduledTootsListAdapter extends BaseAdapter {
holder.scheduled_toot_date.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context, style);
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
LayoutInflater inflater = ((MainActivity)context).getLayoutInflater();
View dialogView = inflater.inflate(R.layout.datetime_picker, null);
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);

View File

@ -14,7 +14,7 @@ package fr.gouv.etalab.mastodon.drawers;
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
* see <http://www.gnu.org/licenses>. */
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
@ -30,12 +30,8 @@ import android.os.CountDownTimer;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.CardView;
import android.text.Html;
import android.text.Selection;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.util.TypedValue;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@ -106,7 +102,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
private final int FAVOURITE = 2;
private RetrieveFeedsAsyncTask.Type type;
private String targetedId;
private int style;
public StatusListAdapter(Context context, RetrieveFeedsAsyncTask.Type type, String targetedId, boolean isOnWifi, int behaviorWithAttachments, List<Status> statuses){
this.context = context;
@ -201,29 +196,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
} else {
holder = (ViewHolder) convertView.getTag();
}
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int iconSizePercent = sharedpreferences.getInt(Helper.SET_ICON_SIZE, 100);
int textSizePercent = sharedpreferences.getInt(Helper.SET_TEXT_SIZE, 100);
holder.status_more.getLayoutParams().height = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_more.getLayoutParams().width = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_privacy.getLayoutParams().height = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_privacy.getLayoutParams().width = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_reply.getLayoutParams().height = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_reply.getLayoutParams().width = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
holder.status_content.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
holder.status_account_displayname.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
holder.status_account_username.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12*textSizePercent/100);
holder.status_reblog_user.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
holder.status_toot_date.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12*textSizePercent/100);
holder.status_spoiler.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
holder.status_content_translated.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
if( status.getSpoiler_text() != null && status.getSpoiler_text().trim().length() > 0 && !status.isSpoilerShown()){
holder.status_content_container.setVisibility(View.GONE);
holder.status_spoiler_container.setVisibility(View.VISIBLE);
@ -291,6 +263,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
holder.status_action_container.setVisibility(View.GONE);
}
//Manages theme for icon colors
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
changeDrawableColor(context, R.drawable.ic_reply,R.color.dark_text);
@ -304,7 +277,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
changeDrawableColor(context, R.drawable.ic_photo,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_translate,R.color.dark_text);
style = R.style.AlertDialogDark;
}else {
changeDrawableColor(context, R.drawable.ic_reply,R.color.black);
changeDrawableColor(context, R.drawable.ic_action_more,R.color.black);
@ -317,18 +289,17 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
changeDrawableColor(context, R.drawable.ic_photo,R.color.white);
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.white);
changeDrawableColor(context, R.drawable.ic_translate,R.color.white);
style = R.style.AlertDialog;
}
//Redraws top icons (boost/reply)
final float scale = context.getResources().getDisplayMetrics().density;
if( !status.getIn_reply_to_account_id().equals("null") || !status.getIn_reply_to_id().equals("null") ){
Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_reply);
img.setBounds(0,0,(int) (20 * iconSizePercent/100 * scale + 0.5f),(int) (15 * iconSizePercent/100 * scale + 0.5f));
img.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (15 * scale + 0.5f));
holder.status_account_displayname.setCompoundDrawables( img, null, null, null);
}else if( status.getReblog() != null){
Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_retweet_black);
img.setBounds(0,0,(int) (20 * iconSizePercent/100 * scale + 0.5f),(int) (15 * iconSizePercent/100 * scale + 0.5f));
img.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (15 * scale + 0.5f));
holder.status_account_displayname.setCompoundDrawables( img, null, null, null);
}else{
holder.status_account_displayname.setCompoundDrawables( null, null, null, null);
@ -562,8 +533,8 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
else
imgReblog = ContextCompat.getDrawable(context, R.drawable.ic_retweet_black);
imgFav.setBounds(0,0,(int) (20 * iconSizePercent/100 * scale + 0.5f),(int) (20 * iconSizePercent/100 * scale + 0.5f));
imgReblog.setBounds(0,0,(int) (20 * iconSizePercent/100 * scale + 0.5f),(int) (20 * iconSizePercent/100 * scale + 0.5f));
imgFav.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (20 * scale + 0.5f));
imgReblog.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (20 * scale + 0.5f));
holder.status_favorite_count.setCompoundDrawables(imgFav, null, null, null);
holder.status_reblog_count.setCompoundDrawables(imgReblog, null, null, null);
@ -928,7 +899,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
else
title = context.getString(R.string.reblog_add);
}
AlertDialog.Builder builder = new AlertDialog.Builder(context, style);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
builder.setMessage(Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY));
@ -967,7 +938,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
final boolean isOwner = status.getAccount().getId().equals(userId);
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context, style);
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
//builderSingle.setTitle(R.string.make_a_choice);
final String[] stringArray, stringArrayConf;
final API.StatusAction[] doAction;
@ -992,7 +963,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
builderSingle.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, style);
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
builderInner.setTitle(stringArrayConf[which]);
if( isOwner) {
if( which == 0) {
@ -1102,5 +1073,4 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
builderSingle.create().requestWindowFeature(Window.FEATURE_NO_TITLE);
builderSingle.show();
}
}

View File

@ -16,7 +16,7 @@ package fr.gouv.etalab.mastodon.fragments;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.ContentUris;
import android.content.Context;
import android.content.DialogInterface;
@ -70,7 +70,6 @@ public class SettingsFragment extends Fragment {
private Context context;
private static final int ACTIVITY_CHOOSE_FILE = 411;
private TextView set_folder;
private int style;
int count = 0;
@Override
@ -81,11 +80,6 @@ public class SettingsFragment extends Fragment {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
boolean auto_store = sharedpreferences.getBoolean(Helper.SET_AUTO_STORE, true);
@ -291,7 +285,7 @@ public class SettingsFragment extends Fragment {
set_toot_visibility.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AlertDialog.Builder dialog = new AlertDialog.Builder(context, style);
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
dialog.setTitle(R.string.toot_visibility_tilte);
final String[] stringArray = getResources().getStringArray(R.array.toot_visibility);
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, stringArray);

View File

@ -14,7 +14,7 @@ package fr.gouv.etalab.mastodon.fragments;
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
* see <http://www.gnu.org/licenses>. */
import android.app.Activity;
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;

View File

@ -18,7 +18,7 @@ package fr.gouv.etalab.mastodon.helper;
import android.app.Activity;
import android.app.AlertDialog;
import android.support.v7.app.AlertDialog;
import android.app.DownloadManager;
import android.app.PendingIntent;
import android.content.Context;

View File

@ -211,7 +211,7 @@
<!-- Notifications -->
<string name="no_notifications">Aucune notification à afficher</string>
<string name="notif_mention">a mentionné votre pouet</string>
<string name="notif_mention">vous a mentionné</string>
<string name="notif_reblog">a partagé votre pouet</string>
<string name="notif_favourite">a ajouté votre pouet à ses favoris</string>
<string name="notif_follow">vous a suivi</string>

View File

@ -216,7 +216,7 @@
<string name="warning_battery">Battery saver is enabled! It might not work as expected.</string>
<!-- Notifications -->
<string name="no_notifications">No notification to display</string>
<string name="notif_mention">mentioned your status</string>
<string name="notif_mention">mentioned you</string>
<string name="notif_reblog">boosted your status</string>
<string name="notif_favourite">favourited your status</string>
<string name="notif_follow">followed you</string>