This commit is contained in:
tateisu 2017-05-04 08:11:05 +09:00
parent f0411b1e1b
commit 431d6f3953
86 changed files with 1397 additions and 703 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
_ArtWork/ic_follow_plus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
_ArtWork/ic_followed_by.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

View File

Before

Width:  |  Height:  |  Size: 1010 B

After

Width:  |  Height:  |  Size: 1010 B

View File

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 784 B

View File

Before

Width:  |  Height:  |  Size: 371 KiB

After

Width:  |  Height:  |  Size: 371 KiB

View File

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 228 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -9,8 +9,8 @@ android {
applicationId "jp.juggler.subwaytooter"
minSdkVersion 21
targetSdkVersion 25
versionCode 32
versionName "0.3.2"
versionCode 33
versionName "0.3.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

View File

@ -29,8 +29,7 @@ import jp.juggler.subwaytooter.util.Utils;
public class ActAccountSetting extends AppCompatActivity
implements View.OnClickListener
, CompoundButton.OnCheckedChangeListener
{
, CompoundButton.OnCheckedChangeListener {
static final LogCategory log = new LogCategory( "ActAccountSetting" );
@ -64,7 +63,7 @@ public class ActAccountSetting extends AppCompatActivity
static final int REQUEST_CODE_ACCT_CUSTOMIZE = 1;
@Override protected void onActivityResult( int requestCode, int resultCode, Intent data ){
if( requestCode== REQUEST_CODE_ACCT_CUSTOMIZE && resultCode == RESULT_OK ){
if( requestCode == REQUEST_CODE_ACCT_CUSTOMIZE && resultCode == RESULT_OK ){
showAcctColor();
}
super.onActivityResult( requestCode, resultCode, data );
@ -75,7 +74,6 @@ public class ActAccountSetting extends AppCompatActivity
View btnAccessToken;
View btnAccountRemove;
Button btnVisibility;
Switch swConfirmBeforeBoost;
Switch swNSFWOpen;
Button btnOpenBrowser;
CheckBox cbNotificationMention;
@ -83,6 +81,12 @@ public class ActAccountSetting extends AppCompatActivity
CheckBox cbNotificationFavourite;
CheckBox cbNotificationFollow;
CheckBox cbConfirmFollow;
CheckBox cbConfirmFollowLockedUser;
CheckBox cbConfirmUnfollow;
CheckBox cbConfirmBoost;
CheckBox cbConfirmToot;
TextView tvUserCustom;
View btnUserCustom;
String full_acct;
@ -94,14 +98,19 @@ public class ActAccountSetting extends AppCompatActivity
btnAccessToken = findViewById( R.id.btnAccessToken );
btnAccountRemove = findViewById( R.id.btnAccountRemove );
btnVisibility = (Button) findViewById( R.id.btnVisibility );
swConfirmBeforeBoost = (Switch) findViewById( R.id.swConfirmBeforeBoost );
swNSFWOpen = (Switch) findViewById( R.id.swNSFWOpen );
btnOpenBrowser = (Button) findViewById( R.id.btnOpenBrowser );
cbNotificationMention = (CheckBox) findViewById( R.id.cbNotificationMention );
cbNotificationBoost = (CheckBox) findViewById( R.id.cbNotificationBoost );
cbNotificationFavourite = (CheckBox) findViewById( R.id.cbNotificationFavourite );
cbNotificationFollow = (CheckBox) findViewById( R.id.cbNotificationFollow );
cbConfirmFollow = (CheckBox) findViewById( R.id.cbConfirmFollow );
cbConfirmFollowLockedUser = (CheckBox) findViewById( R.id.cbConfirmFollowLockedUser );
cbConfirmUnfollow = (CheckBox) findViewById( R.id.cbConfirmUnfollow );
cbConfirmBoost = (CheckBox) findViewById( R.id.cbConfirmBoost );
cbConfirmToot = (CheckBox) findViewById( R.id.cbConfirmToot );
tvUserCustom = (TextView) findViewById( R.id.tvUserCustom );
btnUserCustom = findViewById( R.id.btnUserCustom );
@ -112,11 +121,16 @@ public class ActAccountSetting extends AppCompatActivity
btnUserCustom.setOnClickListener( this );
swNSFWOpen.setOnCheckedChangeListener( this );
swConfirmBeforeBoost.setOnCheckedChangeListener( this );
cbNotificationMention.setOnCheckedChangeListener( this );
cbNotificationBoost.setOnCheckedChangeListener( this );
cbNotificationFavourite.setOnCheckedChangeListener( this );
cbNotificationFollow.setOnCheckedChangeListener( this );
cbConfirmFollow.setOnCheckedChangeListener( this );
cbConfirmFollowLockedUser.setOnCheckedChangeListener( this );
cbConfirmUnfollow.setOnCheckedChangeListener( this );
cbConfirmBoost.setOnCheckedChangeListener( this );
cbConfirmToot.setOnCheckedChangeListener( this );
}
boolean loading = false;
@ -134,44 +148,62 @@ public class ActAccountSetting extends AppCompatActivity
loading = true;
swConfirmBeforeBoost.setChecked( a.confirm_boost );
swNSFWOpen.setChecked( a.dont_hide_nsfw );
cbNotificationMention.setChecked( a.notification_mention );
cbNotificationBoost.setChecked( a.notification_boost );
cbNotificationFavourite.setChecked( a.notification_favourite );
cbNotificationFollow.setChecked( a.notification_follow );
cbConfirmFollow.setChecked( a.confirm_follow );
cbConfirmFollowLockedUser.setChecked( a.confirm_follow_locked );
cbConfirmUnfollow.setChecked( a.confirm_unfollow );
cbConfirmBoost.setChecked( a.confirm_boost );
cbConfirmToot.setChecked( a.confirm_post );
loading = false;
boolean enabled = ! a.isPseudo();
btnAccessToken.setEnabled( enabled );
btnVisibility.setEnabled( enabled );
swConfirmBeforeBoost.setEnabled( enabled );
cbNotificationMention.setEnabled( enabled );
cbNotificationBoost.setEnabled( enabled );
cbNotificationFavourite.setEnabled( enabled );
cbNotificationFollow.setEnabled( enabled );
cbConfirmFollow.setEnabled( enabled );
cbConfirmFollowLockedUser.setEnabled( enabled );
cbConfirmUnfollow.setEnabled( enabled );
cbConfirmBoost.setEnabled( enabled );
cbConfirmToot.setEnabled( enabled );
updateVisibility();
showAcctColor();
}
private void showAcctColor(){
AcctColor ac = AcctColor.load( full_acct );
tvUserCustom.setText( ac!=null && !TextUtils.isEmpty( ac.nickname) ? ac.nickname : full_acct );
tvUserCustom.setText( ac != null && ! TextUtils.isEmpty( ac.nickname ) ? ac.nickname : full_acct );
tvUserCustom.setTextColor( ac != null && ac.color_fg != 0 ? ac.color_fg : Styler.getAttributeColor( this, R.attr.colorAcctSmall ) );
tvUserCustom.setBackgroundColor( ac != null && ac.color_bg != 0 ? ac.color_bg : 0 );
tvUserCustom.setBackgroundColor( ac != null && ac.color_bg != 0 ? ac.color_bg : 0 );
}
private void saveUIToData(){
if( loading ) return;
account.visibility = visibility;
account.confirm_boost = swConfirmBeforeBoost.isChecked();
account.dont_hide_nsfw = swNSFWOpen.isChecked();
account.notification_mention = cbNotificationMention.isChecked();
account.notification_boost = cbNotificationBoost.isChecked();
account.notification_favourite = cbNotificationFavourite.isChecked();
account.notification_follow = cbNotificationFollow.isChecked();
account.confirm_follow = cbConfirmFollow.isChecked();
account.confirm_follow_locked = cbConfirmFollowLockedUser.isChecked();
account.confirm_unfollow = cbConfirmUnfollow.isChecked();
account.confirm_boost = cbConfirmBoost.isChecked();
account.confirm_post = cbConfirmToot.isChecked();
account.saveSetting();
}
@ -195,9 +227,9 @@ public class ActAccountSetting extends AppCompatActivity
open_browser( "https://" + account.host + "/" );
break;
case R.id.btnUserCustom:
ActNickname.open( this, full_acct, REQUEST_CODE_ACCT_CUSTOMIZE);
ActNickname.open( this, full_acct, REQUEST_CODE_ACCT_CUSTOMIZE );
break;
}
}
@ -345,6 +377,6 @@ public class ActAccountSetting extends AppCompatActivity
progress.show();
AsyncTaskCompat.executeParallel( task );
}
}

View File

@ -38,6 +38,7 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
Switch swDisableFastScroller;
Switch swSimpleList;
Switch swExitAppWhenCloseProtectedColumn;
Switch swShowFollowButtonInButtonBar;
Spinner spBackButtonAction;
Spinner spUITheme;
@ -69,6 +70,9 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
swExitAppWhenCloseProtectedColumn = (Switch) findViewById( R.id.swExitAppWhenCloseProtectedColumn );
swExitAppWhenCloseProtectedColumn.setOnCheckedChangeListener( this );
swShowFollowButtonInButtonBar = (Switch) findViewById( R.id.swShowFollowButtonInButtonBar );
swShowFollowButtonInButtonBar.setOnCheckedChangeListener( this );
cbNotificationSound = (CheckBox) findViewById( R.id.cbNotificationSound );
cbNotificationVibration = (CheckBox) findViewById( R.id.cbNotificationVibration );
cbNotificationLED = (CheckBox) findViewById( R.id.cbNotificationLED );
@ -130,6 +134,7 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
swDisableFastScroller.setChecked( pref.getBoolean( Pref.KEY_DISABLE_FAST_SCROLLER, true ) );
swSimpleList.setChecked( pref.getBoolean( Pref.KEY_SIMPLE_LIST, false ) );
swExitAppWhenCloseProtectedColumn.setChecked( pref.getBoolean( Pref.KEY_EXIT_APP_WHEN_CLOSE_PROTECTED_COLUMN, false ) );
swShowFollowButtonInButtonBar.setChecked( pref.getBoolean( Pref.KEY_SHOW_FOLLOW_BUTTON_IN_BUTTON_BAR, false ) );
cbNotificationSound.setChecked( pref.getBoolean( Pref.KEY_NOTIFICATION_SOUND, true ) );
cbNotificationVibration.setChecked( pref.getBoolean( Pref.KEY_NOTIFICATION_VIBRATION, true ) );
@ -150,6 +155,7 @@ public class ActAppSetting extends AppCompatActivity implements CompoundButton.O
.putBoolean( Pref.KEY_DISABLE_FAST_SCROLLER, swDisableFastScroller.isChecked() )
.putBoolean( Pref.KEY_SIMPLE_LIST, swSimpleList.isChecked() )
.putBoolean( Pref.KEY_EXIT_APP_WHEN_CLOSE_PROTECTED_COLUMN, swExitAppWhenCloseProtectedColumn.isChecked() )
.putBoolean( Pref.KEY_SHOW_FOLLOW_BUTTON_IN_BUTTON_BAR, swShowFollowButtonInButtonBar.isChecked() )
.putBoolean( Pref.KEY_NOTIFICATION_SOUND, cbNotificationSound.isChecked() )
.putBoolean( Pref.KEY_NOTIFICATION_VIBRATION, cbNotificationVibration.isChecked() )

View File

