diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
new file mode 100644
index 000000000..c38a3c1f4
--- /dev/null
+++ b/.idea/markdown-navigator.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 871829d8b..7158618b8 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,73 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..7fd28ad94
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+**Mastalab** est une application Android dédiée à l'instance [mastodon.etalab.gouv.fr](https://mastodon.etalab.gouv.fr)
+
+Pour l'utiliser vous devez posséder un compte sur cette instance. Si ce n'est pas le cas vous pouvez [vous inscrire](https://mastodon.etalab.gouv.fr/auth/sign_up).
+Cependant vous devez avoir une adresse email qui soit listée sur [cette page](https://forum.etalab.gouv.fr/t/mastodon-le-reseau-social-libre-et-decentralise-en-plein-decollage/3538).
+
+
+Pour toute remarque ou demande d'évolution, vous pouvez me contacter sur cette instance : [@tschneider](https://mastodon.etalab.gouv.fr/@tschneider)
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index b58bf7e45..50d103687 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -8,7 +8,7 @@ android {
minSdkVersion 15
targetSdkVersion 25
versionCode 2
- versionName "1.0.2"
+ versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/MainActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/MainActivity.java
index c7bce7db1..39d489b0a 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/MainActivity.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/MainActivity.java
@@ -145,10 +145,19 @@ public class MainActivity extends AppCompatActivity
username.setText(String.format("@%s",account.getUsername()));
displayedName.setText(account.getDisplay_name());
imageLoader.displayImage(account.getAvatar(), profilePicture, options);
- if (savedInstanceState == null) {
+
+ boolean menuWasSelected = false;
+ if( getIntent() != null && getIntent().getExtras() != null ){
+ Bundle extras = getIntent().getExtras();
+ if (extras.getInt(INTENT_ACTION) == INTENT_NOTIFICATION){
+ navigationView.setCheckedItem(R.id.nav_notification);
+ navigationView.getMenu().performIdentifierAction(R.id.nav_notification, 0);
+ menuWasSelected = true;
+ }
+ }
+ if (savedInstanceState == null && !menuWasSelected) {
navigationView.setCheckedItem(R.id.nav_home);
navigationView.getMenu().performIdentifierAction(R.id.nav_home, 0);
-
}
//Title and menu selection when back pressed
getSupportFragmentManager().addOnBackStackChangedListener(
@@ -211,6 +220,17 @@ public class MainActivity extends AppCompatActivity
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
+ //Hide search bar on back pressed
+ if( toolbar.getChildCount() > 0) {
+ for (int i = 0; i < toolbar.getChildCount(); i++) {
+ if (toolbar.getChildAt(i) instanceof EditText) {
+ InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow((toolbar.getChildAt(i)).getWindowToken(), 0);
+ toolbar.removeViewAt(i);
+ break;
+ }
+ }
+ }
}
}
@@ -247,6 +267,8 @@ public class MainActivity extends AppCompatActivity
if(toolbar.getChildAt(i) instanceof EditText){
//Nothing in the search bar
if( ((EditText) toolbar.getChildAt(i)).getText().toString().trim().equals("")){
+ InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow((toolbar.getChildAt(i)).getWindowToken(), 0);
toolbar.removeViewAt(i);
return true;
}else{
@@ -308,6 +330,8 @@ public class MainActivity extends AppCompatActivity
if( toolbar.getChildCount() > 0) {
for (int i = 0; i < toolbar.getChildCount(); i++) {
if (toolbar.getChildAt(i) instanceof EditText) {
+ InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow((toolbar.getChildAt(i)).getWindowToken(), 0);
toolbar.removeViewAt(i);
break;
}
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
index 988185f89..843504512 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -22,6 +22,7 @@
>