Merged in develop (pull request #21)
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "fr.gouv.etalab.mastodon"
|
applicationId "fr.gouv.etalab.mastodon"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 23
|
versionCode 24
|
||||||
versionName "1.2.6"
|
versionName "1.2.7"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
@ -33,4 +33,5 @@ dependencies {
|
||||||
compile 'com.evernote:android-job:1.1.11'
|
compile 'com.evernote:android-job:1.1.11'
|
||||||
compile 'com.github.chrisbanes:PhotoView:2.0.0'
|
compile 'com.github.chrisbanes:PhotoView:2.0.0'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:windowSoftInputMode="stateAlwaysHidden"
|
android:windowSoftInputMode="stateAlwaysHidden"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme_NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
@ -114,6 +114,8 @@
|
||||||
/>
|
/>
|
||||||
<activity
|
<activity
|
||||||
android:name="fr.gouv.etalab.mastodon.activities.SplashActivity"
|
android:name="fr.gouv.etalab.mastodon.activities.SplashActivity"
|
||||||
|
android:windowSoftInputMode="stateAlwaysHidden"
|
||||||
|
android:configChanges="orientation|screenSize"
|
||||||
android:theme="@style/SplashTheme">
|
android:theme="@style/SplashTheme">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
package fr.gouv.etalab.mastodon.activities;
|
package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -49,6 +50,13 @@ public class AboutActivity extends AppCompatActivity implements OnRetrieveSearcA
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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)
|
if( getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_about);
|
setContentView(R.layout.activity_about);
|
||||||
|
|
|
@ -21,6 +21,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AbsListView;
|
import android.widget.AbsListView;
|
||||||
|
@ -62,8 +63,19 @@ public class HashTagActivity extends AppCompatActivity implements OnRetrieveFeed
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_hashtag);
|
||||||
|
|
||||||
|
|
||||||
if( getSupportActionBar() != null)
|
if( getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
Bundle b = getIntent().getExtras();
|
Bundle b = getIntent().getExtras();
|
||||||
|
@ -77,9 +89,11 @@ public class HashTagActivity extends AppCompatActivity implements OnRetrieveFeed
|
||||||
firstLoad = true;
|
firstLoad = true;
|
||||||
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());
|
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());
|
||||||
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipeContainer);
|
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);
|
int behaviorWithAttachments = sharedpreferences.getInt(Helper.SET_ATTACHMENT_ACTION, Helper.ATTACHMENT_ALWAYS);
|
||||||
|
|
||||||
|
|
||||||
final ListView lv_status = (ListView) findViewById(R.id.lv_status);
|
final ListView lv_status = (ListView) findViewById(R.id.lv_status);
|
||||||
tootsPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
tootsPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
||||||
mainLoader = (RelativeLayout) findViewById(R.id.loader);
|
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);
|
new RetrieveFeedsAsyncTask(getApplicationContext(), RetrieveFeedsAsyncTask.Type.TAG, tag,null, max_id, HashTagActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
if( theme == Helper.THEME_LIGHT) {
|
||||||
R.color.colorPrimary,
|
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
||||||
R.color.colorPrimaryDark);
|
R.color.colorPrimary,
|
||||||
|
R.color.colorPrimaryDark);
|
||||||
|
}else {
|
||||||
|
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccentD,
|
||||||
|
R.color.colorPrimaryD,
|
||||||
|
R.color.colorPrimaryDarkD);
|
||||||
|
}
|
||||||
|
|
||||||
lv_status.setOnScrollListener(new AbsListView.OnScrollListener() {
|
lv_status.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -55,6 +56,13 @@ public class InstanceActivity extends AppCompatActivity implements OnRetrieveIns
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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)
|
if( getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_instance);
|
setContentView(R.layout.activity_instance);
|
||||||
|
|
|
@ -69,6 +69,13 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
final Button connectionButton = (Button) findViewById(R.id.login_button);
|
final Button connectionButton = (Button) findViewById(R.id.login_button);
|
||||||
|
|
|
@ -25,6 +25,7 @@ import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -101,6 +102,14 @@ public class MainActivity extends AppCompatActivity
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_main);
|
||||||
//Test if user is still log in
|
//Test if user is still log in
|
||||||
if( ! Helper.isLoggedIn(getApplicationContext())) {
|
if( ! Helper.isLoggedIn(getApplicationContext())) {
|
||||||
|
@ -152,7 +161,6 @@ public class MainActivity extends AppCompatActivity
|
||||||
|
|
||||||
headerLayout = navigationView.getHeaderView(0);
|
headerLayout = navigationView.getHeaderView(0);
|
||||||
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
String prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
String prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
||||||
Account account = new AccountDAO(getApplicationContext(), db).getAccountByToken(prefKeyOauthTokenT);
|
Account account = new AccountDAO(getApplicationContext(), db).getAccountByToken(prefKeyOauthTokenT);
|
||||||
updateHeaderAccountInfo(MainActivity.this, account, headerLayout, imageLoader, options);
|
updateHeaderAccountInfo(MainActivity.this, account, headerLayout, imageLoader, options);
|
||||||
|
@ -225,6 +233,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
private boolean mamageNewIntent(Intent intent){
|
private boolean mamageNewIntent(Intent intent){
|
||||||
if( intent == null || intent.getExtras() == null )
|
if( intent == null || intent.getExtras() == null )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
String type = intent.getType();
|
String type = intent.getType();
|
||||||
Bundle extras = intent.getExtras();
|
Bundle extras = intent.getExtras();
|
||||||
|
@ -389,7 +398,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Open the search bar
|
//Open the search bar
|
||||||
final EditText search = new EditText(getApplicationContext());
|
final EditText search = new EditText(MainActivity.this);
|
||||||
search.setSingleLine(true);
|
search.setSingleLine(true);
|
||||||
search.setLayoutParams( new LinearLayout.LayoutParams(
|
search.setLayoutParams( new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
|
|
|
@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
|
@ -101,6 +102,14 @@ public class MediaActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_media);
|
||||||
attachments = getIntent().getParcelableArrayListExtra("mediaArray");
|
attachments = getIntent().getParcelableArrayListExtra("mediaArray");
|
||||||
mediaPosition = getIntent().getExtras().getInt("position", 1);
|
mediaPosition = getIntent().getExtras().getInt("position", 1);
|
||||||
|
@ -108,6 +117,14 @@ public class MediaActivity extends AppCompatActivity {
|
||||||
finish();
|
finish();
|
||||||
if( getSupportActionBar() != null)
|
if( getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
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);
|
loader = (RelativeLayout) findViewById(R.id.loader);
|
||||||
imageView = (PhotoView) findViewById(R.id.media_picture);
|
imageView = (PhotoView) findViewById(R.id.media_picture);
|
||||||
videoView = (VideoView) findViewById(R.id.media_video);
|
videoView = (VideoView) findViewById(R.id.media_video);
|
||||||
|
|
|
@ -15,9 +15,12 @@
|
||||||
package fr.gouv.etalab.mastodon.activities;
|
package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
|
import fr.gouv.etalab.mastodon.helper.Helper;
|
||||||
import mastodon.etalab.gouv.fr.mastodon.R;
|
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +34,13 @@ public class PrivacyActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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)
|
if( getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_privacy);
|
setContentView(R.layout.activity_privacy);
|
||||||
|
|
|
@ -52,6 +52,13 @@ public class SearchResultActivity extends AppCompatActivity implements OnRetriev
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_search_result);
|
||||||
|
|
||||||
loader = (RelativeLayout) findViewById(R.id.loader);
|
loader = (RelativeLayout) findViewById(R.id.loader);
|
||||||
|
|
|
@ -105,9 +105,15 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_show_account);
|
||||||
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
imageLoader = ImageLoader.getInstance();
|
imageLoader = ImageLoader.getInstance();
|
||||||
statuses = new ArrayList<>();
|
statuses = new ArrayList<>();
|
||||||
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());
|
boolean isOnWifi = Helper.isOnWIFI(getApplicationContext());
|
||||||
|
|
|
@ -18,8 +18,11 @@ package fr.gouv.etalab.mastodon.activities;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
@ -52,10 +55,21 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
|
||||||
private String statusId;
|
private String statusId;
|
||||||
private Status initialStatus;
|
private Status initialStatus;
|
||||||
public static int position;
|
public static int position;
|
||||||
|
private SwipeRefreshLayout swipeRefreshLayout;
|
||||||
|
private ListView lv_status;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_show_conversation);
|
||||||
|
|
||||||
if( getSupportActionBar() != null)
|
if( getSupportActionBar() != null)
|
||||||
|
@ -66,7 +80,46 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
|
||||||
if( statusId == null)
|
if( statusId == null)
|
||||||
finish();
|
finish();
|
||||||
setTitle(R.string.conversation);
|
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);
|
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
|
@Override
|
||||||
|
@ -98,6 +151,7 @@ public class ShowConversationActivity extends AppCompatActivity implements OnRet
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveFeeds(Context context, Error error) {
|
public void onRetrieveFeeds(Context context, Error error) {
|
||||||
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
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){
|
if( context.getDescendants() != null && context.getDescendants().size() > 0){
|
||||||
for(Status status: context.getDescendants()){
|
for(Status status: context.getDescendants()){
|
||||||
statuses.add(status);
|
statuses.add(status);
|
||||||
|
statusId = status.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RelativeLayout loader = (RelativeLayout) findViewById(R.id.loader);
|
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);
|
StatusListAdapter statusListAdapter = new StatusListAdapter(ShowConversationActivity.this, RetrieveFeedsAsyncTask.Type.CONTEXT, isOnWifi, behaviorWithAttachments, statuses);
|
||||||
lv_status.setAdapter(statusListAdapter);
|
lv_status.setAdapter(statusListAdapter);
|
||||||
statusListAdapter.notifyDataSetChanged();
|
statusListAdapter.notifyDataSetChanged();
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class SplashActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
|
|
@ -80,6 +80,8 @@ import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
||||||
import mastodon.etalab.gouv.fr.mastodon.R;
|
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||||
|
|
||||||
|
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Thomas on 01/05/2017.
|
* Created by Thomas on 01/05/2017.
|
||||||
|
@ -116,6 +118,13 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_toot);
|
||||||
|
|
||||||
if( getSupportActionBar() != null)
|
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_lv_accounts = (ListView) findViewById(R.id.toot_lv_accounts);
|
||||||
toot_sensitive = (CheckBox) findViewById(R.id.toot_sensitive);
|
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);
|
final LinearLayout drawer_layout = (LinearLayout) findViewById(R.id.drawer_layout);
|
||||||
|
|
||||||
/*drawer_layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
/*drawer_layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@ -182,7 +210,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
}
|
}
|
||||||
if( tootReply != null) {
|
if( tootReply != null) {
|
||||||
setTitle(R.string.toot_title_reply);
|
setTitle(R.string.toot_title_reply);
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
boolean show_reply = sharedpreferences.getBoolean(Helper.SET_SHOW_REPLY, false);
|
boolean show_reply = sharedpreferences.getBoolean(Helper.SET_SHOW_REPLY, false);
|
||||||
if( show_reply ){
|
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);
|
FloatingActionButton toot_close_accounts = (FloatingActionButton) findViewById(R.id.toot_close_accounts);
|
||||||
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
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);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
Account account = new AccountDAO(getApplicationContext(),db).getAccountByID(userId);
|
Account account = new AccountDAO(getApplicationContext(),db).getAccountByID(userId);
|
||||||
boolean isAccountPrivate = account.isLocked();
|
boolean isAccountPrivate = account.isLocked();
|
||||||
|
|
|
@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -54,6 +55,13 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_webview);
|
||||||
Bundle b = getIntent().getExtras();
|
Bundle b = getIntent().getExtras();
|
||||||
if(b != null)
|
if(b != null)
|
||||||
|
|
|
@ -58,6 +58,13 @@ public class WebviewConnectActivity extends AppCompatActivity {
|
||||||
public void onCreate(Bundle savedInstanceState)
|
public void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onCreate(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);
|
setContentView(R.layout.activity_webview_connect);
|
||||||
Bundle b = getIntent().getExtras();
|
Bundle b = getIntent().getExtras();
|
||||||
if(b != null)
|
if(b != null)
|
||||||
|
@ -65,7 +72,6 @@ public class WebviewConnectActivity extends AppCompatActivity {
|
||||||
if( instance == null)
|
if( instance == null)
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
clientId = sharedpreferences.getString(Helper.CLIENT_ID, null);
|
clientId = sharedpreferences.getString(Helper.CLIENT_ID, null);
|
||||||
clientSecret = sharedpreferences.getString(Helper.CLIENT_SECRET, null);
|
clientSecret = sharedpreferences.getString(Helper.CLIENT_SECRET, null);
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class API {
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
||||||
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_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.instance = Helper.getLiveInstance(context);
|
||||||
this.prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
this.prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
||||||
apiResponse = new APIResponse();
|
apiResponse = new APIResponse();
|
||||||
|
@ -112,7 +112,7 @@ public class API {
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
|
||||||
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_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)
|
if( instance != null)
|
||||||
this.instance = instance;
|
this.instance = instance;
|
||||||
else
|
else
|
||||||
|
|
|
@ -30,6 +30,7 @@ import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
import android.widget.Button;
|
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.client.Entities.Status;
|
||||||
import fr.gouv.etalab.mastodon.interfaces.OnPostActionInterface;
|
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){
|
if( type == RetrieveFeedsAsyncTask.Type.USER){
|
||||||
holder.status_action_container.setVisibility(View.GONE);
|
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;
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
if( !status.getIn_reply_to_account_id().equals("null") || !status.getIn_reply_to_id().equals("null") ){
|
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);
|
Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_reply);
|
||||||
|
@ -196,6 +224,8 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
}else{
|
}else{
|
||||||
holder.status_account_displayname.setCompoundDrawables( null, null, null, null);
|
holder.status_account_displayname.setCompoundDrawables( null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Click on a conversation
|
//Click on a conversation
|
||||||
if( type != RetrieveFeedsAsyncTask.Type.CONTEXT ){
|
if( type != RetrieveFeedsAsyncTask.Type.CONTEXT ){
|
||||||
holder.status_content.setOnClickListener(new View.OnClickListener() {
|
holder.status_content.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -209,10 +239,18 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
if( position == ShowConversationActivity.position){
|
if( theme == Helper.THEME_LIGHT){
|
||||||
holder.main_container.setBackgroundResource(R.color.blue_light);
|
if( position == ShowConversationActivity.position){
|
||||||
|
holder.main_container.setBackgroundResource(R.color.blue_light);
|
||||||
|
}else {
|
||||||
|
holder.main_container.setBackgroundResource(R.color.white);
|
||||||
|
}
|
||||||
}else {
|
}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() {
|
holder.status_favorite_count.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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);
|
boolean confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
|
||||||
if( confirmation )
|
if( confirmation )
|
||||||
displayConfirmationDialog(FAVOURITE,status);
|
displayConfirmationDialog(FAVOURITE,status);
|
||||||
|
@ -366,7 +404,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
holder.status_reblog_count.setOnClickListener(new View.OnClickListener() {
|
holder.status_reblog_count.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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);
|
boolean confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
|
||||||
if( confirmation )
|
if( confirmation )
|
||||||
displayConfirmationDialog(REBLOG,status);
|
displayConfirmationDialog(REBLOG,status);
|
||||||
|
@ -635,7 +672,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
final boolean isOwner = status.getAccount().getId().equals(userId);
|
final boolean isOwner = status.getAccount().getId().equals(userId);
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
|
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 String[] stringArray, stringArrayConf;
|
||||||
final API.StatusAction[] doAction;
|
final API.StatusAction[] doAction;
|
||||||
if( isOwner) {
|
if( isOwner) {
|
||||||
|
@ -752,6 +789,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
builderInner.show();
|
builderInner.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
builderSingle.create().requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
builderSingle.show();
|
builderSingle.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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);
|
asyncTask = new RetrieveAccountsAsyncTask(context, type, targetedId, max_id, DisplayAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
|
||||||
R.color.colorPrimary,
|
if( theme == Helper.THEME_LIGHT) {
|
||||||
R.color.colorPrimaryDark);
|
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)
|
if (type != RetrieveAccountsAsyncTask.Type.FOLLOWERS && type != RetrieveAccountsAsyncTask.Type.FOLLOWING)
|
||||||
|
|
|
@ -116,9 +116,16 @@ public class DisplayFollowRequestSentFragment extends Fragment implements OnRetr
|
||||||
asyncTask = new RetrieveFollowRequestSentAsyncTask(context, max_id, DisplayFollowRequestSentFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
asyncTask = new RetrieveFollowRequestSentAsyncTask(context, max_id, DisplayFollowRequestSentFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
|
||||||
R.color.colorPrimary,
|
if( theme == Helper.THEME_LIGHT) {
|
||||||
R.color.colorPrimaryDark);
|
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);
|
asyncTask = new RetrieveFollowRequestSentAsyncTask(context, max_id, DisplayFollowRequestSentFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
|
||||||
|
|
||||||
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipeContainer);
|
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipeContainer);
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
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);
|
lv_notifications = (ListView) rootView.findViewById(R.id.lv_notifications);
|
||||||
|
|
||||||
mainLoader = (RelativeLayout) rootView.findViewById(R.id.loader);
|
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);
|
asyncTask = new RetrieveNotificationsAsyncTask(context, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
|
||||||
R.color.colorPrimary,
|
if( theme == Helper.THEME_LIGHT) {
|
||||||
R.color.colorPrimaryDark);
|
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);
|
asyncTask = new RetrieveNotificationsAsyncTask(context, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
return rootView;
|
return rootView;
|
||||||
|
|
|
@ -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);
|
asyncTask = new RetrieveFeedsAsyncTask(context, type, max_id, DisplayStatusFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent,
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_LIGHT);
|
||||||
R.color.colorPrimary,
|
if( theme == Helper.THEME_LIGHT) {
|
||||||
R.color.colorPrimaryDark);
|
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)
|
if( type == RetrieveFeedsAsyncTask.Type.USER)
|
||||||
|
|
|
@ -173,6 +173,24 @@ public class SettingsFragment extends Fragment {
|
||||||
file_chooser.setVisibility(View.GONE);
|
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;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,8 +94,8 @@ public class SettingsOptimizationFragment extends Fragment {
|
||||||
//Notifications per page
|
//Notifications per page
|
||||||
SeekBar notificationsSeekBar = (SeekBar) rootView.findViewById(R.id.set_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);
|
final TextView set_notifications_page_value = (TextView) rootView.findViewById(R.id.set_notifications_page_value);
|
||||||
notificationsSeekBar.setMax(30);
|
notificationsSeekBar.setMax(20);
|
||||||
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
|
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
|
||||||
notificationsSeekBar.setProgress(notificationsPerPage-10);
|
notificationsSeekBar.setProgress(notificationsPerPage-10);
|
||||||
set_notifications_page_value.setText(String.valueOf(notificationsPerPage));
|
set_notifications_page_value.setText(String.valueOf(notificationsPerPage));
|
||||||
notificationsSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
notificationsSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||||
|
|
|
@ -26,10 +26,14 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
|
@ -38,9 +42,11 @@ import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import android.support.annotation.ColorInt;
|
||||||
import android.support.design.widget.NavigationView;
|
import android.support.design.widget.NavigationView;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import android.support.v4.app.NotificationCompat;
|
||||||
import android.support.v4.app.NotificationManagerCompat;
|
import android.support.v4.app.NotificationManagerCompat;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
|
@ -49,7 +55,9 @@ import android.text.method.LinkMovementMethod;
|
||||||
import android.text.style.ClickableSpan;
|
import android.text.style.ClickableSpan;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.TypedValue;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.SubMenu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.webkit.CookieManager;
|
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_ACCOUNTS_PER_PAGE = "set_accounts_per_page";
|
||||||
public static final String SET_NOTIFICATIONS_PER_PAGE = "set_notifications_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_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_ALWAYS = 1;
|
||||||
public static final int ATTACHMENT_WIFI = 2;
|
public static final int ATTACHMENT_WIFI = 2;
|
||||||
public static final int ATTACHMENT_ASK = 3;
|
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_FOLLOW = "set_notif_follow";
|
||||||
public static final String SET_NOTIF_ADD = "set_notif_follow_add";
|
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_JAVASCRIPT = "set_javascript";
|
||||||
public static final String SET_COOKIES = "set_cookies";
|
public static final String SET_COOKIES = "set_cookies";
|
||||||
public static final String SET_FOLDER_RECORD = "set_folder_record";
|
public static final String SET_FOLDER_RECORD = "set_folder_record";
|
||||||
|
|
||||||
//End points
|
//End points
|
||||||
public static final String EP_AUTHORIZE = "/oauth/authorize";
|
public static final String EP_AUTHORIZE = "/oauth/authorize";
|
||||||
|
|
||||||
|
@ -684,20 +695,35 @@ public class Helper {
|
||||||
if( currrentUserId == null)
|
if( currrentUserId == null)
|
||||||
return;
|
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 ){
|
if( !menuAccountsOpened ){
|
||||||
|
|
||||||
arrow.setImageResource(R.drawable.ic_arrow_drop_up);
|
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();
|
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();
|
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) {
|
for(final Account account: accounts) {
|
||||||
if( !currrentUserId.equals(account.getId()) ) {
|
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;
|
ImageLoader imageLoader;
|
||||||
DisplayImageOptions options = new DisplayImageOptions.Builder().displayer(new SimpleBitmapDisplayer()).cacheInMemory(false)
|
DisplayImageOptions options = new DisplayImageOptions.Builder().displayer(new SimpleBitmapDisplayer()).cacheInMemory(false)
|
||||||
.cacheOnDisk(true).resetViewBeforeLoading(true).build();
|
.cacheOnDisk(true).resetViewBeforeLoading(true).build();
|
||||||
|
@ -716,6 +742,7 @@ public class Helper {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String s, View view, Bitmap bitmap) {
|
public void onLoadingComplete(String s, View view, Bitmap bitmap) {
|
||||||
item.setIcon(new BitmapDrawable(activity.getResources(), bitmap));
|
item.setIcon(new BitmapDrawable(activity.getResources(), bitmap));
|
||||||
|
item.getIcon().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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.setIcon(R.drawable.ic_person_add);
|
||||||
addItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
addItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -775,13 +802,14 @@ public class Helper {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
menu_account.setVisible(false);
|
||||||
|
nav_main_com.setVisible(true);
|
||||||
|
nav_main_opt.setVisible(true);
|
||||||
arrow.setImageResource(R.drawable.ic_arrow_drop_down);
|
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();
|
SQLiteDatabase db = Sqlite.getInstance(activity, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
Account account = new AccountDAO(activity, db).getAccountByID(userId);
|
Account account = new AccountDAO(activity, db).getAccountByID(userId);
|
||||||
|
|
||||||
if( account != null) {
|
if( account != null) {
|
||||||
if (account.isLocked()) {
|
if (account.isLocked()) {
|
||||||
navigationView.getMenu().findItem(R.id.nav_follow_request).setVisible(true);
|
navigationView.getMenu().findItem(R.id.nav_follow_request).setVisible(true);
|
||||||
|
@ -1052,6 +1080,7 @@ public class Helper {
|
||||||
CookieManager cookieManager = CookieManager.getInstance();
|
CookieManager cookieManager = CookieManager.getInstance();
|
||||||
cookieManager.setAcceptThirdPartyCookies(webView, cookies);
|
cookieManager.setAcceptThirdPartyCookies(webView, cookies);
|
||||||
}
|
}
|
||||||
|
webView.setBackgroundColor(Color.TRANSPARENT);
|
||||||
webView.getSettings().setAppCacheEnabled(true);
|
webView.getSettings().setAppCacheEnabled(true);
|
||||||
webView.getSettings().setDatabaseEnabled(true);
|
webView.getSettings().setDatabaseEnabled(true);
|
||||||
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
|
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||||
|
@ -1085,4 +1114,15 @@ public class Helper {
|
||||||
return "";
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,11 @@ import android.app.Activity;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import fr.gouv.etalab.mastodon.helper.Helper;
|
|
||||||
import mastodon.etalab.gouv.fr.mastodon.R;
|
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 808 B |
After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 416 B |
After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 1011 B |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 595 B After Width: | Height: | Size: 1.7 KiB |
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -18,7 +18,6 @@
|
||||||
<ScrollView android:layout_width="match_parent"
|
<ScrollView android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="#fff"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<LinearLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
|
@ -113,14 +113,13 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@android:color/white"
|
android:background="@null"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<android.support.design.widget.TabLayout
|
||||||
android:id="@+id/account_tabLayout"
|
android:id="@+id/account_tabLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
|
||||||
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
|
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
app:tabGravity="fill"
|
app:tabGravity="fill"
|
||||||
|
@ -129,7 +128,6 @@
|
||||||
android:id="@+id/account_viewpager"
|
android:id="@+id/account_viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
<ScrollView android:layout_width="match_parent"
|
<ScrollView android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="#fff"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<LinearLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
app:popupTheme="?attr/popupOverlay" />
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/background_image"
|
android:id="@+id/main_container_media"
|
||||||
>
|
>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="?attr/colorAccent"
|
||||||
android:layout_below="@+id/pbar_inf"
|
android:layout_below="@+id/pbar_inf"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="20dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UselessParent">
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
<!-- PRIVACY TITLE -->
|
<!-- PRIVACY TITLE -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/privacy_API_title"
|
android:text="@string/privacy_API_title"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<!-- DATA PRIVACY TITLE -->
|
<!-- DATA PRIVACY TITLE -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/privacy_data_title"
|
android:text="@string/privacy_data_title"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -81,6 +81,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UselessParent">
|
tools:ignore="UselessParent">
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
<!-- APPS AUTHORIZATIONS TITLE -->
|
<!-- APPS AUTHORIZATIONS TITLE -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/privacy_authorizations_title"
|
android:text="@string/privacy_authorizations_title"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -106,13 +107,15 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UselessParent">
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
<!-- API AUTHORIZATIONS TITLE -->
|
<!-- API AUTHORIZATIONS TITLE -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/privacy_API_authorizations_title"
|
android:text="@string/privacy_API_authorizations_title"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -111,15 +111,14 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@null"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@android:color/white"
|
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<android.support.design.widget.TabLayout
|
||||||
android:id="@+id/account_tabLayout"
|
android:id="@+id/account_tabLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
|
||||||
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
|
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
app:tabGravity="fill"
|
app:tabGravity="fill"
|
||||||
|
@ -128,7 +127,6 @@
|
||||||
android:id="@+id/account_viewpager"
|
android:id="@+id/account_viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
|
@ -11,15 +11,18 @@
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:context="fr.gouv.etalab.mastodon.activities.ShowConversationActivity"
|
tools:context="fr.gouv.etalab.mastodon.activities.ShowConversationActivity"
|
||||||
>
|
>
|
||||||
<ListView
|
<android.support.v4.widget.SwipeRefreshLayout
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/lv_status"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/swipeContainer"
|
||||||
android:scrollbars="none"
|
android:layout_height="match_parent">
|
||||||
android:divider="@null"
|
<ListView
|
||||||
>
|
android:visibility="gone"
|
||||||
</ListView>
|
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 -->
|
<!-- Main Loader -->
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/loader"
|
android:id="@+id/loader"
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
android:layout_below="@+id/dialog_profile_picture"
|
android:layout_below="@+id/dialog_profile_picture"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@color/white"
|
|
||||||
android:gravity="center_horizontal|top"
|
android:gravity="center_horizontal|top"
|
||||||
android:id="@+id/dialog_profile_name"
|
android:id="@+id/dialog_profile_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -65,7 +64,6 @@
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/white"
|
|
||||||
android:id="@+id/dialog_profile_description"
|
android:id="@+id/dialog_profile_description"
|
||||||
android:minLines="4"
|
android:minLines="4"
|
||||||
android:lines="4"
|
android:lines="4"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
|
style="?attr/cardStyle"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
style="?attr/cardStyle"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
@ -58,7 +59,6 @@
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Small"
|
style="@style/Base.Widget.AppCompat.Button.Small"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
@ -69,7 +69,6 @@
|
||||||
android:text="@string/reject"
|
android:text="@string/reject"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Small"
|
style="@style/Base.Widget.AppCompat.Button.Small"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
style="?attr/cardStyle"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
style="?attr/cardStyle"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
style="?attr/cardStyle"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
|
style="?attr/cardStyle"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="@drawable/imageview_border"
|
style="?attr/shapeBorder"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
style="?attr/cardStyle"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
card_view:cardPreventCornerOverlap="true"
|
card_view:cardPreventCornerOverlap="true"
|
||||||
|
style="?attr/cardStyle"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="?attr/colorAccent"
|
||||||
android:id="@+id/set_folder"
|
android:id="@+id/set_folder"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -142,7 +142,25 @@
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</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>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<!-- NOTIFICATIONS SETTINGS -->
|
<!-- NOTIFICATIONS SETTINGS -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/settings_title_notifications"
|
android:text="@string/settings_title_notifications"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<!-- NOTIFICATION CONTENT NEW -->
|
<!-- NOTIFICATION CONTENT NEW -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/set_title_news"
|
android:text="@string/set_title_news"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!-- MORE OPTIONS SETTINGS -->
|
<!-- MORE OPTIONS SETTINGS -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/settings_title_more_options"
|
android:text="@string/settings_title_more_options"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<!-- OPTIMIZATION SETTINGS -->
|
<!-- OPTIMIZATION SETTINGS -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/settings_title_optimisation"
|
android:text="@string/settings_title_optimisation"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<!-- Profile SETTINGS -->
|
<!-- Profile SETTINGS -->
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/settings_title_profile"
|
android:text="@string/settings_title_profile"
|
||||||
android:background="@drawable/shape_border_bottom_settings"
|
style="?attr/shapeBorder"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
|
|
|
@ -32,9 +32,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
android:divider="@null"
|
android:divider="@null" />
|
||||||
>
|
|
||||||
</ListView>
|
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/no_action"
|
android:id="@+id/no_action"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/nav_header_height"
|
android:layout_height="@dimen/nav_header_height"
|
||||||
android:background="@drawable/side_nav_bar"
|
style="?attr/headerbg"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
android:id="@+id/picture_actionbar"
|
android:id="@+id/picture_actionbar"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:textColor="@color/white"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -49,7 +49,6 @@
|
||||||
android:id="@+id/loader"
|
android:id="@+id/loader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/white"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
>
|
>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:background="@null"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<android.support.design.widget.TabLayout
|
||||||
|
@ -26,7 +27,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:tabMaxWidth="0dp"
|
app:tabMaxWidth="0dp"
|
||||||
android:background="@android:color/white"
|
|
||||||
app:tabMode="scrollable"
|
app:tabMode="scrollable"
|
||||||
app:tabGravity="fill"
|
app:tabGravity="fill"
|
||||||
/>
|
/>
|
||||||
|
@ -35,7 +35,6 @@
|
||||||
android:id="@+id/viewpager"
|
android:id="@+id/viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/white"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
|
@ -22,7 +22,6 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:background="@color/white"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:id="@+id/webview_favicon"
|
android:id="@+id/webview_favicon"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
android:id="@+id/webview_title"
|
android:id="@+id/webview_title"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:textColor="@color/white"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
|
@ -2,11 +2,19 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<group android:checkableBehavior="single">
|
<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>
|
<menu>
|
||||||
<group android:checkableBehavior="single">
|
<group android:checkableBehavior="single">
|
||||||
<item
|
<item
|
||||||
android:checked="true"
|
|
||||||
android:id="@+id/nav_home"
|
android:id="@+id/nav_home"
|
||||||
android:icon="@drawable/ic_action_home"
|
android:icon="@drawable/ic_action_home"
|
||||||
android:title="@string/home_menu" />
|
android:title="@string/home_menu" />
|
||||||
|
@ -16,7 +24,7 @@
|
||||||
android:title="@string/local_menu" />
|
android:title="@string/local_menu" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_global"
|
android:id="@+id/nav_global"
|
||||||
android:icon="@drawable/ic_action_globe"
|
android:icon="@drawable/ic_action_globe_menu"
|
||||||
android:title="@string/global_menu" />
|
android:title="@string/global_menu" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_notification"
|
android:id="@+id/nav_notification"
|
||||||
|
@ -29,7 +37,9 @@
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
<item android:title="@string/neutral_menu_title">
|
<item
|
||||||
|
android:title="@string/neutral_menu_title"
|
||||||
|
android:id="@+id/nav_main_opt">
|
||||||
<menu>
|
<menu>
|
||||||
<group android:checkableBehavior="single">
|
<group android:checkableBehavior="single">
|
||||||
<item
|
<item
|
||||||
|
|
|
@ -1,17 +1,30 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<!-- LIGHT -->
|
||||||
<color name="colorPrimary">#3F51B5</color>
|
<color name="colorPrimary">#3F51B5</color>
|
||||||
<color name="colorPrimaryDark">#303F9F</color>
|
<color name="colorPrimaryDark">#303F9F</color>
|
||||||
<color name="colorAccent">#2196F3</color>
|
<color name="colorAccent">#2196F3</color>
|
||||||
|
<!-- DARK -->
|
||||||
|
<color name="colorPrimaryD">#616161</color>
|
||||||
|
<color name="colorPrimaryDarkD">#212121</color>
|
||||||
|
<color name="colorAccentD">#009688</color>
|
||||||
|
|
||||||
<!-- Header Profile-->
|
<!-- Header Profile-->
|
||||||
<color name="header1">#0288D1</color>
|
<color name="header1">#0288D1</color>
|
||||||
<color name="header2">#03A9F4</color>
|
<color name="header2">#03A9F4</color>
|
||||||
<color name="header3">#4FC3F7</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">#F5F5F5</color>
|
||||||
|
<color name="splashc_dark">#546E7A</color>
|
||||||
|
|
||||||
<color name="white">#FFF</color>
|
<color name="white">#FFF</color>
|
||||||
<color name="blue_light">#C5CAE9</color>
|
<color name="blue_light">#C5CAE9</color>
|
||||||
|
@ -24,4 +37,6 @@
|
||||||
<color name="green_1">#009688</color>
|
<color name="green_1">#009688</color>
|
||||||
<color name="red_1">#F44336</color>
|
<color name="red_1">#F44336</color>
|
||||||
<color name="black">#000</color>
|
<color name="black">#000</color>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
<string name="communication_menu_title">Communication</string>
|
<string name="communication_menu_title">Communication</string>
|
||||||
<string name="muted_menu">Utilisateurs muets</string>
|
<string name="muted_menu">Utilisateurs muets</string>
|
||||||
<string name="blocked_menu">Utilisateurs bloqués</string>
|
<string name="blocked_menu">Utilisateurs bloqués</string>
|
||||||
|
<string name="account_list_menu">Comptes</string>
|
||||||
<string name="notifications">Notifications</string>
|
<string name="notifications">Notifications</string>
|
||||||
<string name="follow_request">Demandes d\'abonnements</string>
|
<string name="follow_request">Demandes d\'abonnements</string>
|
||||||
<string name="optimization">Optimisation</string>
|
<string name="optimization">Optimisation</string>
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
<string name="send_email">Envoyer un email</string>
|
<string name="send_email">Envoyer un email</string>
|
||||||
<string name="choose_file">Veuillez sélectionner un fichier</string>
|
<string name="choose_file">Veuillez sélectionner un fichier</string>
|
||||||
<string name="choose_file_error">Aucun explorateur de fichiers trouvé !</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 -->
|
<!-- Status -->
|
||||||
<string name="no_status">Aucun pouet à afficher !</string>
|
<string name="no_status">Aucun pouet à afficher !</string>
|
||||||
<string name="fav_added">Pouet ajouté aux favoris !</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="settings_title_more_options">Options avancées</string>
|
||||||
<string name="set_wifi_only">Notifier en WIFI seulement</string>
|
<string name="set_wifi_only">Notifier en WIFI seulement</string>
|
||||||
<string name="set_notif_silent">Utiliser le vibreur</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="settings_title_profile">Modifier le profil</string>
|
||||||
<string name="set_profile_description">Présentation…</string>
|
<string name="set_profile_description">Présentation…</string>
|
||||||
<string name="set_save_changes">Enregistrer les modifications</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.
|
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
|
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
|
||||||
⚠ 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.
|
⚠ 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>
|
||||||
|
|
||||||
<string name="privacy_authorizations_title">Autorisations de l\'application</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>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>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>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>
|
||||||
|
|
||||||
<string name="privacy_API_authorizations_title">Autorisations de l\'API</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>Read</b> : Lire les données du compte.\n
|
||||||
- <b>Write</b> : Envoyer des messages et attacher des médias aux messages.\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>Follow</b> : S\'abonner, se désabonner, bloquer, débloquer.\n\n
|
||||||
<b>⚠ Ces actions ne sont réalisées qu\'à la demande de l\'utilisateur.</b>\n\n
|
<b>⚠ Ces actions ne sont réalisées qu\'à la demande de l\'utilisateur.</b>
|
||||||
</string>
|
</string>
|
||||||
<string name="privacy_API_title">Suivi et bibliothèques</string>
|
<string name="privacy_API_title">Suivi et bibliothèques</string>
|
||||||
<string name="privacy_API">
|
<string name="privacy_API">
|
||||||
|
|
|
@ -1,24 +1,103 @@
|
||||||
<resources>
|
<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">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</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>
|
||||||
|
|
||||||
<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="windowActionBar">false</item>
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
<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="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
|
|
||||||
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
|
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
|
||||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||||
</style>
|
</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>
|
</resources>
|
||||||
|
|