@ -26,6 +26,9 @@ import java.util.List;
import jp.juggler.subwaytooter.util.Utils;
public class ActColumnList extends AppCompatActivity {
static final String TMP_FILE_COLUMN_LIST = "tmp_column_list";
public static final String EXTRA_ORDER = "order";
public static final String EXTRA_SELECTION = "selection";
@ -36,31 +39,25 @@ public class ActColumnList extends AppCompatActivity {
initUI();
if( savedInstanceState != null ){
restoreData(
savedInstanceState.getString( EXTRA_ORDER )
, savedInstanceState.getInt( EXTRA_SELECTION )
);
restoreData( savedInstanceState.getInt( EXTRA_SELECTION ) );
}else{
Intent intent = getIntent();
restoreData(
intent.getStringExtra( EXTRA_ORDER )
, intent.getIntExtra( EXTRA_SELECTION, - 1 )
);
restoreData( intent.getIntExtra( EXTRA_SELECTION, - 1 ) );
}
}
@Override
protected void onSaveInstanceState( Bundle outState ){
super.onSaveInstanceState( outState );
//
outState.putInt( EXTRA_SELECTION, old_selection );
//
JSONArray array = new JSONArray();
List< MyItem > item_list = listAdapter.getItemList();
for( int i = 0, ie = item_list.size() ; i < ie ; ++ i ){
array.put( item_list.get( i ).json );
}
outState.putString( EXTRA_ORDER, array.toString() );
App1.saveColumnList( this,TMP_FILE_COLUMN_LIST,array );
}
@Override
@ -133,25 +130,27 @@ public class ActColumnList extends AppCompatActivity {
} );
}
void restoreData( String svColumnList, int ivSelection ){
void restoreData( int ivSelection ){
this.old_selection = ivSelection;
ArrayList< MyItem > tmp_list = new ArrayList<>();
try{
JSONArray array = new JSONArray( svColumnList );
for( int i = 0, ie = array.length() ; i < ie ; ++ i ){
try{
JSONObject src = array.optJSONObject( i );
MyItem item = new MyItem( src, i, this );
if( src != null ){
tmp_list.add( item );
if( old_selection == item.old_index ){
item.setOldSelection( true );
JSONArray array = App1.loadColumnList( this, TMP_FILE_COLUMN_LIST );
if( array != null ){
for( int i = 0, ie = array.length() ; i < ie ; ++ i ){
try{
JSONObject src = array.optJSONObject( i );
MyItem item = new MyItem( src, i, this );
if( src != null ){
tmp_list.add( item );
if( old_selection == item.old_index ){
item.setOldSelection( true );
}
}
}catch( Throwable ex2 ){
ex2.printStackTrace();
}
}catch( Throwable ex2 ){
ex2.printStackTrace();
}
}
}catch( Throwable ex ){

View File

@ -31,10 +31,6 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@ -49,6 +45,7 @@ import jp.juggler.subwaytooter.api.entity.TootApplication;
import jp.juggler.subwaytooter.api.entity.TootRelationShip;
import jp.juggler.subwaytooter.api.entity.TootStatus;
import jp.juggler.subwaytooter.dialog.AccountPicker;
import jp.juggler.subwaytooter.dialog.DlgConfirm;
import jp.juggler.subwaytooter.dialog.LoginForm;
import jp.juggler.subwaytooter.dialog.ReportForm;
import jp.juggler.subwaytooter.table.AcctColor;
@ -171,6 +168,7 @@ public class ActMain extends AppCompatActivity
static final int REQUEST_CODE_ACCOUNT_SETTING = 2;
static final int REQUEST_APP_ABOUT = 3;
static final int REQUEST_CODE_NICKNAME = 4;
static final int REQUEST_CODE_POST = 5;
@Override protected void onActivityResult( int requestCode, int resultCode, Intent data ){
if( resultCode == RESULT_OK ){
@ -205,9 +203,11 @@ public class ActMain extends AppCompatActivity
return;
}
}else if( requestCode == REQUEST_CODE_NICKNAME ){
for( Column column: pager_adapter.column_list ){
for( Column column : pager_adapter.column_list ){
column.onNicknameUpdated();
}
}else if( requestCode == REQUEST_CODE_POST ){
reloadAccountSetting();
}
}
super.onActivityResult( requestCode, resultCode, data );
@ -718,7 +718,17 @@ public class ActMain extends AppCompatActivity
column.fireVisualCallback2();
}
}
void reloadAccountSetting(SavedAccount account){
ArrayList< SavedAccount > done_list = new ArrayList<>();
for( Column column : pager_adapter.column_list ){
SavedAccount a = column.access_info;
if( ! Utils.equalsNullable( a.acct ,account.acct ) ) continue;
if( done_list.contains( a ) ) continue;
done_list.add( a );
a.reloadSetting();
column.fireVisualCallback2();
}
}
public void performColumnClose( boolean bConfirm, final Column column ){
if( column.dont_close ){
Utils.showToast( this, false, R.string.column_has_dont_close_option );
@ -979,7 +989,7 @@ public class ActMain extends AppCompatActivity
// ソートする
Collections.sort( account_list, new Comparator< SavedAccount >() {
@Override public int compare( SavedAccount a, SavedAccount b ){
return String.CASE_INSENSITIVE_ORDER.compare( AcctColor.getNickname(a.acct), AcctColor.getNickname(b.acct) );
return String.CASE_INSENSITIVE_ORDER.compare( AcctColor.getNickname( a.acct ), AcctColor.getNickname( b.acct ) );
}
} );
@ -1011,24 +1021,24 @@ public class ActMain extends AppCompatActivity
if( c.access_info.isPseudo() ){
Utils.showToast( this, false, R.string.not_available_for_pseudo_account );
}else{
ActPost.open( this, c.access_info.db_id, "" );
ActPost.open( this, REQUEST_CODE_POST,c.access_info.db_id, "" );
}
}
}
public void performReply( SavedAccount account, TootStatus status ){
ActPost.open( this, account.db_id, status );
ActPost.open( this, REQUEST_CODE_POST,account.db_id, status );
}
public void performMention( SavedAccount account, TootAccount who ){
ActPost.open( this, account.db_id, "@" + account.getFullAcct( who ) + " " );
ActPost.open( this, REQUEST_CODE_POST,account.db_id, "@" + account.getFullAcct( who ) + " " );
}
public void performMentionFromAnotherAccount( SavedAccount access_info, final TootAccount who, ArrayList< SavedAccount > account_list_non_pseudo ){
final String initial_text = "@" + access_info.getFullAcct( who ) + " ";
AccountPicker.pick( this, false, false, account_list_non_pseudo, new AccountPicker.AccountPickerCallback() {
@Override public void onAccountPicked( SavedAccount ai ){
ActPost.open( ActMain.this, ai.db_id, initial_text);
ActPost.open( ActMain.this, REQUEST_CODE_POST,ai.db_id, initial_text );
}
} );
}
@ -1160,9 +1170,9 @@ public class ActMain extends AppCompatActivity
return map_busy_boost.contains( busy_key );
}
public void performBoost( final SavedAccount account, final TootStatus status, boolean bConfirmed, final RelationChangedCallback callback ){
public void performBoost( final SavedAccount access_info, final TootStatus status, boolean bConfirmed, final RelationChangedCallback callback ){
//
final String busy_key = account.host + ":" + status.id;
final String busy_key = access_info.host + ":" + status.id;
//
if( map_busy_boost.contains( busy_key ) ){
Utils.showToast( this, false, R.string.wait_previous_operation );
@ -1171,24 +1181,27 @@ public class ActMain extends AppCompatActivity
if( status.reblogged ){
// FAVがついているかFAV操作中はBoostを外せない
if( isBusyFav( account, status ) || status.favourited ){
if( isBusyFav( access_info, status ) || status.favourited ){
Utils.showToast( this, false, R.string.cant_remove_boost_while_favourited );
return;
}
}else{
if( ! bConfirmed && account.confirm_boost ){
new AlertDialog.Builder( this )
.setTitle( R.string.confirm )
.setMessage( R.string.confirm_boost )
.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() {
@Override public void onClick( DialogInterface dialog, int which ){
performBoost( account, status, true, callback );
}
} )
.setNegativeButton( R.string.cancel, null )
.show();
return;
}
}else if( ! bConfirmed ){
DlgConfirm.open( this, getString( R.string.confirm_boost_from,AcctColor.getNickname( access_info.acct ) ), new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_boost;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_boost = bv;
access_info.saveSetting();
reloadAccountSetting(access_info);
}
@Override public void onOK(){
performBoost( access_info, status, true, callback );
}
} );
return;
}
//
@ -1207,7 +1220,7 @@ public class ActMain extends AppCompatActivity
@Override public void publishApiProgress( final String s ){
}
} );
client.setAccount( account );
client.setAccount( access_info );
Request.Builder request_builder = new Request.Builder()
.post( RequestBody.create(
@ -1223,7 +1236,7 @@ public class ActMain extends AppCompatActivity
// reblog,unreblog のレスポンスは信用ならんのでステータスを再取得する
result = client.request( "/api/v1/statuses/" + status.id );
if( result.object != null ){
new_status = TootStatus.parse( log, account, result.object );
new_status = TootStatus.parse( log, access_info, result.object );
}
}
@ -1255,7 +1268,7 @@ public class ActMain extends AppCompatActivity
}
}
for( Column column : pager_adapter.column_list ){
column.findStatus( account, new_status.id, new Column.StatusEntryCallback() {
column.findStatus( access_info, new_status.id, new Column.StatusEntryCallback() {
@Override public void onIterate( TootStatus status ){
status.reblogged = new_status.reblogged;
status.reblogs_count = new_status.reblogs_count;
@ -1266,12 +1279,12 @@ public class ActMain extends AppCompatActivity
}else{
Utils.showToast( ActMain.this, true, result.error );
}
showColumnMatchAccount( account );
showColumnMatchAccount( access_info );
}
}.execute();
showColumnMatchAccount( account );
showColumnMatchAccount( access_info );
}
////////////////////////////////////////
@ -1307,8 +1320,9 @@ public class ActMain extends AppCompatActivity
}
private void performColumnList(){
JSONArray array = encodeColumnList();
App1.saveColumnList(this,ActColumnList.TMP_FILE_COLUMN_LIST,array);
Intent intent = new Intent( this, ActColumnList.class );
intent.putExtra( ActColumnList.EXTRA_ORDER, encodeColumnList().toString() );
intent.putExtra( ActColumnList.EXTRA_SELECTION, pager.getCurrentItem() );
startActivityForResult( intent, REQUEST_CODE_COLUMN_LIST );
}
@ -1324,49 +1338,23 @@ public class ActMain extends AppCompatActivity
void saveColumnList(){
JSONArray array = encodeColumnList();
try{
OutputStream os = openFileOutput( FILE_COLUMN_LIST, MODE_PRIVATE );
try{
os.write( Utils.encodeUTF8( array.toString() ) );
}finally{
os.close();
}
}catch( Throwable ex ){
ex.printStackTrace();
Utils.showToast( this, ex, "saveColumnList failed." );
}
App1.saveColumnList(this,FILE_COLUMN_LIST,array);
}
private void loadColumnList(){
try{
InputStream is = openFileInput( FILE_COLUMN_LIST );
try{
ByteArrayOutputStream bao = new ByteArrayOutputStream( is.available() );
byte[] tmp = new byte[ 4096 ];
for( ; ; ){
int r = is.read( tmp, 0, tmp.length );
if( r <= 0 ) break;
bao.write( tmp, 0, r );
JSONArray array = App1.loadColumnList(this,FILE_COLUMN_LIST);
if( array != null ){
for( int i = 0, ie = array.length() ; i < ie ; ++ i ){
try{
JSONObject src = array.optJSONObject( i );
Column col = new Column( ActMain.this, src );
pager_adapter.addColumn( pager, col, pager_adapter.getCount() );
}catch( Throwable ex ){
ex.printStackTrace();
}
JSONArray array = new JSONArray( Utils.decodeUTF8( bao.toByteArray() ) );
for( int i = 0, ie = array.length() ; i < ie ; ++ i ){
try{
JSONObject src = array.optJSONObject( i );
Column col = new Column( ActMain.this, src );
pager_adapter.addColumn( pager, col, pager_adapter.getCount() );
}catch( Throwable ex ){
ex.printStackTrace();
}
}
}finally{
is.close();
}
}catch( FileNotFoundException ignored ){
}catch( Throwable ex ){
ex.printStackTrace();
Utils.showToast( this, ex, "loadColumnList failed." );
}
if( pager_adapter.column_list.size() > 0 ){
llEmpty.setVisibility( View.GONE );
}
@ -1400,8 +1388,84 @@ public class ActMain extends AppCompatActivity
return rr;
}
void callFollow( final SavedAccount access_info, final TootAccount who
, final boolean bFollow, final RelationChangedCallback callback ){
void callFollow(
final SavedAccount access_info
, final TootAccount who
, final boolean bFollow
, boolean bConfirmed
, final RelationChangedCallback callback
){
if( access_info.isMe( who )){
Utils.showToast( this,false,R.string.it_is_you );
return;
}
if( ! bConfirmed ){
if( bFollow && who.locked ){
DlgConfirm.open( this
, getString( R.string.confirm_follow_request_who_from,who.display_name ,AcctColor.getNickname( access_info.acct) )
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_follow_locked;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_follow_locked = bv;
access_info.saveSetting();
reloadAccountSetting(access_info);
}
@Override public void onOK(){
//noinspection ConstantConditions
callFollow( access_info, who, bFollow, true, callback );
}
}
);
return;
}else if( bFollow ){
DlgConfirm.open( this
, getString( R.string.confirm_follow_who_from,who.display_name ,AcctColor.getNickname( access_info.acct) )
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_follow;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_follow = bv;
access_info.saveSetting();
reloadAccountSetting(access_info);
}
@Override public void onOK(){
//noinspection ConstantConditions
callFollow( access_info, who, bFollow, true, callback );
}
}
);
return;
}else{
DlgConfirm.open( this
, getString( R.string.confirm_unfollow_who_from, who.display_name ,AcctColor.getNickname( access_info.acct))
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_unfollow;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_unfollow = bv;
access_info.saveSetting();
reloadAccountSetting(access_info);
}
@Override public void onOK(){
//noinspection ConstantConditions
callFollow( access_info, who, bFollow, true, callback );
}
}
);
return;
}
}
new AsyncTask< Void, Void, TootApiResult >() {
@Override protected TootApiResult doInBackground( Void... params ){
@ -1488,11 +1552,18 @@ public class ActMain extends AppCompatActivity
if( result == null ){
// cancelled.
}else if( relation != null ){
// ローカル操作成功もしくはリモートフォロー成功
showColumnMatchAccount( access_info );
if( callback != null ) callback.onRelationChanged();
if( bFollow && relation.requested ){
// 鍵付きアカウントにフォローリクエストを申請した状態
Utils.showToast( ActMain.this, false, R.string.follow_requested );
}else if( !bFollow && relation.requested ){
Utils.showToast( ActMain.this, false, R.string.follow_request_cant_remove_by_sender );
}else{
// ローカル操作成功もしくはリモートフォロー成功
if( callback != null ) callback.onRelationChanged();
}
}else if( bFollow && who.locked && result.response != null && result.response.code() == 422 ){
Utils.showToast( ActMain.this, false, R.string.cant_follow_locked_user );
@ -1506,8 +1577,58 @@ public class ActMain extends AppCompatActivity
// acct で指定したユーザをリモートフォローする
void callRemoteFollow( final SavedAccount access_info
, final String acct, final boolean locked, final RelationChangedCallback callback
, final String acct, final boolean locked, boolean bConfirmed, final RelationChangedCallback callback
){
if( access_info.isMe( acct )){
Utils.showToast( this,false,R.string.it_is_you );
return;
}
if( ! bConfirmed ){
if( locked ){
DlgConfirm.open( this
, getString( R.string.confirm_follow_request_who_from, AcctColor.getNickname( acct ) , AcctColor.getNickname( access_info.acct ) )
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_follow_locked;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_follow_locked = bv;
access_info.saveSetting();
reloadAccountSetting(access_info);
}
@Override public void onOK(){
//noinspection ConstantConditions
callRemoteFollow( access_info, acct, locked, true, callback );
}
}
);
return;
}else{
DlgConfirm.open( this
, getString( R.string.confirm_follow_who_from, AcctColor.getNickname( acct ) , AcctColor.getNickname( access_info.acct ) )
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return access_info.confirm_follow;
}
@Override public void setConfirmEnabled( boolean bv ){
access_info.confirm_follow = bv;
access_info.saveSetting();
reloadAccountSetting();
}
@Override public void onOK(){
//noinspection ConstantConditions
callRemoteFollow( access_info, acct, locked, true, callback );
}
}
);
return;
}
}
new AsyncTask< Void, Void, TootApiResult >() {

View File

@ -1,10 +1,10 @@
package jp.juggler.subwaytooter;
import android.Manifest;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ClipData;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
@ -61,6 +61,7 @@ import jp.juggler.subwaytooter.api.TootApiResult;
import jp.juggler.subwaytooter.api.entity.TootAttachment;
import jp.juggler.subwaytooter.api.entity.TootMention;
import jp.juggler.subwaytooter.api.entity.TootStatus;
import jp.juggler.subwaytooter.dialog.DlgConfirm;
import jp.juggler.subwaytooter.table.AcctColor;
import jp.juggler.subwaytooter.table.AcctSet;
import jp.juggler.subwaytooter.table.SavedAccount;
@ -90,22 +91,22 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
static final String KEY_IN_REPLY_TO_TEXT = "in_reply_to_text";
static final String KEY_IN_REPLY_TO_IMAGE = "in_reply_to_image";
public static void open( Context context, long account_db_id, TootStatus reply_status ){
Intent intent = new Intent( context, ActPost.class );
public static void open( Activity activity, int request_code, long account_db_id, TootStatus reply_status ){
Intent intent = new Intent( activity, ActPost.class );
intent.putExtra( KEY_ACCOUNT_DB_ID, account_db_id );
if( reply_status != null ){
intent.putExtra( KEY_REPLY_STATUS, reply_status.json.toString() );
}
context.startActivity( intent );
activity.startActivityForResult( intent, request_code );
}
public static void open( Context context, long account_db_id, String initial_text ){
Intent intent = new Intent( context, ActPost.class );
public static void open( Activity activity, int request_code, long account_db_id, String initial_text ){
Intent intent = new Intent( activity, ActPost.class );
intent.putExtra( KEY_ACCOUNT_DB_ID, account_db_id );
if( initial_text != null ){
intent.putExtra( KEY_INITIAL_TEXT, initial_text );
}
context.startActivity( intent );
activity.startActivityForResult( intent, request_code );
}
@Override
@ -148,7 +149,7 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
break;
case R.id.btnPost:
performPost();
performPost( false );
break;
case R.id.btnRemoveReply:
@ -1205,12 +1206,13 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
///////////////////////////////////////////////////////////////////////////////////////
// post
private void performPost(){
private void performPost( boolean bConfirm ){
final String content = etContent.getText().toString().trim();
if( TextUtils.isEmpty( content ) ){
Utils.showToast( this, true, R.string.post_error_contents_empty );
return;
}
final String spoiler_text;
if( ! cbContentWarning.isChecked() ){
spoiler_text = null;
@ -1222,6 +1224,26 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
}
}
if( ! bConfirm ){
DlgConfirm.open( this
, getString( R.string.confirm_post_from, AcctColor.getNickname( account.acct ) )
, new DlgConfirm.Callback() {
@Override public boolean isConfirmEnabled(){
return account.confirm_post;
}
@Override public void setConfirmEnabled( boolean bv ){
account.confirm_post = bv;
account.saveSetting();
}
@Override public void onOK(){
performPost( true );
}
} );
return;
}
final StringBuilder sb = new StringBuilder();
sb.append( "status=" );
@ -1305,6 +1327,7 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
}else if( status != null ){
// 連投してIdempotency が同じだった場合もエラーにはならずここを通る
ActMain.update_at_resume = true;
setResult( RESULT_OK );
ActPost.this.finish();
}else{
Utils.showToast( ActPost.this, true, result.error );

View File

@ -17,6 +17,13 @@ import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;
import org.apache.commons.io.IOUtils;
import org.json.JSONArray;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
@ -30,6 +37,7 @@ import jp.juggler.subwaytooter.table.MediaShown;
import jp.juggler.subwaytooter.table.NotificationTracking;
import jp.juggler.subwaytooter.table.SavedAccount;
import jp.juggler.subwaytooter.table.UserRelation;
import jp.juggler.subwaytooter.util.Utils;
import okhttp3.CipherSuite;
import okhttp3.ConnectionSpec;
import okhttp3.OkHttpClient;
@ -42,7 +50,7 @@ public class App1 extends Application {
static final String DB_NAME = "app_db";
static final int DB_VERSION = 9;
static final int DB_VERSION = 10;
// 2017/4/25 v10 1=>2 SavedAccount に通知設定を追加
// 2017/4/25 v10 1=>2 NotificationTracking テーブルを追加
// 2017/4/29 v20 2=>5 MediaShown,ContentWarningのインデクスが間違っていたので貼り直す
@ -50,6 +58,7 @@ public class App1 extends Application {
// 2017/5/01 v26 6=>7 AcctSetテーブルの追加
// 2017/5/02 v32 7=>8 (この変更は取り消された)
// 2017/5/02 v32 8=>9 AcctColor テーブルの追加
// 2017/5/04 v33 9=>10 SavedAccountに項目追加
static DBOpenHelper db_open_helper;
@ -73,6 +82,7 @@ public class App1 extends Application {
}
}
private static class DBOpenHelper extends SQLiteOpenHelper {
private DBOpenHelper(Context context) {
@ -238,4 +248,38 @@ public class App1 extends Application {
public void onTerminate(){
super.onTerminate();
}
public static void saveColumnList( Context context, String fileName, JSONArray array ){
try{
OutputStream os = context.openFileOutput( fileName, MODE_PRIVATE );
try{
os.write( Utils.encodeUTF8( array.toString() ) );
}finally{
os.close();
}
}catch( Throwable ex ){
ex.printStackTrace();
Utils.showToast( context, ex, "saveColumnList failed." );
}
}
public static JSONArray loadColumnList( Context context, String fileName ){
try{
InputStream is = context.openFileInput( fileName );
try{
ByteArrayOutputStream bao = new ByteArrayOutputStream( is.available() );
IOUtils.copy( is,bao);
return new JSONArray( Utils.decodeUTF8( bao.toByteArray() ) );
}finally{
is.close();
}
}catch( FileNotFoundException ignored ){
}catch( Throwable ex ){
ex.printStackTrace();
Utils.showToast( context, ex, "loadColumnList failed." );
}
return null;
}
}

View File

@ -312,7 +312,7 @@ class Column {
case TYPE_PROFILE:
return activity.getString( R.string.statuses_of
return activity.getString( R.string.profile_of
, who_account != null ? AcctColor.getNickname( access_info.getFullAcct( who_account ) ) : Long.toString( profile_id )
);

View File

@ -350,6 +350,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
Utils.hideKeyboard( activity, etSearch );
column.search_query = etSearch.getText().toString().trim();
column.search_resolve = cbResolve.isChecked();
activity.saveColumnList();
column.startLoading();
break;
@ -379,12 +380,6 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
listView.setSelectionFromTop( 0, 0 );
}
}
// final RelationshipMap.UpdateCallback callback_relation = new RelationshipMap.UpdateCallback() {
// @Override public void onRelationShipUpdate(){
// onVisualColumn();
// }
// };
private int acct_pad_lr;
@ -411,7 +406,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
showColumnCloseButton();
ivColumnIcon.setImageResource( Styler.getAttributeResourceId( activity, Column.getIconAttrId(column.type) ) );
ivColumnIcon.setImageResource( Styler.getAttributeResourceId( activity, Column.getIconAttrId( column.type ) ) );
}
@ -537,6 +532,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
final View btnMore;
final TextView tvNote;
final ImageButton btnFollow;
final ImageView ivFollowedBy;
TootAccount who;
SavedAccount access_info;
@ -554,6 +550,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
this.tvNote = (TextView) viewRoot.findViewById( R.id.tvNote );
this.btnMore = viewRoot.findViewById( R.id.btnMore );
this.btnFollow = (ImageButton) viewRoot.findViewById( R.id.btnFollow );
this.ivFollowedBy = (ImageView) viewRoot.findViewById( R.id.ivFollowedBy );
ivBackground.setOnClickListener( this );
btnFollowing.setOnClickListener( this );
btnFollowers.setOnClickListener( this );
@ -597,7 +594,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
btnFollowers.setText( activity.getString( R.string.followers ) + "\n" + who.followers_count );
UserRelation relation = UserRelation.load( access_info.db_id, who.id );
Styler.setFollowIcon( activity, btnFollow, relation );
Styler.setFollowIcon( activity, btnFollow,ivFollowedBy, relation ,column.type);
}
}
@ -629,13 +626,13 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
case R.id.btnMore:
if( who != null ){
new DlgContextMenu( activity, access_info, who, null ).show();
new DlgContextMenu( activity, access_info, who, null, column.type ).show();
}
break;
case R.id.btnFollow:
if( who != null ){
new DlgContextMenu( activity, access_info, who, null ).show();
new DlgContextMenu( activity, access_info, who, null, column.type ).show();
}
break;
@ -706,6 +703,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
final TextView tvFollowerName;
final TextView tvFollowerAcct;
final ImageButton btnFollow;
final ImageView ivFollowedBy;
final View llStatus;
final NetworkImageView ivThumbnail;
@ -757,7 +755,8 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
this.tvFollowerName = (TextView) view.findViewById( R.id.tvFollowerName );
this.tvFollowerAcct = (TextView) view.findViewById( R.id.tvFollowerAcct );
this.btnFollow = (ImageButton) view.findViewById( R.id.btnFollow );
this.ivFollowedBy = (ImageView) view.findViewById( R.id.ivFollowedBy );
this.llStatus = view.findViewById( R.id.llStatus );
this.ivThumbnail = (NetworkImageView) view.findViewById( R.id.ivThumbnail );
@ -920,7 +919,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
setAcct( tvFollowerAcct, access_info.getFullAcct( who ), R.attr.colorAcctSmall );
UserRelation relation = UserRelation.load( access_info.db_id, who.id );
Styler.setFollowIcon( activity, btnFollow, relation );
Styler.setFollowIcon( activity, btnFollow, ivFollowedBy,relation ,column.type);
}
private void showStatus( ActMain activity, TootStatus status ){
@ -1069,7 +1068,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
activity.performOpenUser( access_info, account_follow );
break;
case R.id.btnFollow:
new DlgContextMenu( activity, access_info, account_follow, null ).show();
new DlgContextMenu( activity, access_info, account_follow, null, column.type ).show();
break;
case R.id.btnSearchTag:
@ -1090,7 +1089,7 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
@Override public boolean onLongClick( View v ){
switch( v.getId() ){
case R.id.ivThumbnail:
new DlgContextMenu( activity, access_info, account_thumbnail, null ).show();
new DlgContextMenu( activity, access_info, account_thumbnail, null, column.type ).show();
break;
}
return false;
@ -1148,6 +1147,9 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
final Button btnBoost;
final Button btnFavourite;
final ImageButton btnMore;
final ImageButton btnFollow2;
final ImageView ivFollowedBy2;
final View llFollow2;
ButtonsForStatus( View viewRoot ){
btnConversation = (ImageButton) viewRoot.findViewById( R.id.btnConversation );
@ -1155,15 +1157,21 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
btnBoost = (Button) viewRoot.findViewById( R.id.btnBoost );
btnFavourite = (Button) viewRoot.findViewById( R.id.btnFavourite );
btnMore = (ImageButton) viewRoot.findViewById( R.id.btnMore );
btnFollow2 = (ImageButton) viewRoot.findViewById( R.id.btnFollow2 );
ivFollowedBy2 = (ImageView) viewRoot.findViewById( R.id.ivFollowedBy2 );
llFollow2 = viewRoot.findViewById( R.id.llFollow2 );
btnConversation.setOnClickListener( this );
btnReply.setOnClickListener( this );
btnBoost.setOnClickListener( this );
btnFavourite.setOnClickListener( this );
btnMore.setOnClickListener( this );
btnFollow2.setOnClickListener( this );
}
TootStatus status;
UserRelation relation;
void bind( TootStatus status ){
this.status = status;
@ -1189,6 +1197,16 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
setButton( btnFavourite, true, color, R.attr.btn_favourite, Long.toString( status.favourites_count ) );
}
if( ! activity.pref.getBoolean( Pref.KEY_SHOW_FOLLOW_BUTTON_IN_BUTTON_BAR, false ) ){
llFollow2.setVisibility( View.GONE );
this.relation = null;
}else{
llFollow2.setVisibility( View.VISIBLE );
this.relation = UserRelation.load( access_info.db_id, status.account.id );
Styler.setFollowIcon( activity, btnFollow2, ivFollowedBy2, relation ,column.type);
}
}
private void setButton( Button b, boolean enabled, int color, int icon_attr, String text ){
@ -1230,7 +1248,17 @@ class ColumnViewHolder implements View.OnClickListener, Column.VisualCallback, S
}
break;
case R.id.btnMore:
new DlgContextMenu( activity, access_info, status.account, status ).show();
new DlgContextMenu( activity, access_info, status.account, status, column.type ).show();
break;
case R.id.btnFollow2:
//noinspection StatementWithEmptyBody
if( relation.blocking || relation.muting ){
// 何もしない
}else if( relation.following || relation.requested ){
activity.callFollow( access_info, status.account, false,false, activity.unfollow_complete_callback );
}else{
activity.callFollow( access_info, status.account, true, false,activity.follow_complete_callback );
}
break;
}
}

View File

@ -22,6 +22,7 @@ import jp.juggler.subwaytooter.dialog.AccountPicker;
import jp.juggler.subwaytooter.table.SavedAccount;
import jp.juggler.subwaytooter.table.UserRelation;
import jp.juggler.subwaytooter.util.LogCategory;
import jp.juggler.subwaytooter.util.Utils;
class DlgContextMenu implements View.OnClickListener {
@ -43,6 +44,7 @@ class DlgContextMenu implements View.OnClickListener {
, @NonNull SavedAccount access_info
, @NonNull TootAccount who
, @Nullable TootStatus status
,int column_type
){
this.activity = activity;
this.access_info = access_info;
@ -128,10 +130,19 @@ class DlgContextMenu implements View.OnClickListener {
btnMute.setOnClickListener( this );
btnBlock.setOnClickListener( this );
// 被フォロー状態
ImageView ivFollowedBy = (ImageView) viewRoot.findViewById( R.id. ivFollowedBy);
if( !relation.followed_by){
ivFollowedBy.setVisibility( View.GONE );
}else{
ivFollowedBy.setVisibility( View.VISIBLE );
ivFollowedBy.setImageResource( Styler.getAttributeResourceId( activity,R.attr.ic_followed_by ));
}
// follow button
int icon_attr = ( relation.following ? R.attr.ic_account_remove : R.attr.ic_account_add );
int icon_attr = ( relation.following ? R.attr.ic_follow_cross : R.attr.ic_follow_plus );
int color_attr = ( relation.requested ? R.attr.colorRegexFilterError
: relation.followed_by ? R.attr.colorImageButtonAccent
: relation.following ? R.attr.colorImageButtonAccent
: R.attr.colorImageButton );
int color = Styler.getAttributeColor( activity, color_attr );
Drawable d = Styler.getAttributeDrawable( activity, icon_attr ).mutate();
@ -165,7 +176,7 @@ class DlgContextMenu implements View.OnClickListener {
btnAccountWebPage.setOnClickListener( this );
if( relation.requested ){
if( column_type == Column.TYPE_FOLLOW_REQUESTS ){
btnFollowRequestOK.setOnClickListener( this );
btnFollowRequestNG.setOnClickListener( this );
}else{
@ -271,10 +282,10 @@ class DlgContextMenu implements View.OnClickListener {
break;
case R.id.btnFollow:
if( relation.following ){
activity.callFollow( access_info, who, false, activity.unfollow_complete_callback );
if( relation.following || relation.requested ){
activity.callFollow( access_info, who, false, false,activity.unfollow_complete_callback );
}else{
activity.callFollow( access_info, who, true, activity.follow_complete_callback );
activity.callFollow( access_info, who, true, false,activity.follow_complete_callback );
}
break;
@ -334,7 +345,7 @@ class DlgContextMenu implements View.OnClickListener {
final String who_acct = access_info.getFullAcct( who );
AccountPicker.pick( activity, false, false, account_list_non_pseudo, new AccountPicker.AccountPickerCallback() {
@Override public void onAccountPicked( SavedAccount ai ){
activity.callRemoteFollow( ai, who_acct, who.locked, activity.follow_complete_callback );
activity.callRemoteFollow( ai, who_acct, who.locked, false,activity.follow_complete_callback );
}
} );
break;

View File

@ -23,6 +23,7 @@ class Pref {
static final String KEY_NOTIFICATION_VIBRATION = "notification_vibration";
static final String KEY_NOTIFICATION_LED = "notification_led";
static final String KEY_EXIT_APP_WHEN_CLOSE_PROTECTED_COLUMN = "ExitAppWhenCloseProtectedColumn";
public static final String KEY_RESIZE_IMAGE = "resize_image";
static final String KEY_RESIZE_IMAGE = "resize_image";
static final String KEY_SHOW_FOLLOW_BUTTON_IN_BUTTON_BAR = "ShowFollowButtonInButtonBar";
}

View File

@ -7,7 +7,9 @@ import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import java.util.Locale;
@ -59,27 +61,63 @@ public class Styler {
return res_id;
}
static void setFollowIcon( @NonNull Context context ,@NonNull ImageButton ib, UserRelation relation ){
int icon_attr;
int color_attr;
if( relation.blocking ){
color_attr = ( relation.followed_by ? R.attr.colorImageButtonAccent : R.attr.colorImageButton);
icon_attr = R.attr.ic_block;
}else if( relation.muting ){
color_attr = ( relation.followed_by ? R.attr.colorImageButtonAccent : R.attr.colorImageButton);
icon_attr = R.attr.ic_mute;
}else if( relation.requested ){
color_attr = R.attr.colorRegexFilterError;
icon_attr = (relation.following ? R.attr.ic_account_remove: R.attr.ic_account_add );
static void setFollowIcon(
@NonNull Context context
, @NonNull ImageButton ib
, @NonNull ImageView iv
, @NonNull UserRelation relation
,int column_type
){
// 被フォロー状態
if( !relation.followed_by ){
iv.setVisibility( View.GONE );
}else{
color_attr = ( relation.followed_by ? R.attr.colorImageButtonAccent : R.attr.colorImageButton );
icon_attr = ( relation.following ? R.attr.ic_account_remove : R.attr.ic_account_add );
iv.setVisibility( View.VISIBLE );
iv.setImageResource( Styler.getAttributeResourceId( context,R.attr.ic_followed_by ));
// 被フォローリクエスト状態の時に followed_by 真と偽の両方がありえるようなので
// Relationshipだけを見ても被フォローリクエスト状態は分からないっぽい
// 仕方ないので馬鹿正直に followed_byが真ならバッジをつけるしかできない
// if( column_type == Column.TYPE_FOLLOW_REQUESTS ){
// // フォローリクエストされてる状態でも followed_by はtrueになる
// int color = Styler.getAttributeColor( context,R.attr.colorRegexFilterError );
// Drawable d = Styler.getAttributeDrawable( context,R.attr.ic_followed_by ).mutate();
// d.setColorFilter( color, PorterDuff.Mode.SRC_ATOP );
// iv.setImageDrawable( d );
// }
}
// follow button
int color_attr ;
int icon_attr;
if( relation.blocking ){
icon_attr = R.attr.ic_block;
color_attr = R.attr.colorImageButton;
}else if( relation.muting ){
icon_attr = R.attr.ic_mute;
color_attr = R.attr.colorImageButton;
}else if( relation.following ){
icon_attr = R.attr.ic_follow_cross;
color_attr = R.attr.colorImageButtonAccent;
}else if( relation.requested ){
icon_attr =R.attr.ic_follow_plus;
color_attr = R.attr.colorRegexFilterError;
}else{
icon_attr =R.attr.ic_follow_plus;
color_attr = R.attr.colorImageButton;
}
int color = Styler.getAttributeColor( context,color_attr );
Drawable d = Styler.getAttributeDrawable( context,icon_attr ).mutate();
d.setColorFilter( color, PorterDuff.Mode.SRC_ATOP );
ib.setImageDrawable( d );
}
}

View File

@ -0,0 +1,54 @@
package jp.juggler.subwaytooter.dialog;
import android.app.Activity;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import jp.juggler.subwaytooter.R;
public class DlgConfirm {
public interface Callback {
boolean isConfirmEnabled();
void setConfirmEnabled( boolean bv );
void onOK();
}
public static void open(
final Activity activity
, String message
, final Callback callback
){
if( ! callback.isConfirmEnabled() ){
callback.onOK();
return;
}
final View view = activity.getLayoutInflater().inflate( R.layout.dlg_confirm, null, false );
final TextView tvMessage = (TextView) view.findViewById( R.id.tvMessage );
final CheckBox cbSkipNext = (CheckBox) view.findViewById( R.id.cbSkipNext );
tvMessage.setText( message );
new AlertDialog.Builder( activity )
.setView( view )
.setCancelable( true )
.setNegativeButton( R.string.cancel, null )
.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() {
@Override public void onClick( DialogInterface dialog, int which ){
if( cbSkipNext.isChecked() ){
callback.setConfirmEnabled( false );
}
callback.onOK();
}
} )
.show();
}
}

View File

@ -34,10 +34,16 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
private static final String COL_VISIBILITY = "visibility";
private static final String COL_CONFIRM_BOOST = "confirm_boost";
private static final String COL_DONT_HIDE_NSFW = "dont_hide_nsfw";
// スキーマ2から
private static final String COL_NOTIFICATION_MENTION = "notification_mention";
private static final String COL_NOTIFICATION_BOOST = "notification_boost";
private static final String COL_NOTIFICATION_FAVOURITE = "notification_favourite";
private static final String COL_NOTIFICATION_FOLLOW = "notification_follow";
// スキーマ10から
private static final String COL_CONFIRM_FOLLOW = "confirm_follow";
private static final String COL_CONFIRM_FOLLOW_LOCKED = "confirm_follow_locked";
private static final String COL_CONFIRM_UNFOLLOW = "confirm_unfollow";
private static final String COL_CONFIRM_POST = "confirm_post";
public static final long INVALID_ID = - 1L;
@ -54,6 +60,11 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
public boolean notification_favourite;
public boolean notification_follow;
public boolean confirm_follow;
public boolean confirm_follow_locked;
public boolean confirm_unfollow;
public boolean confirm_post;
public static void onDBCreate( SQLiteDatabase db ){
db.execSQL(
"create table if not exists " + table
@ -65,11 +76,18 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
+ ",visibility text"
+ ",confirm_boost integer default 1"
+ ",dont_hide_nsfw integer default 0"
// 以下はDBスキーマ2で追加
+ ",notification_mention integer default 1"
+ ",notification_boost integer default 1"
+ ",notification_favourite integer default 1"
+ ",notification_follow integer default 1"
// 以下はDBスキーマ10で更新
+ "," + COL_CONFIRM_FOLLOW + " integer default 1"
+ "," + COL_CONFIRM_FOLLOW_LOCKED + " integer default 1"
+ "," + COL_CONFIRM_UNFOLLOW + " integer default 1"
+ "," + COL_CONFIRM_POST + " integer default 1"
+ ")"
);
db.execSQL( "create index if not exists " + table + "_user on " + table + "(u)" );
@ -99,6 +117,28 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
ex.printStackTrace();
}
}
if( oldVersion < 10 && newVersion >= 10 ){
try{
db.execSQL( "alter table " + table + " add column " + COL_CONFIRM_FOLLOW + " integer default 1" );
}catch( Throwable ex ){
ex.printStackTrace();
}
try{
db.execSQL( "alter table " + table + " add column " + COL_CONFIRM_FOLLOW_LOCKED + " integer default 1" );
}catch( Throwable ex ){
ex.printStackTrace();
}
try{
db.execSQL( "alter table " + table + " add column " + COL_CONFIRM_UNFOLLOW + " integer default 1" );
}catch( Throwable ex ){
ex.printStackTrace();
}
try{
db.execSQL( "alter table " + table + " add column " + COL_CONFIRM_POST + " integer default 1" );
}catch( Throwable ex ){
ex.printStackTrace();
}
}
}
private SavedAccount(){
@ -124,6 +164,11 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
dst.notification_favourite = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_NOTIFICATION_FAVOURITE ) ) );
dst.notification_follow = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_NOTIFICATION_FOLLOW ) ) );
dst.confirm_follow = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_CONFIRM_FOLLOW ) ) );
dst.confirm_follow_locked = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_CONFIRM_FOLLOW_LOCKED ) ) );
dst.confirm_unfollow = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_CONFIRM_UNFOLLOW ) ) );
dst.confirm_post = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_CONFIRM_POST ) ) );
dst.token_info = new JSONObject( cursor.getString( cursor.getColumnIndex( COL_TOKEN ) ) );
}
return dst;
@ -177,6 +222,12 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
cv.put( COL_NOTIFICATION_BOOST, notification_boost ? 1 : 0 );
cv.put( COL_NOTIFICATION_FAVOURITE, notification_favourite ? 1 : 0 );
cv.put( COL_NOTIFICATION_FOLLOW, notification_follow ? 1 : 0 );
cv.put( COL_CONFIRM_FOLLOW, confirm_follow ? 1 : 0 );
cv.put( COL_CONFIRM_FOLLOW_LOCKED, confirm_follow_locked ? 1 : 0 );
cv.put( COL_CONFIRM_UNFOLLOW, confirm_unfollow ? 1 : 0 );
cv.put( COL_CONFIRM_POST, confirm_post ? 1 : 0 );
App1.getDB().update( table, cv, COL_ID + "=?", new String[]{ Long.toString( db_id ) } );
}
@ -266,8 +317,8 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
}
public String supplyBaseUrl( String url ){
if( TextUtils.isEmpty(url)) return url;
if( url.charAt( 0 )=='/') return "https://"+host+url;
if( TextUtils.isEmpty( url ) ) return url;
if( url.charAt( 0 ) == '/' ) return "https://" + host + url;
return url;
}
@ -279,7 +330,7 @@ public class SavedAccount extends TootAccount implements LinkClickContext {
@Override public AcctColor findAcctColor( String url ){
Matcher m = reAcctUrl.matcher( url );
if( m.find() ) return AcctColor.load( m.group(2)+"@"+m.group(1) );
if( m.find() ) return AcctColor.load( m.group( 2 ) + "@" + m.group( 1 ) );
return null;
}
}

