Merged in develop (pull request #21)

This commit is contained in:
tom79 2017-07-01 15:10:17 +00:00
commit a0176e01f0
74 changed files with 573 additions and 111 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "fr.gouv.etalab.mastodon"
minSdkVersion 15
targetSdkVersion 25
versionCode 23
versionName "1.2.6"
versionCode 24
versionName "1.2.7"
}
buildTypes {
release {
@ -33,4 +33,5 @@ dependencies {
compile 'com.evernote:android-job:1.1.11'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
}

Binary file not shown.

Binary file not shown.

View File

@ -40,7 +40,7 @@
android:launchMode="singleTop"
android:windowSoftInputMode="stateAlwaysHidden"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme_NoActionBar">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
@ -114,6 +114,8 @@
/>
<activity
android:name="fr.gouv.etalab.mastodon.activities.SplashActivity"
android:windowSoftInputMode="stateAlwaysHidden"
android:configChanges="orientation|screenSize"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -15,6 +15,7 @@
package fr.gouv.etalab.mastodon.activities;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
@ -49,6 +50,13 @@ public class AboutActivity extends AppCompatActivity implements OnRetrieveSearcA
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
if( getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_about);

View File

@ -21,6 +21,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.AbsListView;
@ -62,8 +63,19 @@ public class HashTagActivity extends AppCompatActivity implements OnRetrieveFeed
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_hashtag);
if( getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Bundle b = getIntent().getExtras();
@ -77,9 +89,11 @@ public class HashTagActivity extends AppCompatActivity implements OnRetrieveFeed
firstLoad = true;
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipeContainer);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int behaviorWithAttachments = sharedpreferences.getInt(Helper.SET_ATTACHMENT_ACTION, Helper.ATTACHMENT_ALWAYS);
final ListView lv_status = (ListView) findViewById(R.id.lv_status);
tootsPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
mainLoader = (RelativeLayout) findViewById(R.id.loader);
@ -100,9 +114,15 @@ public class HashTagActivity extends AppCompatActivity implements OnRetrieveFeed
new RetrieveFeedsAsyncTask(getApplicationContext(), RetrieveFeedsAsyncTask.Type.TAG, tag,null, max_id, HashTagActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
lv_status.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override

View File

@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
@ -55,6 +56,13 @@ public class InstanceActivity extends AppCompatActivity implements OnRetrieveIns
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
if( getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_instance);

View File

@ -69,6 +69,13 @@ public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_login);
final Button connectionButton = (Button) findViewById(R.id.login_button);

View File

@ -25,6 +25,7 @@ import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
@ -101,6 +102,14 @@ public class MainActivity extends AppCompatActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme_NoActionBar);
}else {
setTheme(R.style.AppThemeDark_NoActionBar);
}
setContentView(R.layout.activity_main);
//Test if user is still log in
if( ! Helper.isLoggedIn(getApplicationContext())) {
@ -152,7 +161,6 @@ public class MainActivity extends AppCompatActivity
headerLayout = navigationView.getHeaderView(0);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
Account account = new AccountDAO(getApplicationContext(), db).getAccountByToken(prefKeyOauthTokenT);
updateHeaderAccountInfo(MainActivity.this, account, headerLayout, imageLoader, options);
@ -225,6 +233,7 @@ public class MainActivity extends AppCompatActivity
private boolean mamageNewIntent(Intent intent){
if( intent == null || intent.getExtras() == null )
return false;
String action = intent.getAction();
String type = intent.getType();
Bundle extras = intent.getExtras();
@ -389,7 +398,7 @@ public class MainActivity extends AppCompatActivity
}
}
//Open the search bar
final EditText search = new EditText(getApplicationContext());
final EditText search = new EditText(MainActivity.this);
search.setSingleLine(true);
search.setLayoutParams( new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,

View File

@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
import android.Manifest;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.media.MediaPlayer;
@ -101,6 +102,14 @@ public class MediaActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_media);
attachments = getIntent().getParcelableArrayListExtra("mediaArray");
mediaPosition = getIntent().getExtras().getInt("position", 1);
@ -108,6 +117,14 @@ public class MediaActivity extends AppCompatActivity {
finish();
if( getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
RelativeLayout main_container_media = (RelativeLayout) findViewById(R.id.main_container_media);
if( theme == Helper.THEME_LIGHT){
main_container_media.setBackgroundResource(R.color.background_image);
}else {
main_container_media.setBackgroundResource(R.color.colorPrimaryD);
}
loader = (RelativeLayout) findViewById(R.id.loader);
imageView = (PhotoView) findViewById(R.id.media_picture);
videoView = (VideoView) findViewById(R.id.media_video);

View File

@ -15,9 +15,12 @@
package fr.gouv.etalab.mastodon.activities;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import fr.gouv.etalab.mastodon.helper.Helper;
import mastodon.etalab.gouv.fr.mastodon.R;
@ -31,6 +34,13 @@ public class PrivacyActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
if( getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_privacy);

View File

@ -52,6 +52,13 @@ public class SearchResultActivity extends AppCompatActivity implements OnRetriev
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_search_result);
loader = (RelativeLayout) findViewById(R.id.loader);

View File

@ -105,9 +105,15 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_show_account);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
imageLoader = ImageLoader.getInstance();
statuses = new ArrayList<>();
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());

