Improves layout when writing toots (scroll) + allows to open url with an external app when using the built-in browser (via top bar icon)
This commit is contained in:
parent
8b625a34a9
commit
920cbd6afa
|
@ -369,21 +369,17 @@ public class MainActivity extends AppCompatActivity
|
||||||
String userIdIntent;
|
String userIdIntent;
|
||||||
boolean matchingIntent = false;
|
boolean matchingIntent = false;
|
||||||
if( extras.containsKey(INTENT_ACTION) ){
|
if( extras.containsKey(INTENT_ACTION) ){
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null); //Id of the authenticated account
|
|
||||||
final NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
|
final NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
|
||||||
userIdIntent = extras.getString(PREF_KEY_ID); //Id of the account in the intent
|
userIdIntent = extras.getString(PREF_KEY_ID); //Id of the account in the intent
|
||||||
if (extras.getInt(INTENT_ACTION) == NOTIFICATION_INTENT){
|
if (extras.getInt(INTENT_ACTION) == NOTIFICATION_INTENT){
|
||||||
if( userId!= null && !userId.equals(userIdIntent)) //Connected account is different from the id in the intent
|
changeUser(MainActivity.this, userIdIntent, false); //Connects the account which is related to the notification
|
||||||
changeUser(MainActivity.this, userIdIntent); //Connects the account which is related to the notification
|
|
||||||
unCheckAllMenuItems(navigationView.getMenu());
|
unCheckAllMenuItems(navigationView.getMenu());
|
||||||
navigationView.getMenu().performIdentifierAction(R.id.nav_notification, 0);
|
navigationView.getMenu().performIdentifierAction(R.id.nav_notification, 0);
|
||||||
if( navigationView.getMenu().findItem(R.id.nav_notification) != null)
|
if( navigationView.getMenu().findItem(R.id.nav_notification) != null)
|
||||||
navigationView.getMenu().findItem(R.id.nav_notification).setChecked(true);
|
navigationView.getMenu().findItem(R.id.nav_notification).setChecked(true);
|
||||||
matchingIntent = true;
|
matchingIntent = true;
|
||||||
}else if( extras.getInt(INTENT_ACTION) == HOME_TIMELINE_INTENT){
|
}else if( extras.getInt(INTENT_ACTION) == HOME_TIMELINE_INTENT){
|
||||||
if( userId!= null && !userId.equals(userIdIntent)) //Connected account is different from the id in the intent
|
changeUser(MainActivity.this, userIdIntent, false); //Connects the account which is related to the notification
|
||||||
changeUser(MainActivity.this, userIdIntent); //Connects the account which is related to the notification
|
|
||||||
unCheckAllMenuItems(navigationView.getMenu());
|
unCheckAllMenuItems(navigationView.getMenu());
|
||||||
navigationView.getMenu().performIdentifierAction(R.id.nav_home, 0);
|
navigationView.getMenu().performIdentifierAction(R.id.nav_home, 0);
|
||||||
if( navigationView.getMenu().findItem(R.id.nav_home) != null)
|
if( navigationView.getMenu().findItem(R.id.nav_home) != null)
|
||||||
|
|
|
@ -43,6 +43,7 @@ import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
|
@ -56,6 +57,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.TimePicker;
|
import android.widget.TimePicker;
|
||||||
|
@ -121,7 +123,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
private int maxChar;
|
private int maxChar;
|
||||||
private String visibility;
|
private String visibility;
|
||||||
private final int PICK_IMAGE = 56556;
|
private final int PICK_IMAGE = 56556;
|
||||||
private RelativeLayout loading_picture;
|
private ProgressBar loading_picture;
|
||||||
private ImageButton toot_picture;
|
private ImageButton toot_picture;
|
||||||
private ImageLoader imageLoader;
|
private ImageLoader imageLoader;
|
||||||
private DisplayImageOptions options;
|
private DisplayImageOptions options;
|
||||||
|
@ -132,7 +134,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
private Button toot_it;
|
private Button toot_it;
|
||||||
private EditText toot_content, toot_cw_content;
|
private EditText toot_content, toot_cw_content;
|
||||||
private TextView toot_reply_content;
|
private TextView toot_reply_content;
|
||||||
private LinearLayout toot_reply_content_container;
|
private RelativeLayout toot_reply_content_container;
|
||||||
private RelativeLayout toot_show_accounts;
|
private RelativeLayout toot_show_accounts;
|
||||||
private ListView toot_lv_accounts;
|
private ListView toot_lv_accounts;
|
||||||
private BroadcastReceiver search_validate;
|
private BroadcastReceiver search_validate;
|
||||||
|
@ -144,8 +146,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
private TextView title;
|
private TextView title;
|
||||||
private ImageView pp_actionBar;
|
private ImageView pp_actionBar;
|
||||||
|
|
||||||
private String pattern = "^(.|\\s)*(@([a-zA-Z0-9_]{2,}))$";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -190,12 +190,12 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
final TextView toot_space_left = (TextView) findViewById(R.id.toot_space_left);
|
final TextView toot_space_left = (TextView) findViewById(R.id.toot_space_left);
|
||||||
toot_visibility = (ImageButton) findViewById(R.id.toot_visibility);
|
toot_visibility = (ImageButton) findViewById(R.id.toot_visibility);
|
||||||
toot_picture = (ImageButton) findViewById(R.id.toot_picture);
|
toot_picture = (ImageButton) findViewById(R.id.toot_picture);
|
||||||
loading_picture = (RelativeLayout) findViewById(R.id.loading_picture);
|
loading_picture = (ProgressBar) findViewById(R.id.loading_picture);
|
||||||
toot_picture_container = (LinearLayout) findViewById(R.id.toot_picture_container);
|
toot_picture_container = (LinearLayout) findViewById(R.id.toot_picture_container);
|
||||||
toot_content = (EditText) findViewById(R.id.toot_content);
|
toot_content = (EditText) findViewById(R.id.toot_content);
|
||||||
toot_cw_content = (EditText) findViewById(R.id.toot_cw_content);
|
toot_cw_content = (EditText) findViewById(R.id.toot_cw_content);
|
||||||
toot_reply_content = (TextView) findViewById(R.id.toot_reply_content);
|
toot_reply_content = (TextView) findViewById(R.id.toot_reply_content);
|
||||||
toot_reply_content_container = (LinearLayout) findViewById(R.id.toot_reply_content_container);
|
toot_reply_content_container = (RelativeLayout) findViewById(R.id.toot_reply_content_container);
|
||||||
toot_show_accounts = (RelativeLayout) findViewById(R.id.toot_show_accounts);
|
toot_show_accounts = (RelativeLayout) findViewById(R.id.toot_show_accounts);
|
||||||
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);
|
||||||
|
@ -406,7 +406,8 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
String pattern = "^(.|\\s)*(@([a-zA-Z0-9_]{2,}))$";
|
||||||
|
final Pattern sPattern = Pattern.compile(pattern);
|
||||||
toot_content.addTextChangedListener(new TextWatcher() {
|
toot_content.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||||
|
@ -415,8 +416,14 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
Pattern sPattern = Pattern.compile(pattern);
|
int length;
|
||||||
Matcher m = sPattern.matcher(s.toString());
|
//Only check last 20 characters to avoid lags
|
||||||
|
if( s.toString().length() < 20 ){ //Less than 20 characters are written
|
||||||
|
length = s.toString().length();
|
||||||
|
}else {
|
||||||
|
length = 20;
|
||||||
|
}
|
||||||
|
Matcher m = sPattern.matcher(s.toString().substring(s.toString().length()- length, s.toString().length()));
|
||||||
if(m.matches()) {
|
if(m.matches()) {
|
||||||
String search = m.group(3);
|
String search = m.group(3);
|
||||||
new RetrieveSearchAccountsAsyncTask(getApplicationContext(),search,TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new RetrieveSearchAccountsAsyncTask(getApplicationContext(),search,TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
@ -434,6 +441,21 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
toot_space_left.setText(String.valueOf((maxChar - totalChar)));
|
toot_space_left.setText(String.valueOf((maxChar - totalChar)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//Allow scroll of the EditText though it's embedded in a scrollview
|
||||||
|
toot_content.setOnTouchListener(new View.OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
if (v.getId() == R.id.toot_content) {
|
||||||
|
v.getParent().requestDisallowInterceptTouchEvent(true);
|
||||||
|
switch (event.getAction() & MotionEvent.ACTION_MASK) {
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
v.getParent().requestDisallowInterceptTouchEvent(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
toot_cw_content.addTextChangedListener(new TextWatcher() {
|
toot_cw_content.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,14 +16,17 @@ package fr.gouv.etalab.mastodon.activities;
|
||||||
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -119,12 +122,21 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
webView.loadUrl(url);
|
webView.loadUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
getMenuInflater().inflate(R.menu.main_webview, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case android.R.id.home:
|
case android.R.id.home:
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
|
case R.id.action_go:
|
||||||
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||||
|
startActivity(browserIntent);
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,9 +210,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
try {
|
try {
|
||||||
if( !status.isTranslated() ){
|
if( !status.isTranslated() ){
|
||||||
//new YandexQuery(StatusListAdapter.this).getYandexTextview(position, status.getContent(), currentLocale);
|
|
||||||
new YandexQuery(StatusListAdapter.this).getYandexTextview(position, status.getContent(), currentLocale);
|
new YandexQuery(StatusListAdapter.this).getYandexTextview(position, status.getContent(), currentLocale);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
status.setTranslationShown(!status.isTranslationShown());
|
status.setTranslationShown(!status.isTranslationShown());
|
||||||
statusListAdapter.notifyDataSetChanged();
|
statusListAdapter.notifyDataSetChanged();
|
||||||
|
@ -272,7 +270,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
changeDrawableColor(context, R.drawable.ic_translate,R.color.black);
|
changeDrawableColor(context, R.drawable.ic_translate,R.color.black);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Redraws top icons (boost/reply)
|
||||||
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);
|
||||||
|
@ -286,7 +284,6 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
||||||
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() {
|
||||||
|
|
|
@ -776,7 +776,7 @@ public class Helper {
|
||||||
menuAccountsOpened = false;
|
menuAccountsOpened = false;
|
||||||
String userId = account.getId();
|
String userId = account.getId();
|
||||||
Toast.makeText(activity, activity.getString(R.string.toast_account_changed, "@" + account.getAcct() + "@" + account.getInstance()), Toast.LENGTH_LONG).show();
|
Toast.makeText(activity, activity.getString(R.string.toast_account_changed, "@" + account.getAcct() + "@" + account.getInstance()), Toast.LENGTH_LONG).show();
|
||||||
changeUser(activity, userId);
|
changeUser(activity, userId, true);
|
||||||
arrow.setImageResource(R.drawable.ic_arrow_drop_down);
|
arrow.setImageResource(R.drawable.ic_arrow_drop_down);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -846,13 +846,15 @@ public class Helper {
|
||||||
* @param activity Activity
|
* @param activity Activity
|
||||||
* @param userID String - the new user id
|
* @param userID String - the new user id
|
||||||
*/
|
*/
|
||||||
public static void changeUser(Activity activity, String userID) {
|
public static void changeUser(Activity activity, String userID, boolean checkItem) {
|
||||||
|
|
||||||
final NavigationView navigationView = (NavigationView) activity.findViewById(R.id.nav_view);
|
final NavigationView navigationView = (NavigationView) activity.findViewById(R.id.nav_view);
|
||||||
navigationView.getMenu().clear();
|
navigationView.getMenu().clear();
|
||||||
navigationView.inflateMenu(R.menu.activity_main_drawer);
|
navigationView.inflateMenu(R.menu.activity_main_drawer);
|
||||||
navigationView.setCheckedItem(R.id.nav_home);
|
if( checkItem ) {
|
||||||
navigationView.getMenu().performIdentifierAction(R.id.nav_home, 0);
|
navigationView.setCheckedItem(R.id.nav_home);
|
||||||
|
navigationView.getMenu().performIdentifierAction(R.id.nav_home, 0);
|
||||||
|
}
|
||||||
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();
|
||||||
Account account = new AccountDAO(activity,db).getAccountByID(userID);
|
Account account = new AccountDAO(activity,db).getAccountByID(userID);
|
||||||
//Can happen when an account has been deleted and there is a click on an old notification
|
//Can happen when an account has been deleted and there is a click on an old notification
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 487 B |
Binary file not shown.
After Width: | Height: | Size: 281 B |
Binary file not shown.
After Width: | Height: | Size: 339 B |
Binary file not shown.
After Width: | Height: | Size: 647 B |
Binary file not shown.
After Width: | Height: | Size: 985 B |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -15,178 +15,170 @@
|
||||||
You should have received a copy of the GNU General Public License along with Thomas Schneider; if not,
|
You should have received a copy of the GNU General Public License along with Thomas Schneider; if not,
|
||||||
see <http://www.gnu.org/licenses>.
|
see <http://www.gnu.org/licenses>.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
android:fillViewport="true"
|
||||||
android:id="@+id/drawer_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="20dp"
|
>
|
||||||
android:paddingBottom="20dp"
|
|
||||||
android:paddingLeft="@dimen/toot_padding"
|
|
||||||
android:paddingRight="@dimen/toot_padding"
|
|
||||||
android:orientation="vertical">
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/toot_cw_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:animateLayoutChanges="true"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:hint="@string/toot_cw_placeholder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/toot_reply_content_container"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:visibility="gone"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="20dp"
|
||||||
|
android:paddingBottom="20dp"
|
||||||
|
android:paddingLeft="@dimen/toot_padding"
|
||||||
|
android:paddingRight="@dimen/toot_padding"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<EditText
|
||||||
android:text="@string/toot_reply_content_title"
|
android:id="@+id/toot_cw_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:hint="@string/toot_cw_placeholder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
|
android:id="@+id/toot_reply_content_container"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="horizontal"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
>
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/toot_reply_content_title"
|
||||||
|
android:text="@string/toot_reply_content_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/toot_reply_content_title"
|
||||||
android:id="@+id/toot_reply_content"
|
android:id="@+id/toot_reply_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="top|start"
|
android:gravity="top|start"
|
||||||
android:maxLines="4"
|
android:maxLines="4"
|
||||||
|
android:textStyle="italic"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
android:layout_width="0dp"
|
android:textSize="12sp"
|
||||||
android:layout_weight="1"
|
android:layout_marginEnd="40dp"
|
||||||
|
android:layout_marginRight="40dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/toot_close_reply"
|
android:id="@+id/toot_close_reply"
|
||||||
android:layout_width="40dp"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_height="40dp"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="5dp"
|
||||||
app:srcCompat="@drawable/ic_close" />
|
app:srcCompat="@drawable/ic_close" />
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
<EditText
|
||||||
</LinearLayout>
|
android:layout_marginTop="10dp"
|
||||||
<EditText
|
android:id="@+id/toot_content"
|
||||||
android:layout_marginTop="10dp"
|
android:gravity="top|start"
|
||||||
android:id="@+id/toot_content"
|
android:inputType="textMultiLine"
|
||||||
android:gravity="top|start"
|
android:hint="@string/toot_placeholder"
|
||||||
android:hint="@string/toot_placeholder"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:minLines="4"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="0dp" />
|
android:layout_height="0dp" />
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:padding="5dp"
|
|
||||||
android:id="@+id/toot_picture_container"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxHeight="100dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
>
|
>
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:id="@+id/loading_picture"
|
android:padding="5dp"
|
||||||
android:visibility="gone"
|
android:id="@+id/toot_picture_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:maxHeight="100dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/pbar_inf"
|
android:id="@+id/loading_picture"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:indeterminate="true" />
|
android:indeterminate="true" />
|
||||||
<TextView
|
</LinearLayout>
|
||||||
android:id="@+id/loader_progress"
|
</HorizontalScrollView>
|
||||||
android:textSize="12sp"
|
<LinearLayout
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textColor="?attr/colorAccent"
|
|
||||||
android:layout_below="@+id/pbar_inf"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</HorizontalScrollView>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<RelativeLayout
|
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/toot_show_accounts"
|
|
||||||
android:maxHeight="300dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<android.support.design.widget.FloatingActionButton
|
<RelativeLayout
|
||||||
android:id="@+id/toot_close_accounts"
|
android:visibility="gone"
|
||||||
|
android:id="@+id/toot_show_accounts"
|
||||||
|
android:maxHeight="300dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/toot_close_accounts"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
app:fabSize="mini"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
app:srcCompat="@drawable/ic_close" />
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/toot_lv_accounts"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/toot_picture"
|
||||||
|
android:padding="5dp"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_alignParentTop="true"
|
android:src="@drawable/ic_action_camera"
|
||||||
android:layout_alignParentEnd="true"
|
/>
|
||||||
android:layout_alignParentRight="true"
|
<ImageButton
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:id="@+id/toot_visibility"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@drawable/ic_action_globe"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/toot_cw"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/cw"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Borderless.Colored"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/toot_space_left"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:fabSize="mini"
|
android:layout_height="40dp" />
|
||||||
android:layout_margin="@dimen/fab_margin"
|
<Button
|
||||||
app:srcCompat="@drawable/ic_close" />
|
android:id="@+id/toot_it"
|
||||||
<ListView
|
android:padding="5dp"
|
||||||
android:id="@+id/toot_lv_accounts"
|
android:text="@string/toot_it"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:gravity="center"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content" />
|
||||||
</RelativeLayout>
|
|
||||||
<ImageButton
|
</LinearLayout>
|
||||||
android:id="@+id/toot_picture"
|
<CheckBox
|
||||||
android:padding="5dp"
|
android:text="@string/toot_sensitive"
|
||||||
android:layout_width="40dp"
|
android:visibility="gone"
|
||||||
android:layout_height="40dp"
|
android:id="@+id/toot_sensitive"
|
||||||
android:src="@drawable/ic_action_camera"
|
android:layout_width="match_parent"
|
||||||
/>
|
|
||||||
<ImageButton
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:id="@+id/toot_visibility"
|
|
||||||
android:padding="5dp"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@drawable/ic_action_globe"
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
android:id="@+id/toot_cw"
|
|
||||||
android:padding="5dp"
|
|
||||||
android:text="@string/cw"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Borderless.Colored"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/toot_space_left"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_height="40dp" />
|
|
||||||
<Button
|
|
||||||
android:id="@+id/toot_it"
|
|
||||||
android:padding="5dp"
|
|
||||||
android:text="@string/toot_it"
|
|
||||||
android:layout_gravity="end"
|
|
||||||
android:gravity="center"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<CheckBox
|
</ScrollView>
|
||||||
android:text="@string/toot_sensitive"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/toot_sensitive"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_go"
|
||||||
|
android:title="@string/open_with"
|
||||||
|
android:icon="@drawable/ic_action_goright"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
</menu>
|
|
@ -46,6 +46,7 @@
|
||||||
<string name="schedule">Programmer</string>
|
<string name="schedule">Programmer</string>
|
||||||
<string name="next">Suivant</string>
|
<string name="next">Suivant</string>
|
||||||
<string name="previous">Précédent</string>
|
<string name="previous">Précédent</string>
|
||||||
|
<string name="open_with">Ouvrir avec</string>
|
||||||
<!--- Menu -->
|
<!--- Menu -->
|
||||||
<string name="home_menu">Accueil</string>
|
<string name="home_menu">Accueil</string>
|
||||||
<string name="local_menu">Fil public local</string>
|
<string name="local_menu">Fil public local</string>
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
<string name="next">Next</string>
|
<string name="next">Next</string>
|
||||||
<string name="previous">Previous</string>
|
<string name="previous">Previous</string>
|
||||||
|
<string name="open_with">Open with</string>
|
||||||
<!--- Menu -->
|
<!--- Menu -->
|
||||||
<string name="home_menu">Home</string>
|
<string name="home_menu">Home</string>
|
||||||
<string name="local_menu">Local timeline</string>
|
<string name="local_menu">Local timeline</string>
|
||||||
|
|
Loading…
Reference in New Issue