View File

@ -3,6 +3,8 @@ package jp.juggler.subwaytooter.table;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.annotation.NonNull;
import android.support.v4.util.LruCache;
import java.util.HashSet;
@ -29,136 +31,149 @@ public class UserRelation {
db.execSQL(
"create table if not exists " + table
+ "(_id INTEGER PRIMARY KEY"
+ ","+COL_TIME_SAVE+" integer not null"
+ ","+COL_DB_ID+" integer not null"
+ ","+COL_WHO_ID+" integer not null"
+ ","+COL_FOLLOWING+" integer not null"
+ ","+COL_FOLLOWED_BY+" integer not null"
+ ","+COL_BLOCKING+" integer not null"
+ ","+COL_MUTING+" integer not null"
+ ","+COL_REQUESTED+" integer not null"
+ "," + COL_TIME_SAVE + " integer not null"
+ "," + COL_DB_ID + " integer not null"
+ "," + COL_WHO_ID + " integer not null"
+ "," + COL_FOLLOWING + " integer not null"
+ "," + COL_FOLLOWED_BY + " integer not null"
+ "," + COL_BLOCKING + " integer not null"
+ "," + COL_MUTING + " integer not null"
+ "," + COL_REQUESTED + " integer not null"
+ ")"
);
db.execSQL(
"create unique index if not exists " + table + "_id on " + table + "("+COL_DB_ID+","+COL_WHO_ID+")"
"create unique index if not exists " + table + "_id on " + table + "(" + COL_DB_ID + "," + COL_WHO_ID + ")"
);
db.execSQL(
"create index if not exists " + table + "_time on " + table + "("+COL_TIME_SAVE+")"
"create index if not exists " + table + "_time on " + table + "(" + COL_TIME_SAVE + ")"
);
}
public static void onDBUpgrade( SQLiteDatabase db, int oldVersion, int newVersion ){
if(oldVersion < 6 && newVersion >= 6){
if( oldVersion < 6 && newVersion >= 6 ){
onDBCreate( db );
}
}
public static void deleteOld( long now){
public static void deleteOld( long now ){
try{
// 古いデータを掃除する
long expire = now - 86400000L * 365;
App1.getDB().delete( table,COL_TIME_SAVE+"<?",new String[]{Long.toString(expire)});
App1.getDB().delete( table, COL_TIME_SAVE + "<?", new String[]{ Long.toString( expire ) } );
}catch( Throwable ex ){
log.e( ex, "deleteOld failed." );
}
}
public static void save1( long now, long db_id, TootRelationShip src ){
public static void save1( long now, long db_id, TootRelationShip src ){
try{
ContentValues cv = new ContentValues();
cv.put( COL_TIME_SAVE, now );
cv.put( COL_DB_ID, db_id );
cv.put( COL_WHO_ID, src.id );
cv.put( COL_FOLLOWING, src.following ? 1: 0 );
cv.put( COL_FOLLOWED_BY, src.followed_by ? 1: 0 );
cv.put( COL_BLOCKING, src.blocking ? 1: 0 );
cv.put( COL_MUTING, src.muting ? 1: 0 );
cv.put( COL_REQUESTED, src.requested ? 1: 0 );
cv.put( COL_FOLLOWING, src.following ? 1 : 0 );
cv.put( COL_FOLLOWED_BY, src.followed_by ? 1 : 0 );
cv.put( COL_BLOCKING, src.blocking ? 1 : 0 );
cv.put( COL_MUTING, src.muting ? 1 : 0 );
cv.put( COL_REQUESTED, src.requested ? 1 : 0 );
App1.getDB().replace( table, null, cv );
String key = String.format( "%s:%s", db_id, src.id );
mMemoryCache.remove( key );
}catch( Throwable ex ){
log.e( ex, "save failed." );
}
}
public static void saveList( long now, long db_id, TootRelationShip.List src_list ){
ContentValues cv = new ContentValues();
cv.put( COL_TIME_SAVE, now );
cv.put( COL_DB_ID, db_id );
boolean bOK = false;
SQLiteDatabase db = App1.getDB();
db.execSQL( "BEGIN TRANSACTION" );
try{
ContentValues cv = new ContentValues();
cv.put( COL_TIME_SAVE, now );
cv.put( COL_DB_ID, db_id );
boolean bOK = false;
SQLiteDatabase db = App1.getDB();
db.execSQL( "BEGIN TRANSACTION" );
try{
for( TootRelationShip src : src_list ){
cv.put( COL_WHO_ID, src.id );
cv.put( COL_FOLLOWING, src.following ? 1 : 0 );
cv.put( COL_FOLLOWED_BY, src.followed_by ? 1 : 0 );
cv.put( COL_BLOCKING, src.blocking ? 1 : 0 );
cv.put( COL_MUTING, src.muting ? 1 : 0 );
cv.put( COL_REQUESTED, src.requested ? 1 : 0 );
db.replace( table, null, cv );
}
bOK = true;
}catch( Throwable ex ){
ex.printStackTrace();
log.e( ex, "saveList failed." );
}
if( bOK ){
db.execSQL( "COMMIT TRANSACTION" );
}else{
db.execSQL( "ROLLBACK TRANSACTION" );
for( TootRelationShip src : src_list ){
cv.put( COL_WHO_ID, src.id );
cv.put( COL_FOLLOWING, src.following ? 1 : 0 );
cv.put( COL_FOLLOWED_BY, src.followed_by ? 1 : 0 );
cv.put( COL_BLOCKING, src.blocking ? 1 : 0 );
cv.put( COL_MUTING, src.muting ? 1 : 0 );
cv.put( COL_REQUESTED, src.requested ? 1 : 0 );
db.replace( table, null, cv );
}
bOK = true;
}catch( Throwable ex ){
ex.printStackTrace();
log.e( ex, "saveList failed." );
}
}
static final String load_where = COL_DB_ID+"=? and "+COL_WHO_ID+"=?";
private static final ThreadLocal<String[]> load_where_arg = new ThreadLocal<String[]>() {
@Override protected String[] initialValue() {
return new String[2];
if( bOK ){
db.execSQL( "COMMIT TRANSACTION" );
for( TootRelationShip src : src_list ){
String key = String.format( "%s:%s", db_id, src.id );
mMemoryCache.remove( key );
}
}else{
db.execSQL( "ROLLBACK TRANSACTION" );
}
};
}
public boolean following;
public boolean followed_by;
public boolean blocking;
public boolean muting;
public boolean requested;
private UserRelation(){
}
public static UserRelation load( long db_id, long who_id ){
private static final LruCache< String, UserRelation > mMemoryCache = new LruCache<>( 2048 );
static final String load_where = COL_DB_ID + "=? and " + COL_WHO_ID + "=?";
private static final ThreadLocal< String[] > load_where_arg = new ThreadLocal< String[] >() {
@Override protected String[] initialValue(){
return new String[ 2 ];
}
};
@NonNull public static UserRelation load( long db_id, long who_id ){
String key = String.format( "%s:%s", db_id, who_id );
UserRelation dst = mMemoryCache.get( key );
if( dst != null ) return dst;
try{
String[] where_arg = load_where_arg.get();
where_arg[0] = Long.toString( db_id );
where_arg[1] = Long.toString( who_id );
Cursor cursor = App1.getDB().query( table,null,load_where,where_arg,null,null,null );
if( cursor != null){
where_arg[ 0 ] = Long.toString( db_id );
where_arg[ 1 ] = Long.toString( who_id );
Cursor cursor = App1.getDB().query( table, null, load_where, where_arg, null, null, null );
if( cursor != null ){
try{
if( cursor.moveToNext() ){
UserRelation dst = new UserRelation();
dst.following = (0!=cursor.getInt( cursor.getColumnIndex( COL_FOLLOWING ) ));
dst.followed_by = (0!=cursor.getInt( cursor.getColumnIndex( COL_FOLLOWED_BY ) ));
dst.blocking = (0!=cursor.getInt( cursor.getColumnIndex( COL_BLOCKING ) ));
dst.muting = (0!=cursor.getInt( cursor.getColumnIndex( COL_MUTING ) ));
dst.requested = (0!=cursor.getInt( cursor.getColumnIndex( COL_REQUESTED ) ));
dst = new UserRelation();
dst.following = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_FOLLOWING ) ) );
dst.followed_by = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_FOLLOWED_BY ) ) );
dst.blocking = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_BLOCKING ) ) );
dst.muting = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_MUTING ) ) );
dst.requested = ( 0 != cursor.getInt( cursor.getColumnIndex( COL_REQUESTED ) ) );
return dst;
}
}finally{
cursor.close();
}
}
}catch(Throwable ex){
ex.printStackTrace( );
log.e(ex,"load failed.");
}catch( Throwable ex ){
ex.printStackTrace();
log.e( ex, "load failed." );
}
return new UserRelation();
dst = new UserRelation();
mMemoryCache.put( key, dst );
return dst;
}
// public static Cursor createCursor(){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -137,29 +137,6 @@
</LinearLayout>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/confirm_before_boost"
/>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swConfirmBeforeBoost"
style="@style/setting_wrap"
/>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<TextView
@ -181,6 +158,62 @@
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/confirmation"
/>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbConfirmFollow"
style="@style/setting_horizontal_stretch"
android:text="@string/follow"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbConfirmFollowLockedUser"
style="@style/setting_horizontal_stretch"
android:text="@string/follow_locked_user"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbConfirmUnfollow"
style="@style/setting_horizontal_stretch"
android:text="@string/unfollow"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbConfirmBoost"
style="@style/setting_wrap"
android:text="@string/boost"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbConfirmToot"
style="@style/setting_wrap"
android:text="@string/act_post"
/>
</LinearLayout>
<View style="@style/setting_divider"/>