View File

@ -18,8 +18,11 @@ package fr.gouv.etalab.mastodon.activities;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
@ -52,10 +55,21 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
private String statusId;
private Status initialStatus;
public static int position;
private SwipeRefreshLayout swipeRefreshLayout;
private ListView lv_status;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_show_conversation);
if( getSupportActionBar() != null)
@ -66,7 +80,46 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
if( statusId == null)
finish();
setTitle(R.string.conversation);
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipeContainer);
new RetrieveFeedsAsyncTask(getApplicationContext(), RetrieveFeedsAsyncTask.Type.ONESTATUS, statusId,null, ShowConversationActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
new RetrieveFeedsAsyncTask(getApplicationContext(), RetrieveFeedsAsyncTask.Type.ONESTATUS, statusId,null, ShowConversationActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
lv_status = (ListView) findViewById(R.id.lv_status);
lv_status.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == android.view.MotionEvent.ACTION_UP) {
if (lv_status.getLastVisiblePosition() == lv_status.getAdapter().getCount() -1 && lv_status.getFirstVisiblePosition() > 0 &&
lv_status.getChildAt(lv_status.getChildCount() - 1).getBottom() <= lv_status.getHeight()) {
swipeRefreshLayout.setRefreshing(true);
( new Handler()).postDelayed(new Runnable() {
@Override
public void run() {
new RetrieveFeedsAsyncTask(getApplicationContext(), RetrieveFeedsAsyncTask.Type.ONESTATUS, statusId,null, ShowConversationActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}, 1000);
}
}
return false;
}
});
}
@Override
@ -98,6 +151,7 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
@Override
public void onRetrieveFeeds(Context context, Error error) {
swipeRefreshLayout.setRefreshing(false);
if( error != null){
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
@ -120,10 +174,10 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
if( context.getDescendants() != null && context.getDescendants().size() > 0){
for(Status status: context.getDescendants()){
statuses.add(status);
statusId = status.getId();
}
}
RelativeLayout loader = (RelativeLayout) findViewById(R.id.loader);
ListView lv_status = (ListView) findViewById(R.id.lv_status);
StatusListAdapter statusListAdapter = new StatusListAdapter(ShowConversationActivity.this, RetrieveFeedsAsyncTask.Type.CONTEXT, isOnWifi, behaviorWithAttachments, statuses);
lv_status.setAdapter(statusListAdapter);
statusListAdapter.notifyDataSetChanged();

View File

@ -28,7 +28,6 @@ public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();

View File

@ -80,6 +80,8 @@ import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
import mastodon.etalab.gouv.fr.mastodon.R;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
/**
* Created by Thomas on 01/05/2017.
@ -116,6 +118,13 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_toot);
if( getSupportActionBar() != null)
@ -136,6 +145,25 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
toot_lv_accounts = (ListView) findViewById(R.id.toot_lv_accounts);
toot_sensitive = (CheckBox) findViewById(R.id.toot_sensitive);
if( theme == Helper.THEME_DARK){
changeDrawableColor(TootActivity.this, R.drawable.ic_action_globe,R.color.dark_text);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_lock_open,R.color.dark_text);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_lock_closed,R.color.dark_text);
changeDrawableColor(TootActivity.this, R.drawable.ic_local_post_office,R.color.dark_text);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_globe,R.color.dark_text);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_camera,R.color.dark_text);
}else {
changeDrawableColor(TootActivity.this, R.drawable.ic_action_globe,R.color.black);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_lock_open,R.color.black);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_lock_closed,R.color.black);
changeDrawableColor(TootActivity.this, R.drawable.ic_local_post_office,R.color.black);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_globe,R.color.black);
changeDrawableColor(TootActivity.this, R.drawable.ic_action_camera,R.color.black);
}
final LinearLayout drawer_layout = (LinearLayout) findViewById(R.id.drawer_layout);
/*drawer_layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@ -182,7 +210,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
}
if( tootReply != null) {
setTitle(R.string.toot_title_reply);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
boolean show_reply = sharedpreferences.getBoolean(Helper.SET_SHOW_REPLY, false);
if( show_reply ){
@ -269,7 +296,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
FloatingActionButton toot_close_accounts = (FloatingActionButton) findViewById(R.id.toot_close_accounts);
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
Account account = new AccountDAO(getApplicationContext(),db).getAccountByID(userId);
boolean isAccountPrivate = account.isLocked();

View File

@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
import android.Manifest;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
@ -54,6 +55,13 @@ public class WebviewActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_webview);
Bundle b = getIntent().getExtras();
if(b != null)

View File

@ -58,6 +58,13 @@ public class WebviewConnectActivity extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT){
setTheme(R.style.AppTheme);
}else {
setTheme(R.style.AppThemeDark);
}
setContentView(R.layout.activity_webview_connect);
Bundle b = getIntent().getExtras();
if(b != null)
@ -65,7 +72,6 @@ public class WebviewConnectActivity extends AppCompatActivity {
if( instance == null)
finish();
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
clientId = sharedpreferences.getString(Helper.CLIENT_ID, null);
clientSecret = sharedpreferences.getString(Helper.CLIENT_SECRET, null);

View File

@ -100,7 +100,7 @@ public class API {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
this.instance = Helper.getLiveInstance(context);
this.prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
apiResponse = new APIResponse();
@ -112,7 +112,7 @@ public class API {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
if( instance != null)
this.instance = instance;
else

View File

@ -30,6 +30,7 @@ import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.Button;
@ -61,6 +62,7 @@ import fr.gouv.etalab.mastodon.client.Entities.Attachment;
import fr.gouv.etalab.mastodon.client.Entities.Status;
import fr.gouv.etalab.mastodon.interfaces.OnPostActionInterface;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
/**
@ -184,6 +186,32 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
if( type == RetrieveFeedsAsyncTask.Type.USER){
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_LIGHT);
if( theme == Helper.THEME_DARK){
changeDrawableColor(context, R.drawable.ic_reply,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_action_more,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_action_globe,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_action_lock_open,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_action_lock_closed,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.dark_text);
changeDrawableColor(context, R.drawable.ic_photo,R.color.dark_text);
}else {
changeDrawableColor(context, R.drawable.ic_reply,R.color.black);
changeDrawableColor(context, R.drawable.ic_action_more,R.color.black);
changeDrawableColor(context, R.drawable.ic_action_globe,R.color.black);
changeDrawableColor(context, R.drawable.ic_action_lock_open,R.color.black);
changeDrawableColor(context, R.drawable.ic_action_lock_closed,R.color.black);
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.black);
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.black);
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.black);
changeDrawableColor(context, R.drawable.ic_photo,R.color.black);
}
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);
@ -196,6 +224,8 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
}else{
holder.status_account_displayname.setCompoundDrawables( null, null, null, null);
}
//Click on a conversation
if( type != RetrieveFeedsAsyncTask.Type.CONTEXT ){
holder.status_content.setOnClickListener(new View.OnClickListener() {
@ -209,10 +239,18 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
}
});
}else {
if( position == ShowConversationActivity.position){
holder.main_container.setBackgroundResource(R.color.blue_light);
if( theme == Helper.THEME_LIGHT){
if( position == ShowConversationActivity.position){
holder.main_container.setBackgroundResource(R.color.blue_light);
}else {
holder.main_container.setBackgroundResource(R.color.white);
}
}else {
holder.main_container.setBackgroundResource(R.color.white);
if( position == ShowConversationActivity.position){
holder.main_container.setBackgroundResource(R.color.header2D);
}else {
holder.main_container.setBackgroundResource(R.color.cardview_dark_background);
}
}
}
@ -354,7 +392,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
holder.status_favorite_count.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
boolean confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
if( confirmation )
displayConfirmationDialog(FAVOURITE,status);
@ -366,7 +404,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
holder.status_reblog_count.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
boolean confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
if( confirmation )
displayConfirmationDialog(REBLOG,status);
@ -635,7 +672,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
final boolean isOwner = status.getAccount().getId().equals(userId);
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
builderSingle.setTitle(R.string.make_a_choice);
//builderSingle.setTitle(R.string.make_a_choice);
final String[] stringArray, stringArrayConf;
final API.StatusAction[] doAction;
if( isOwner) {
@ -752,6 +789,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
builderInner.show();
}
});
builderSingle.create().requestWindowFeature(Window.FEATURE_NO_TITLE);
builderSingle.show();
}
}

View File

@ -188,9 +188,16 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou
asyncTask = new RetrieveAccountsAsyncTask(context, type, targetedId, max_id, DisplayAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
if (type != RetrieveAccountsAsyncTask.Type.FOLLOWERS && type != RetrieveAccountsAsyncTask.Type.FOLLOWING)

View File

@ -116,9 +116,16 @@ public class DisplayFollowRequestSentFragment extends Fragment implements OnRetr
asyncTask = new RetrieveFollowRequestSentAsyncTask(context, max_id, DisplayFollowRequestSentFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
asyncTask = new RetrieveFollowRequestSentAsyncTask(context, max_id, DisplayFollowRequestSentFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

View File

@ -78,7 +78,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipeContainer);
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
lv_notifications = (ListView) rootView.findViewById(R.id.lv_notifications);
mainLoader = (RelativeLayout) rootView.findViewById(R.id.loader);
@ -118,10 +118,16 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
asyncTask = new RetrieveNotificationsAsyncTask(context, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
asyncTask = new RetrieveNotificationsAsyncTask(context, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
return rootView;

View File

@ -203,9 +203,16 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
asyncTask = new RetrieveFeedsAsyncTask(context, type, max_id, DisplayStatusFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_LIGHT) {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
R.color.colorPrimary,
R.color.colorPrimaryDark);
}else {
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
R.color.colorPrimaryD,
R.color.colorPrimaryDarkD);
}
if( type == RetrieveFeedsAsyncTask.Type.USER)

View File

@ -173,6 +173,24 @@ public class SettingsFragment extends Fragment {
file_chooser.setVisibility(View.GONE);
}
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
final SwitchCompat set_night_mode = (SwitchCompat) rootView.findViewById(R.id.set_night_mode);
set_night_mode.setChecked(theme == Helper.THEME_DARK);
set_night_mode.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putInt(Helper.SET_THEME, isChecked?Helper.THEME_DARK:Helper.THEME_LIGHT);
editor.apply();
if( isChecked){
getActivity().setTheme(R.style.AppThemeDark);
}else {
getActivity().setTheme(R.style.AppTheme);
}
getActivity().recreate();
}
});
return rootView;
}

View File

@ -94,8 +94,8 @@ public class SettingsOptimizationFragment extends Fragment {
//Notifications per page
SeekBar notificationsSeekBar = (SeekBar) rootView.findViewById(R.id.set_notifications_per_page);
final TextView set_notifications_page_value = (TextView) rootView.findViewById(R.id.set_notifications_page_value);
notificationsSeekBar.setMax(30);
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationsSeekBar.setMax(20);
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
notificationsSeekBar.setProgress(notificationsPerPage-10);
set_notifications_page_value.setText(String.valueOf(notificationsPerPage));
notificationsSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

View File

@ -26,10 +26,14 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.media.RingtoneManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@ -38,9 +42,11 @@ import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.ColorInt;
import android.support.design.widget.NavigationView;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.content.ContextCompat;
import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
@ -49,7 +55,9 @@ import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.WindowManager;
import android.webkit.CookieManager;
@ -157,10 +165,12 @@ public class Helper {
public static final String SET_ACCOUNTS_PER_PAGE = "set_accounts_per_page";
public static final String SET_NOTIFICATIONS_PER_PAGE = "set_notifications_per_page";
public static final String SET_ATTACHMENT_ACTION = "set_attachment_action";
public static final String SET_THEME = "set_theme";
public static final int ATTACHMENT_ALWAYS = 1;
public static final int ATTACHMENT_WIFI = 2;
public static final int ATTACHMENT_ASK = 3;
public static final int THEME_LIGHT = 1;
public static final int THEME_DARK = 2;
public static final String SET_NOTIF_FOLLOW = "set_notif_follow";
public static final String SET_NOTIF_ADD = "set_notif_follow_add";
@ -177,6 +187,7 @@ public class Helper {
public static final String SET_JAVASCRIPT = "set_javascript";
public static final String SET_COOKIES = "set_cookies";
public static final String SET_FOLDER_RECORD = "set_folder_record";
//End points
public static final String EP_AUTHORIZE = "/oauth/authorize";
@ -684,20 +695,35 @@ public class Helper {
if( currrentUserId == null)
return;
MenuItem menu_account = navigationView.getMenu().findItem(R.id.nav_account_list);
MenuItem nav_main_com = navigationView.getMenu().findItem(R.id.nav_main_com);
MenuItem nav_main_opt= navigationView.getMenu().findItem(R.id.nav_main_opt);
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
if( theme == Helper.THEME_DARK){
changeDrawableColor(activity, R.drawable.ic_person_add,R.color.dark_text);
changeDrawableColor(activity, R.drawable.ic_person,R.color.dark_text);
changeDrawableColor(activity, R.drawable.ic_cancel,R.color.dark_text);
}else {
changeDrawableColor(activity, R.drawable.ic_person_add,R.color.black);
changeDrawableColor(activity, R.drawable.ic_person,R.color.black);
changeDrawableColor(activity, R.drawable.ic_cancel,R.color.black);
}
if( !menuAccountsOpened ){
arrow.setImageResource(R.drawable.ic_arrow_drop_up);
navigationView.getMenu().clear();
navigationView.inflateMenu(R.menu.menu_accounts);
SQLiteDatabase db = Sqlite.getInstance(activity, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
menu_account.setVisible(true);
nav_main_com.setVisible(false);
nav_main_opt.setVisible(false);
final List<Account> accounts = new AccountDAO(activity, db).getAllAccount();
navigationView.setItemIconTintList(null);
SubMenu navigationViewSub = navigationView.getMenu().findItem(R.id.nav_account_list).getSubMenu();
navigationViewSub.clear();
for(final Account account: accounts) {
if( !currrentUserId.equals(account.getId()) ) {
final MenuItem item = navigationView.getMenu().add("@" + account.getAcct() + "@" + account.getInstance());
final MenuItem item = navigationViewSub.add("@" + account.getAcct() + "@" + account.getInstance());
ImageLoader imageLoader;
DisplayImageOptions options = new DisplayImageOptions.Builder().displayer(new SimpleBitmapDisplayer()).cacheInMemory(false)
.cacheOnDisk(true).resetViewBeforeLoading(true).build();
@ -716,6 +742,7 @@ public class Helper {
@Override
public void onLoadingComplete(String s, View view, Bitmap bitmap) {
item.setIcon(new BitmapDrawable(activity.getResources(), bitmap));
item.getIcon().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY);
}
@Override
@ -763,7 +790,7 @@ public class Helper {
}
}
MenuItem addItem = navigationView.getMenu().add(R.string.add_account);
MenuItem addItem = navigationViewSub.add(R.string.add_account);
addItem.setIcon(R.drawable.ic_person_add);
addItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
@ -775,13 +802,14 @@ public class Helper {
}
});
}else{
menu_account.setVisible(false);
nav_main_com.setVisible(true);
nav_main_opt.setVisible(true);
arrow.setImageResource(R.drawable.ic_arrow_drop_down);
navigationView.getMenu().clear();
navigationView.inflateMenu(R.menu.activity_main_drawer);
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
SQLiteDatabase db = Sqlite.getInstance(activity, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
Account account = new AccountDAO(activity, db).getAccountByID(userId);
if( account != null) {
if (account.isLocked()) {
navigationView.getMenu().findItem(R.id.nav_follow_request).setVisible(true);
@ -1052,6 +1080,7 @@ public class Helper {
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptThirdPartyCookies(webView, cookies);
}
webView.setBackgroundColor(Color.TRANSPARENT);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setDatabaseEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
@ -1085,4 +1114,15 @@ public class Helper {
return "";
}
/**
* change color of a drawable
* @param drawable int the drawable
* @param hexaColor example 0xffff00
*/
public static Drawable changeDrawableColor(Context context, int drawable, int hexaColor){
int color = Color.parseColor(context.getString(hexaColor));
Drawable mDrawable = ContextCompat.getDrawable(context, drawable);
mDrawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
return mDrawable;
}
}

View File

@ -17,14 +17,11 @@ import android.app.Activity;
import android.graphics.Bitmap;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import fr.gouv.etalab.mastodon.helper.Helper;
import mastodon.etalab.gouv.fr.mastodon.R;
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/colorAccentD" />
<stroke android:width="1dp" android:color="@color/colorPrimary" />
<padding android:left="1dp" android:top="1dp" android:right="1dp"
android:bottom="1dp" />
</shape>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<solid android:color="@android:color/transparent" />
</shape>
</item>
<item android:top="-2dp" android:right="-2dp" android:left="-2dp">
<shape>
<solid android:color="@android:color/transparent" />
<stroke
android:width="1dp"
android:color="@color/colorPrimaryD" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="@color/header2D"
android:endColor="@color/header1D"
android:startColor="@color/header3D"
android:type="linear" />
</shape>

View File

@ -18,7 +18,6 @@
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="#fff"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

View File

@ -113,14 +113,13 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:background="@android:color/white"
android:background="@null"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
app:tabMode="fixed"
app:tabGravity="fill"
@ -129,7 +128,6 @@
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
/>
</android.support.design.widget.AppBarLayout>

View File

@ -18,7 +18,6 @@
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="#fff"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

View File

@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
app:popupTheme="?attr/popupOverlay" />
</android.support.design.widget.AppBarLayout>

View File

@ -19,7 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_image"
android:id="@+id/main_container_media"
>
<ImageView
android:visibility="gone"
@ -75,7 +75,7 @@
android:textSize="12sp"
android:visibility="gone"
android:layout_marginTop="10dp"
android:textColor="@color/colorAccent"
android:textColor="?attr/colorAccent"
android:layout_below="@+id/pbar_inf"
android:layout_width="50dp"
android:gravity="center"

View File

@ -32,14 +32,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="10dp"
android:layout_marginTop="20dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<!-- PRIVACY TITLE -->
<TextView
android:text="@string/privacy_API_title"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
@ -64,7 +64,7 @@
<!-- DATA PRIVACY TITLE -->
<TextView
android:text="@string/privacy_data_title"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
@ -81,6 +81,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="vertical"
tools:ignore="UselessParent">
@ -88,7 +89,7 @@
<!-- APPS AUTHORIZATIONS TITLE -->
<TextView
android:text="@string/privacy_authorizations_title"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
@ -106,13 +107,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<!-- API AUTHORIZATIONS TITLE -->
<TextView
android:text="@string/privacy_API_authorizations_title"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"

View File

@ -111,15 +111,14 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_marginTop="5dp"
android:background="@null"
android:layout_width="match_parent"
android:background="@android:color/white"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
app:tabMode="fixed"
app:tabGravity="fill"
@ -128,7 +127,6 @@
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
/>
</android.support.design.widget.AppBarLayout>

View File

@ -11,15 +11,18 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="fr.gouv.etalab.mastodon.activities.ShowConversationActivity"
>
<ListView
android:visibility="gone"
android:id="@+id/lv_status"
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:divider="@null"
>
</ListView>
android:id="@+id/swipeContainer"
android:layout_height="match_parent">
<ListView
android:visibility="gone"
android:id="@+id/lv_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:divider="@null" />
</android.support.v4.widget.SwipeRefreshLayout>
<!-- Main Loader -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/loader"

View File

@ -50,7 +50,6 @@
android:layout_below="@+id/dialog_profile_picture"
android:layout_centerHorizontal="true"
android:textSize="18sp"
android:textColor="@color/white"
android:gravity="center_horizontal|top"
android:id="@+id/dialog_profile_name"
android:layout_width="match_parent"
@ -65,7 +64,6 @@
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:id="@+id/dialog_profile_description"
android:minLines="4"
android:lines="4"

View File

@ -20,6 +20,7 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
style="?attr/cardStyle"
android:layout_marginTop="10dp"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

View File

@ -21,6 +21,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
style="?attr/cardStyle"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
@ -58,7 +59,6 @@
android:layout_marginLeft="5dp"
android:layout_gravity="end"
android:gravity="center"
android:textColor="@color/white"
style="@style/Base.Widget.AppCompat.Button.Small"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@ -69,7 +69,6 @@
android:text="@string/reject"
android:layout_gravity="end"
android:gravity="center"
android:textColor="@color/white"
style="@style/Base.Widget.AppCompat.Button.Small"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@ -21,6 +21,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
style="?attr/cardStyle"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

View File

@ -21,6 +21,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
style="?attr/cardStyle"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

View File

@ -21,6 +21,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
style="?attr/cardStyle"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

View File

@ -20,6 +20,7 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
style="?attr/cardStyle"
android:layout_marginTop="10dp"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
@ -54,7 +55,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:background="@drawable/imageview_border"
style="?attr/shapeBorder"
android:visibility="gone"
tools:ignore="ContentDescription" />
</RelativeLayout>

View File

@ -21,6 +21,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
style="?attr/cardStyle"
card_view:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

View File

@ -22,6 +22,7 @@
xmlns:card_view="http://schemas.android.com/tools"
android:layout_marginTop="10dp"
card_view:cardPreventCornerOverlap="true"
style="?attr/cardStyle"
app:cardUseCompatPadding="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"

View File

@ -75,7 +75,7 @@
android:layout_marginStart="10dp"
android:maxLines="2"
android:textStyle="italic"
android:textColor="@color/colorAccent"
android:textColor="?attr/colorAccent"
android:id="@+id/set_folder"
android:layout_width="0dp"
android:layout_weight="1"
@ -142,7 +142,25 @@
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_night_mode"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/set_night_mode"
android:layout_gravity="center_vertical"
android:gravity="center"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -36,7 +36,7 @@
<!-- NOTIFICATIONS SETTINGS -->
<TextView
android:text="@string/settings_title_notifications"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
@ -72,7 +72,7 @@
<!-- NOTIFICATION CONTENT NEW -->
<TextView
android:text="@string/set_title_news"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
@ -86,7 +86,7 @@
<!-- MORE OPTIONS SETTINGS -->
<TextView
android:text="@string/settings_title_more_options"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:layout_marginBottom="10dp"

View File

@ -36,7 +36,7 @@
<!-- OPTIMIZATION SETTINGS -->
<TextView
android:text="@string/settings_title_optimisation"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_marginBottom="10dp"

View File

@ -35,7 +35,7 @@
<!-- Profile SETTINGS -->
<TextView
android:text="@string/settings_title_profile"
android:background="@drawable/shape_border_bottom_settings"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_marginBottom="10dp"

View File

@ -32,9 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:divider="@null"
>
</ListView>
android:divider="@null" />
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/no_action"

View File

@ -19,7 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/side_nav_bar"
style="?attr/headerbg"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"

View File

@ -25,7 +25,6 @@
android:id="@+id/picture_actionbar"
android:maxLines="1"
android:layout_width="match_parent"
android:textColor="@color/white"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>

View File

@ -49,7 +49,6 @@
android:id="@+id/loader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:layout_gravity="center"
android:gravity="center"
>

View File

@ -19,6 +19,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@null"
android:layout_height="match_parent">
<android.support.design.widget.TabLayout
@ -26,7 +27,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMaxWidth="0dp"
android:background="@android:color/white"
app:tabMode="scrollable"
app:tabGravity="fill"
/>
@ -35,7 +35,6 @@
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
/>
</android.support.design.widget.AppBarLayout>

View File

@ -22,7 +22,6 @@
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:background="@color/white"
android:layout_gravity="center_vertical"
android:id="@+id/webview_favicon"
android:layout_width="20dp"
@ -35,7 +34,6 @@
android:id="@+id/webview_title"
android:maxLines="1"
android:layout_width="0dp"
android:textColor="@color/white"
android:layout_height="wrap_content"
android:textSize="12sp"
android:layout_weight="1" />

View File

@ -2,11 +2,19 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item android:title="@string/communication_menu_title">
<item android:id="@+id/nav_account_list"
android:visible="false"
android:title="@string/account_list_menu">
<menu /></item>
</group>
<group android:checkableBehavior="single">
<item
android:title="@string/communication_menu_title"
android:id="@+id/nav_main_com"
>
<menu>
<group android:checkableBehavior="single">
<item
android:checked="true"
android:id="@+id/nav_home"
android:icon="@drawable/ic_action_home"
android:title="@string/home_menu" />
@ -16,7 +24,7 @@
android:title="@string/local_menu" />
<item
android:id="@+id/nav_global"
android:icon="@drawable/ic_action_globe"
android:icon="@drawable/ic_action_globe_menu"
android:title="@string/global_menu" />
<item
android:id="@+id/nav_notification"
@ -29,7 +37,9 @@
</group>
</menu>
</item>
<item android:title="@string/neutral_menu_title">
<item
android:title="@string/neutral_menu_title"
android:id="@+id/nav_main_opt">
<menu>
<group android:checkableBehavior="single">
<item

View File

@ -1,17 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- LIGHT -->
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#2196F3</color>
<!-- DARK -->
<color name="colorPrimaryD">#616161</color>
<color name="colorPrimaryDarkD">#212121</color>
<color name="colorAccentD">#009688</color>
<!-- Header Profile-->
<color name="header1">#0288D1</color>
<color name="header2">#03A9F4</color>
<color name="header3">#4FC3F7</color>
<!-- Header Profile DARK-->
<color name="header1D">#263238</color>
<color name="header2D">#455A64</color>
<color name="header3D">#607D8B</color>
<color name="dark_text">#BDBDBD</color>
<color name="transparent">#00000000</color>
<color name="splashc">#F5F5F5</color>
<color name="splashc_dark">#546E7A</color>
<color name="white">#FFF</color>
<color name="blue_light">#C5CAE9</color>
@ -24,4 +37,6 @@
<color name="green_1">#009688</color>
<color name="red_1">#F44336</color>
<color name="black">#000</color>
</resources>

View File

@ -54,6 +54,7 @@
<string name="communication_menu_title">Communication</string>
<string name="muted_menu">Utilisateurs muets</string>
<string name="blocked_menu">Utilisateurs bloqués</string>
<string name="account_list_menu">Comptes</string>
<string name="notifications">Notifications</string>
<string name="follow_request">Demandes d\'abonnements</string>
<string name="optimization">Optimisation</string>
@ -65,7 +66,7 @@
<string name="send_email">Envoyer un email</string>
<string name="choose_file">Veuillez sélectionner un fichier</string>
<string name="choose_file_error">Aucun explorateur de fichiers trouvé !</string>
<string name="click_to_change">Cliquez sur le chemin pour changer</string>
<string name="click_to_change">Cliquer sur le chemin pour changer</string>
<!-- Status -->
<string name="no_status">Aucun pouet à afficher !</string>
<string name="fav_added">Pouet ajouté aux favoris !</string>
@ -243,7 +244,7 @@
<string name="settings_title_more_options">Options avancées</string>
<string name="set_wifi_only">Notifier en WIFI seulement</string>
<string name="set_notif_silent">Utiliser le vibreur</string>
<string name="set_night_mode">Mode nuit</string>
<string name="settings_title_profile">Modifier le profil</string>
<string name="set_profile_description">Présentation…</string>
<string name="set_save_changes">Enregistrer les modifications</string>
@ -281,7 +282,6 @@
Seules les informations de base des comptes connectés sont enregistrées sur l\'appareil.
Ces données sont strictement confidentielles et ne sont utilisables que par l\'application. La suppression de l\'application entraîne immédiatement la suppression de ces données.\n
&#9888; Les identifiants et les mots de passe ne sont jamais enregistrés, ils ne sont utilisés que lors de l\'authentification sécurisée (SSL) vers l\'instance.
</string>
<string name="privacy_authorizations_title">Autorisations de l\'application</string>
@ -291,7 +291,7 @@
- <b>WRITE_EXTERNAL_STORAGE</b> : Utilisée pour télécharger les médias / déplacer sur la carte SD.\n
- <b>READ_EXTERNAL_STORAGE</b> : Utilisée pour ajouter des médias aux pouets.\n
- <b>BOOT_COMPLETED</b> : Utilisée pour lancer le service de notifications quand l\'appareil démarre.\n
- <b>WAKE_LOCK</b> : Utilisée lors du service de notifications.\n
- <b>WAKE_LOCK</b> : Utilisée lors du service de notifications.
</string>
<string name="privacy_API_authorizations_title">Autorisations de l\'API</string>
@ -299,7 +299,7 @@
- <b>Read</b> : Lire les données du compte.\n
- <b>Write</b> : Envoyer des messages et attacher des médias aux messages.\n
- <b>Follow</b> : S\'abonner, se désabonner, bloquer, débloquer.\n\n
<b>&#9888; Ces actions ne sont réalisées qu\'à la demande de l\'utilisateur.</b>\n\n
<b>&#9888; Ces actions ne sont réalisées qu\'à la demande de l\'utilisateur.</b>
</string>
<string name="privacy_API_title">Suivi et bibliothèques</string>
<string name="privacy_API">

View File

@ -1,24 +1,103 @@
<resources>
<attr format="reference" name="cardStyle"/>
<attr format="reference" name="appBarLayout"/>
<attr format="reference" name="headerbg"/>
<attr format="reference" name="shapeBorder"/>
<attr format="reference" name="imgbd"/>
<attr format="reference" name="splash"/>
<attr format="reference" name="popupOverlay"/>
<attr format="reference" name="appBarOverlay"/>
<!-- Base application theme. -->
<!-- Light theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="cardStyle">@style/CardView.Light</item>
<item name="headerbg">@style/Header.Light</item>
<item name="shapeBorder">@style/Shape.Light</item>
<item name="imgbd">@style/Image.Border.Light</item>
<item name="popupOverlay">@style/AppTheme.PopupOverlay</item>
</style>
<style name="AppTheme_NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="cardStyle">@style/CardView.Light</item>
<item name="headerbg">@style/Header.Light</item>
<item name="shapeBorder">@style/Shape.Light</item>
<item name="imgbd">@style/Image.Border.Light</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="popupOverlay">@style/AppTheme.PopupOverlay</item>
</style>
<style name="AppTheme.NoActionBar">
<!-- Dark theme -->
<style name="AppThemeDark" parent="Theme.AppCompat">
<item name="cardStyle">@style/CardView.Dark</item>
<item name="headerbg">@style/Header.Dark</item>
<item name="shapeBorder">@style/Shape.Dark</item>
<item name="imgbd">@style/Image.Border.Dark</item>
<item name="popupOverlay">@style/AppThemeDark.PopupOverlay</item>
</style>
<style name="AppThemeDark_NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="cardStyle">@style/CardView.Dark</item>
<item name="headerbg">@style/Header.Dark</item>
<item name="shapeBorder">@style/Shape.Dark</item>
<item name="imgbd">@style/Image.Border.Dark</item>
<item name="popupOverlay">@style/AppThemeDark.PopupOverlay</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppThemeDark.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark">
</style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
<style name="Image.Border.Dark" parent="AppThemeDark">
<item name="android:background">@drawable/imageview_border_dark</item>
</style>
<style name="Image.Border.Light" parent="AppTheme">
<item name="android:background">@drawable/imageview_border</item>
</style>
<style name="Header.Dark" parent="AppThemeDark">
<item name="android:background">@drawable/side_nav_bar_dark</item>
</style>
<style name="Header.Light" parent="AppTheme">
<item name="android:background">@drawable/side_nav_bar</item>
</style>
<style name="Shape.Dark" parent="AppThemeDark">
<item name="android:background">@drawable/shape_border_bottom_settings_dark</item>
</style>
<style name="Shape.Light" parent="AppTheme">
<item name="android:background">@drawable/shape_border_bottom_settings</item>
</style>
<style name="CardViewStyle.Dark" parent="CardView">
<item name="cardBackgroundColor">@color/cardview_dark_background</item>
</style>
<style name="CardViewStyle.Light" parent="CardView">
<item name="cardBackgroundColor">@color/cardview_light_background</item>
</style>
</resources>