View File

@ -1,533 +1,552 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fillViewport="true"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:scrollbarStyle="outsideOverlay"
>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fillViewport="true"
android:paddingBottom="128dp"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:scrollbarStyle="outsideOverlay"
>
<View style="@style/setting_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
style="@style/setting_row_label"
android:text="@string/dont_confirm_before_close_column"
/>
<View style="@style/setting_divider"/>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swDontConfirmBeforeCloseColumn"
style="@style/setting_horizontal_stretch"
android:gravity="center"
<TextView
style="@style/setting_row_label"
android:text="@string/dont_confirm_before_close_column"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<LinearLayout style="@style/setting_row_form">
<TextView
style="@style/setting_row_label"
android:text="@string/back_button_action"
/>
<Switch
android:id="@+id/swDontConfirmBeforeCloseColumn"
style="@style/setting_horizontal_stretch"
android:gravity="center"
/>
<LinearLayout style="@style/setting_row_form">
</LinearLayout>
<Spinner
android:id="@+id/spBackButtonAction"
style="@style/setting_horizontal_stretch"
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/back_button_action"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Spinner
android:id="@+id/spBackButtonAction"
style="@style/setting_horizontal_stretch"
/>
<TextView
style="@style/setting_row_label"
android:text="@string/exit_app_when_close_protected_column"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Switch
android:id="@+id/swExitAppWhenCloseProtectedColumn"
style="@style/setting_horizontal_stretch"
<TextView
style="@style/setting_row_label"
android:text="@string/exit_app_when_close_protected_column"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swExitAppWhenCloseProtectedColumn"
style="@style/setting_horizontal_stretch"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/prior_local_url_when_open_attachment"
/>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swPriorLocalURL"
style="@style/setting_horizontal_stretch"
<TextView
style="@style/setting_row_label"
android:text="@string/prior_local_url_when_open_attachment"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Switch
android:id="@+id/swPriorLocalURL"
style="@style/setting_horizontal_stretch"
/>
<TextView
style="@style/setting_row_label"
android:text="@string/disable_fast_scroller"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Switch
android:id="@+id/swDisableFastScroller"
style="@style/setting_horizontal_stretch"
<TextView
style="@style/setting_row_label"
android:text="@string/disable_fast_scroller"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Switch
android:id="@+id/swDisableFastScroller"
style="@style/setting_horizontal_stretch"
/>
<TextView
style="@style/setting_row_label"
android:text="@string/ui_theme"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Spinner
android:id="@+id/spUITheme"
style="@style/setting_horizontal_stretch"
<TextView
style="@style/setting_row_label"
android:text="@string/ui_theme"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<Spinner
android:id="@+id/spUITheme"
style="@style/setting_horizontal_stretch"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/simple_list"
/>
<LinearLayout style="@style/setting_row_form">
<Switch
android:id="@+id/swSimpleList"
style="@style/setting_horizontal_stretch"
android:gravity="center"
<TextView
style="@style/setting_row_label"
android:text="@string/simple_list"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/notification_option"
/>
<Switch
android:id="@+id/swSimpleList"
style="@style/setting_horizontal_stretch"
android:gravity="center"
/>
<LinearLayout style="@style/setting_row_form">
</LinearLayout>
<CheckBox
android:id="@+id/cbNotificationSound"
style="@style/setting_horizontal_stretch"
android:text="@string/sound"
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/notification_option"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbNotificationVibration"
style="@style/setting_horizontal_stretch"
android:text="@string/vibration"
<CheckBox
android:id="@+id/cbNotificationSound"
style="@style/setting_horizontal_stretch"
android:text="@string/sound"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbNotificationVibration"
style="@style/setting_horizontal_stretch"
android:text="@string/vibration"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbNotificationLED"
style="@style/setting_horizontal_stretch"
android:text="@string/led"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/resize_image"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<LinearLayout style="@style/setting_row_form">
<CheckBox
android:id="@+id/cbNotificationLED"
style="@style/setting_horizontal_stretch"
android:text="@string/led"
<Spinner
android:id="@+id/spResizeImage"
style="@style/setting_horizontal_stretch"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<TextView
style="@style/setting_row_label"
android:text="@string/show_follow_button_in_button_bar"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<View style="@style/setting_divider"/>
<Switch
android:id="@+id/swShowFollowButtonInButtonBar"
style="@style/setting_horizontal_stretch"
android:gravity="center"
/>
<TextView
style="@style/setting_row_label"
android:text="@string/resize_image"
/>
</LinearLayout>
<LinearLayout style="@style/setting_row_form">
<Spinner
android:id="@+id/spResizeImage"
style="@style/setting_horizontal_stretch"
/>
</LinearLayout>
<View style="@style/setting_divider"/>
<!--<TextView-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/actions"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Button-->
<!--android:id="@+id/btnAccessToken"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--android:text="@string/update_access_token"-->
<!--/>-->
<!--android:id="@+id/btnAccessToken"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--android:text="@string/update_access_token"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--</LinearLayout>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Button-->
<!--android:id="@+id/btnAccountRemove"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--android:text="@string/account_remove"-->
<!--/>-->
<!--android:id="@+id/btnAccountRemove"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--android:text="@string/account_remove"-->
<!--/>-->
<!--</LinearLayout>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/default_status_visibility"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Button-->
<!--android:id="@+id/btnVisibility"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--/>-->
<!--android:id="@+id/btnVisibility"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--/>-->
<!--</LinearLayout>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/confirm_before_boost"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Switch-->
<!--android:id="@+id/swConfirmBeforeBoost"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--</LinearLayout>-->
<!--android:id="@+id/swConfirmBeforeBoost"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/sensitive_content_default_open"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Switch-->
<!--android:id="@+id/swNSFWOpen"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--</LinearLayout>-->
<!--android:id="@+id/swNSFWOpen"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etTargetUrl"-->
<!--android:text="@string/target_url"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etTargetUrl"-->
<!--android:text="@string/target_url"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etTargetUrl"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="textUri"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etTargetUrl"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="textUri"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnHelpTargetUrl"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnHelpTargetUrl"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/local_folder"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/local_folder"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<TextView-->
<!--android:id="@+id/tvFolder"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--/>-->
<!--<TextView-->
<!--android:id="@+id/tvFolder"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:ellipsize="start"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnFolderPicker"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:minWidth="32dp"-->
<!--android:text="@string/dot_dot"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnFolderPicker"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:minWidth="32dp"-->
<!--android:text="@string/dot_dot"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnHelpFolderPicker"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnHelpFolderPicker"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etFileType"-->
<!--android:text="@string/file_type"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etFileType"-->
<!--android:text="@string/file_type"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etFileType"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="text"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etFileType"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="text"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnFileTypeHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnFileTypeHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etRepeatInterval"-->
<!--android:text="@string/repeat_interval"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etRepeatInterval"-->
<!--android:text="@string/repeat_interval"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etRepeatInterval"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etRepeatInterval"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnIntervalHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnIntervalHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/geo_tagging_mode"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/geo_tagging_mode"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Spinner-->
<!--android:id="@+id/spLocationMode"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--/>-->
<!--<Spinner-->
<!--android:id="@+id/spLocationMode"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnLocationModeHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnLocationModeHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etLocationIntervalDesired"-->
<!--android:text="@string/location_interval_desired"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etLocationIntervalDesired"-->
<!--android:text="@string/location_interval_desired"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etLocationIntervalDesired"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etLocationIntervalDesired"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnLocationIntervalDesiredHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnLocationIntervalDesiredHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etLocationIntervalMin"-->
<!--android:text="@string/location_interval_min"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etLocationIntervalMin"-->
<!--android:text="@string/location_interval_min"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etLocationIntervalMin"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etLocationIntervalMin"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="number"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnLocationIntervalMinHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnLocationIntervalMinHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/force_wifi_ap"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/force_wifi_ap"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Switch-->
<!--android:id="@+id/swForceWifi"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Switch-->
<!--android:id="@+id/swForceWifi"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnForceWifiHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnForceWifiHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etSSID"-->
<!--android:text="@string/wifi_ap_ssid"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:labelFor="@+id/etSSID"-->
<!--android:text="@string/wifi_ap_ssid"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<EditText-->
<!--android:id="@+id/etSSID"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="text"-->
<!--/>-->
<!--<EditText-->
<!--android:id="@+id/etSSID"-->
<!--style="@style/setting_edit_text"-->
<!--android:inputType="text"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnSSIDPicker"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:minWidth="32dp"-->
<!--android:text="@string/dot_dot"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnSSIDPicker"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:minWidth="32dp"-->
<!--android:text="@string/dot_dot"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnSSIDHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnSSIDHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/thumbnail_auto_rotate"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/thumbnail_auto_rotate"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Switch-->
<!--android:id="@+id/swThumbnailAutoRotate"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Switch-->
<!--android:id="@+id/swThumbnailAutoRotate"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnThumbnailAutoRotateHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnThumbnailAutoRotateHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/copy_before_view_send"-->
<!--/>-->
<!--<TextView-->
<!--style="@style/setting_row_label"-->
<!--android:text="@string/copy_before_view_send"-->
<!--/>-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<LinearLayout style="@style/setting_row_form">-->
<!--<Switch-->
<!--android:id="@+id/swCopyBeforeViewSend"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Switch-->
<!--android:id="@+id/swCopyBeforeViewSend"-->
<!--style="@style/setting_horizontal_stretch"-->
<!--android:gravity="center"-->
<!--/>-->
<!--<Button-->
<!--android:id="@+id/btnCopyBeforeViewSendHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<Button-->
<!--android:id="@+id/btnCopyBeforeViewSendHelp"-->
<!--style="@style/setting_row_help"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View style="@style/setting_divider"/>-->
<!--<View style="@style/setting_divider"/>-->
<!--<TextView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="20dp"-->
<!--android:layout_marginTop="20dp"-->
<!--android:gravity="center"-->
<!--android:text="@string/setting_desc"-->
<!--/>-->
</LinearLayout>
<!--<TextView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="20dp"-->
<!--android:layout_marginTop="20dp"-->
<!--android:gravity="center"-->
<!--android:text="@string/setting_desc"-->
<!--/>-->
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<TextView
android:id="@+id/tvMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
tools:text="message...."
/>
<CheckBox
android:id="@+id/cbSkipNext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginStart="12dp"
android:layout_marginTop="8dp"
android:text="@string/dont_confirm_again"
/>
</LinearLayout>

View File

@ -11,9 +11,9 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:cacheColorHint="#00000000"
android:fadeScrollbars="false"
android:fadingEdgeLength="20dp"
android:cacheColorHint="#00000000"
>
<LinearLayout
@ -182,14 +182,30 @@
android:orientation="horizontal"
>
<ImageButton
android:id="@+id/btnFollow"
<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:src="?attr/ic_account_add"
/>
android:layout_height="40dp">
<ImageButton
android:id="@+id/btnFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
<View
android:layout_width="0dp"
@ -357,16 +373,18 @@
</LinearLayout>
</ScrollView>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorSettingDivider"/>
<Button
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_bg_transparent"
android:text="@string/cancel"
android:id="@+id/btnCancel"
android:textAllCaps="false"
/>
</LinearLayout>

View File

@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ImageView
android:id="@+id/ivTriangleTop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/list_item_popup_triangle"
android:layout_gravity="center_horizontal"
android:id="@+id/ivTriangleTop"
android:background="@drawable/list_item_popup_triangle"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="wrap_content"
android:background="@drawable/list_item_popup_bg"
android:orientation="horizontal"
>
@ -24,7 +25,7 @@
<ImageButton
android:id="@+id/btnConversation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="40dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/conversation_view"
android:minWidth="40dp"
@ -34,7 +35,7 @@
<ImageButton
android:id="@+id/btnReply"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="40dp"
android:layout_marginStart="2dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/reply"
@ -45,7 +46,7 @@
<Button
android:id="@+id/btnBoost"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="40dp"
android:layout_marginStart="2dp"
android:background="@drawable/btn_bg_transparent"
android:drawablePadding="4dp"
@ -57,7 +58,7 @@
<Button
android:id="@+id/btnFavourite"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="40dp"
android:layout_marginStart="2dp"
android:background="@drawable/btn_bg_transparent"
android:drawablePadding="4dp"
@ -66,10 +67,37 @@
android:paddingStart="4dp"
/>
<FrameLayout
android:id="@+id/llFollow2"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="2dp"
>
<ImageButton
android:id="@+id/btnFollow2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
<ImageButton
android:id="@+id/btnMore"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="40dp"
android:layout_marginStart="2dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/more"
@ -80,12 +108,12 @@
</LinearLayout>
<ImageView
android:id="@+id/ivTriangleBottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/list_item_popup_triangle_bottom"
android:layout_gravity="center_horizontal"
android:background="@drawable/list_item_popup_triangle_bottom"
android:visibility="gone"
android:id="@+id/ivTriangleBottom"
/>
</LinearLayout>

View File

@ -4,9 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical"
>
<TextView
android:id="@+id/tvCreated"
android:layout_width="match_parent"
@ -32,10 +33,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorProfileBackgroundMask"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="12dp"
android:background="?attr/colorProfileBackgroundMask"
>
<com.android.volley.toolbox.NetworkImageView
@ -60,11 +61,11 @@
android:id="@+id/tvAcct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
tools:text="\@fugahogehogera\@jugemujyugemugokounosurikire.jp"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="?attr/colorLink"
tools:text="\@fugahogehogera\@jugemujyugemugokounosurikire.jp"
/>
@ -77,15 +78,35 @@
/>
</LinearLayout>
<ImageButton
android:id="@+id/btnFollow"
<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
/>
>
<ImageButton
android:id="@+id/btnFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
</FrameLayout>
<LinearLayout
@ -99,25 +120,26 @@
android:id="@+id/btnStatusCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="statuses\n124"
android:background="@drawable/btn_bg_transparent"
tools:text="statuses\n124"
/>
<Button
android:id="@+id/btnFollowing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="following\n9999"
android:background="@drawable/btn_bg_transparent"
tools:text="following\n9999"
/>
<Button
android:id="@+id/btnFollowers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="followers\n9999"
android:background="@drawable/btn_bg_transparent"
tools:text="followers\n9999"
/>
<ImageButton
android:id="@+id/btnMore"
android:layout_width="wrap_content"
@ -125,8 +147,8 @@
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/more"
android:minWidth="48dp"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:paddingStart="4dp"
android:src="?attr/btn_more"
/>

View File

@ -127,15 +127,32 @@
</LinearLayout>
<ImageButton
android:id="@+id/btnFollow"
<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="4dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:src="?attr/ic_account_add"
/>
>
<ImageButton
android:id="@+id/btnFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
</LinearLayout>
@ -400,6 +417,33 @@
android:paddingStart="4dp"
/>
<FrameLayout
android:id="@+id/llFollow2"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="2dp"
>
<ImageButton
android:id="@+id/btnFollow2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
<ImageButton
android:id="@+id/btnMore"
android:layout_width="wrap_content"

View File

@ -124,15 +124,32 @@
</LinearLayout>
<ImageButton
android:id="@+id/btnFollow"
<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="4dp"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:src="?attr/ic_account_add"
/>
>
<ImageButton
android:id="@+id/btnFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_bg_transparent"
android:contentDescription="@string/follow"
android:scaleType="center"
tools:src="?attr/ic_follow_plus"
/>
<ImageView
android:id="@+id/ivFollowedBy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:src="?attr/ic_followed_by"
tools:ignore="ContentDescription"
/>
</FrameLayout>
</LinearLayout>

View File

@ -54,7 +54,7 @@
<item
android:id="@+id/nav_add_statuses"
android:icon="?attr/btn_statuses"
android:title="@string/your_statuses"/>
android:title="@string/profile"/>
<item
android:id="@+id/nav_follow_requests"

View File

@ -75,7 +75,7 @@
<string name="wait_previous_operation">Veuillez attendre la fin de la dernière opération.</string>
<string name="cant_remove_boost_while_favourited">Impossible de supprimer le boost quand il est dans les favoris</string>
<string name="confirm">confirmer</string>
<string name="confirm_boost">Booster ce statut ? il est affiché par tous les abonnés et sur votre page de profil.</string>
<string name="confirm_boost_from">Booster ce statut from %1$s ? il est affiché par tous les abonnés et sur votre page de profil.</string>
<string name="display_name_favourited_by">préféré par %1$s</string>
<string name="display_name_boosted_by">boosté par %1$s</string>
<string name="display_name_replied_by">répondu par %1$s</string>
@ -183,7 +183,7 @@
<string name="regex_filter">Regex filter</string>
<string name="regex_error">Regex error</string>
<string name="notification_delete">Empty notifications</string>
<string name="confirm_delete_notification">This will empty your notification on your instance.\nAre you sure?</string>
<string name="confirm_delete_notification">This will empty your notification on your instance.\nAre you sure ?</string>
<string name="search_for">Search %1$s</string>
<string name="spoil_visibility_for_account">Visibility is spoiled for account.</string>
<string name="contributor">contributor</string>
@ -224,9 +224,9 @@
<string name="open_profile_from_another_account">Open profile from another account (same instance)</string>
<string name="send_message">Send message</string>
<string name="send_message_from_another_account">Send message from another account</string>
<string name="confirm_block_user">User \'%1$s\' will be blocked. Are you sure?</string>
<string name="confirm_delete_status">This toot will be deleted. Are you sure?</string>
<string name="confirm_mute_user">User \'%1$s\' will be muted. Are you sure?</string>
<string name="confirm_block_user">User \'%1$s\' will be blocked. Are you sure ?</string>
<string name="confirm_delete_status">This toot will be deleted. Are you sure ?</string>
<string name="confirm_mute_user">User \'%1$s\' will be muted. Are you sure ?</string>
<string name="nickname_label">Nickname (if specified, it\'s shown instead of full acct)</string>
<string name="acct">Acct</string>
<string name="background_color">Background color</string>
@ -240,5 +240,18 @@
<string name="text_color">Text color</string>
<string name="nickname_and_color">Nickname and Color</string>
<string name="nickname_applied_after_reload">The change of nickname/color will be applied after reload column.</string>
<string name="confirmation">Confirmation</string>
<string name="follow_locked_user">Follow locked user</string>
<string name="follow_requested">You are requesting follow to locked account.</string>
<string name="show_follow_button_in_button_bar">Show follow button in button bar (app restart required)</string>
<string name="profile">Profile</string>
<string name="profile_of">Profile of %1$s</string>
<string name="confirm_follow_request_who_from">Send follow request from %2$s to locked user %1$s ?</string>
<string name="confirm_follow_who_from">Follow %1$s from %2$s ?</string>
<string name="confirm_post_from">Posting a toot from %1$s. Are you sure ?</string>
<string name="confirm_unfollow_who_from">Unfollow %1$s from %2$s ?</string>
<string name="dont_confirm_again">Don\'t confirm again</string>
<string name="follow_request_cant_remove_by_sender">seems follow request can\'t be removed by sender…</string>
<string name="it_is_you">It\'s you.</string>
</resources>

View File

@ -71,7 +71,7 @@
<string name="wait_previous_operation">直前の操作が完了するまでお待ちください</string>
<string name="cant_remove_boost_while_favourited">お気に入りを外さないとブーストを外せません?</string>
<string name="confirm">確認</string>
<string name="confirm_boost">この発言をブーストしますか? 全てのフォロワーとあなたのプロフィールページに公開されます</string>
<string name="confirm_boost_from">この発言を %1$s からブーストしますか? 全てのフォロワーとあなたのプロフィールページに公開されます</string>
<string name="display_name_favourited_by">%1$sがお気に入りに追加しました</string>
<string name="display_name_boosted_by">%1$sがブーストしました</string>
<string name="display_name_replied_by">%1$sからの返信</string>
@ -236,4 +236,17 @@
<string name="text_color">文字色</string>
<string name="nickname_and_color">通称と色</string>
<string name="nickname_applied_after_reload">通称と色の変更はカラムをリロードした後に反映されます</string>
<string name="confirmation">確認</string>
<string name="follow_locked_user">鍵つきユーザのフォロー</string>
<string name="follow_requested">フォローリクエストを申請しました</string>
<string name="show_follow_button_in_button_bar">フォローボタンをボタンバーに表示する(アプリ再起動が必要)</string>
<string name="confirm_follow_request_who_from">%2$s から鍵付きユーザ %1$s にフォローリクエストを送りますか?</string>
<string name="confirm_follow_who_from">%2$s から %1$s をフォローしますか?</string>
<string name="confirm_post_from">%1$s から投稿します。よろしいですか?</string>
<string name="confirm_unfollow_who_from">%2$s から %1$s をフォロー解除しますか?</string>
<string name="dont_confirm_again">次回から確認しない</string>
<string name="follow_request_cant_remove_by_sender">フォローリクエストを送信者から解除することはできないようです…</string>
<string name="profile">プロフィール</string>
<string name="profile_of">%1$s のプロフィール</string>
<string name="it_is_you">あなたです</string>
</resources>

View File

@ -104,9 +104,12 @@
<attr name="ic_toot" format="reference" />
<attr name="ic_tune" format="reference" />
<attr name="ic_unknown" format="reference" />
<attr name="ic_account_remove" format="reference" />
<attr name="ic_hourglass" format="reference" />
<attr name="ic_edit" format="reference" />
<attr name="ic_hashtag" format="reference" />
<attr name="ic_follow_plus" format="reference" />
<attr name="ic_follow_cross" format="reference" />
<attr name="ic_followed_by" format="reference" />
</resources>

View File

@ -71,7 +71,7 @@
<string name="wait_previous_operation">Please wait until last operation is over.</string>
<string name="cant_remove_boost_while_favourited">Can\'t remove boost while favourited</string>
<string name="confirm">Confirm</string>
<string name="confirm_boost">Boost this status? It\'s shown to all followers and on your profile page.</string>
<string name="confirm_boost_from">Boost this status from %1$s ? It\'s shown to all followers and on your profile page.</string>
<string name="display_name_favourited_by">%1$s favourited</string>
<string name="display_name_boosted_by">%1$s boosted</string>
<string name="display_name_replied_by">%1$s replied</string>
@ -235,4 +235,17 @@
<string name="discard">Discard</string>
<string name="nickname_and_color">Nickname and Color</string>
<string name="nickname_applied_after_reload">The change of nickname/color will be applied after reload column.</string>
<string name="show_follow_button_in_button_bar">Show follow button in button bar (app restart required)</string>
<string name="follow_requested">Follow request was sent.</string>
<string name="confirmation">Confirmation</string>
<string name="follow_locked_user">Follow locked user</string>
<string name="dont_confirm_again">Don\'t confirm again</string>
<string name="confirm_post_from">Posting a toot from %1$s. Are you sure ?</string>
<string name="confirm_follow_who_from">Follow %1$s from %2$s ?</string>
<string name="confirm_unfollow_who_from">Unfollow %1$s from %2$s ?</string>
<string name="confirm_follow_request_who_from">Send follow request from %2$s to locked user %1$s ?</string>
<string name="follow_request_cant_remove_by_sender">seems follow request can\'t be removed by sender…</string>
<string name="profile">Profile</string>
<string name="profile_of">Profile of %1$s</string>
<string name="it_is_you">It\'s you.</string>
</resources>

View File

@ -69,11 +69,16 @@
<item name="ic_toot">@drawable/ic_toot</item>
<item name="ic_tune">@drawable/ic_tune</item>
<item name="ic_unknown">@drawable/ic_unknown</item>
<item name="ic_account_remove">@drawable/ic_account_remove</item>
<item name="ic_hourglass">@drawable/ic_hourglass</item>
<item name="ic_edit">@drawable/ic_edit</item>
<item name="ic_hashtag">@drawable/ic_hashtag</item>
<item name="ic_follow_plus">@drawable/ic_follow_plus</item>
<item name="ic_follow_cross">@drawable/ic_follow_cross</item>
<item name="ic_followed_by">@drawable/ic_followed_by</item>
</style>
<style name="AppTheme.Light.NoActionBar" parent="AppTheme.Light">
@ -150,10 +155,15 @@
<item name="ic_toot">@drawable/ic_toot_dark</item>
<item name="ic_tune">@drawable/ic_tune_dark</item>
<item name="ic_unknown">@drawable/ic_unknown_dark</item>
<item name="ic_account_remove">@drawable/ic_account_remove_dark</item>
<item name="ic_hourglass">@drawable/ic_hourglass_dark</item>
<item name="ic_edit">@drawable/ic_edit_dark</item>
<item name="ic_hashtag">@drawable/ic_hashtag_dark</item>
<item name="ic_follow_plus">@drawable/ic_follow_plus_dark</item>
<item name="ic_follow_cross">@drawable/ic_follow_cross_dark</item>
<item name="ic_followed_by">@drawable/ic_followed_by_dark</item>
</style>
<style name="AppTheme.Dark.NoActionBar" parent="AppTheme.Dark">
@ -241,4 +251,5 @@
<item name="android:imeOptions">actionDone</item>
</style>
</resources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -47,12 +47,18 @@ sub resize_scales{
my $res_dir = "app/src/main/res";
resize_scales( "ic_launcher-1024.png",$res_dir,"mipmap","ic_launcher",0,48);
#resize_scales( "ic_app_logo-512.png",$res_dir,"drawable","ic_app_logo",0,32);
resize_scales( "ic_notification-817.png",$res_dir,"drawable","ic_notification",0,24);
resize_scales( "_ArtWork/ic_launcher-1024.png" ,$res_dir,"mipmap","ic_launcher",0,48);
#resize_scales( "_ArtWork/ic_app_logo-512.png" ,$res_dir,"drawable","ic_app_logo",0,32);
resize_scales( "_ArtWork/ic_notification-817.png" ,$res_dir,"drawable","ic_notification",0,24);
resize_scales( "ic_account_remove.png",$res_dir,"drawable","ic_account_remove",0,32);
resize_scales( "ic_account_remove_dark.png",$res_dir,"drawable","ic_account_remove_dark",0,32);
resize_scales( "ic_hourglass.png",$res_dir,"drawable","ic_hourglass",0,32);
resize_scales( "ic_hourglass_dark.png",$res_dir,"drawable","ic_hourglass_dark",0,32);
resize_scales( "_ArtWork/ic_hourglass.png" ,$res_dir,"drawable","ic_hourglass",0,32);
resize_scales( "_ArtWork/ic_hourglass_dark.png" ,$res_dir,"drawable","ic_hourglass_dark",0,32);
resize_scales( "_ArtWork/ic_follow_cross.png" ,$res_dir,"drawable","ic_follow_cross",0,32);
resize_scales( "_ArtWork/ic_follow_cross_dark.png" ,$res_dir,"drawable","ic_follow_cross_dark",0,32);
resize_scales( "_ArtWork/ic_follow_plus.png" ,$res_dir,"drawable","ic_follow_plus",0,32);
resize_scales( "_ArtWork/ic_follow_plus_dark.png" ,$res_dir,"drawable","ic_follow_plus_dark",0,32);
resize_scales( "_ArtWork/ic_followed_by.png" ,$res_dir,"drawable","ic_followed_by",0,32);
resize_scales( "_ArtWork/ic_followed_by_dark.png" ,$res_dir,"drawable","ic_followed_by_dark",0,32);