v0.1.9
This commit is contained in:
parent
b72353fbb5
commit
4b6f13ee99
@ -9,8 +9,8 @@ android {
|
||||
applicationId "jp.juggler.subwaytooter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 18
|
||||
versionName "0.1.8"
|
||||
versionCode 19
|
||||
versionName "0.1.9"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class ActAbout extends AppCompatActivity {
|
||||
@ -19,9 +20,13 @@ public class ActAbout extends AppCompatActivity {
|
||||
static final String url_enty = "https://enty.jp/3WtlzHG10wZv";
|
||||
static final String developer_acct = "tateisu@mastodon.juggler.jp";
|
||||
|
||||
static final String[] contributors = new String[]{
|
||||
"@Balor@freeradical.zone", "update english language",
|
||||
};
|
||||
|
||||
@Override protected void onCreate( @Nullable Bundle savedInstanceState ){
|
||||
super.onCreate( savedInstanceState );
|
||||
App1.setActivityTheme(this,false);
|
||||
App1.setActivityTheme( this, false );
|
||||
setContentView( R.layout.act_about );
|
||||
|
||||
try{
|
||||
@ -32,13 +37,13 @@ public class ActAbout extends AppCompatActivity {
|
||||
}
|
||||
Button b;
|
||||
|
||||
b = (Button) findViewById( R.id.btnDeveloper );
|
||||
b.setText( getString(R.string.search_for,developer_acct ));
|
||||
b = (Button) findViewById( R.id.btnDeveloper );
|
||||
b.setText( getString( R.string.search_for, developer_acct ) );
|
||||
b.setOnClickListener( new View.OnClickListener() {
|
||||
@Override public void onClick( View v ){
|
||||
Intent data = new Intent();
|
||||
data.putExtra(EXTRA_SEARCH,developer_acct);
|
||||
setResult( RESULT_OK,data );
|
||||
data.putExtra( EXTRA_SEARCH, developer_acct );
|
||||
setResult( RESULT_OK, data );
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
@ -50,7 +55,7 @@ public class ActAbout extends AppCompatActivity {
|
||||
open_browser( url_store );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
b = (Button) findViewById( R.id.btnDonate );
|
||||
b.setText( url_enty );
|
||||
b.setOnClickListener( new View.OnClickListener() {
|
||||
@ -58,6 +63,38 @@ public class ActAbout extends AppCompatActivity {
|
||||
open_browser( url_enty );
|
||||
}
|
||||
} );
|
||||
|
||||
LinearLayout ll = (LinearLayout) findViewById( R.id.llContributors );
|
||||
float density = getResources().getDisplayMetrics().density;
|
||||
int margin_top = (int) ( 0.5f + density * 8 );
|
||||
int padding = (int) ( 0.5f + density * 8 );
|
||||
|
||||
for( int i = 0, ie = contributors.length ; i < ie ; i += 2 ){
|
||||
final String acct = contributors[ i ];
|
||||
final String works = contributors[ i + 1 ];
|
||||
|
||||
b = new Button( this );
|
||||
//
|
||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT );
|
||||
if( i < 0 ) lp.topMargin = margin_top;
|
||||
b.setLayoutParams( lp );
|
||||
//
|
||||
b.setBackgroundResource( R.drawable.btn_bg_transparent );
|
||||
b.setPadding( padding, padding, padding, padding );
|
||||
b.setAllCaps( false );
|
||||
//
|
||||
b.setText( getString( R.string.search_for, acct ) + "\n" + getString( R.string.thanks_for, works ) );
|
||||
b.setOnClickListener( new View.OnClickListener() {
|
||||
@Override public void onClick( View v ){
|
||||
Intent data = new Intent();
|
||||
data.putExtra( EXTRA_SEARCH, acct );
|
||||
setResult( RESULT_OK, data );
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
//
|
||||
ll.addView( b );
|
||||
}
|
||||
}
|
||||
|
||||
void open_browser( String url ){
|
||||
|
@ -196,12 +196,20 @@ public class ActMain extends AppCompatActivity
|
||||
@Override
|
||||
public void onBackPressed(){
|
||||
|
||||
// メニューが開いていたら閉じる
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById( R.id.drawer_layout );
|
||||
if( drawer.isDrawerOpen( GravityCompat.START ) ){
|
||||
drawer.closeDrawer( GravityCompat.START );
|
||||
return;
|
||||
}
|
||||
|
||||
// カラムが0個ならアプリを終了する
|
||||
if( pager_adapter.getCount() == 0 ){
|
||||
ActMain.this.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// カラムが1個以上ある場合は設定に合わせて挙動を変える
|
||||
switch( pref.getInt( Pref.KEY_BACK_BUTTON_ACTION, 0 ) ){
|
||||
default:
|
||||
case ActAppSetting.BACK_ASK_ALWAYS:
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_weight="0.2"
|
||||
/>
|
||||
|
||||
@ -63,12 +63,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_bg_transparent"
|
||||
android:padding="8dp"
|
||||
tools:text="tateisu@mastodon.juggler.jp"
|
||||
android:textAllCaps="false"
|
||||
tools:text="tateisu@mastodon.juggler.jp"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_weight="0.2"
|
||||
/>
|
||||
|
||||
@ -84,13 +85,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_bg_transparent"
|
||||
android:padding="8dp"
|
||||
tools:text="rate_on_store"
|
||||
android:textAllCaps="false"
|
||||
tools:text="rate_on_store"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_weight="0.2"
|
||||
/>
|
||||
|
||||
@ -106,8 +107,28 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_bg_transparent"
|
||||
android:padding="8dp"
|
||||
tools:text="enty...."
|
||||
android:textAllCaps="false"
|
||||
tools:text="enty...."
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_weight="0.2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contributor"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llContributors"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
/>
|
||||
|
||||
<View
|
||||
@ -115,6 +136,5 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@ -182,4 +182,6 @@
|
||||
<string name="notification_delete">通知の削除</string>
|
||||
<string name="search_for">%1$s を検索</string>
|
||||
<string name="spoil_visibility_for_account">公開範囲をアカウントの既定値に狭めました</string>
|
||||
<string name="contributor">contributor</string>
|
||||
<string name="thanks_for">Thanks for %1$s</string>
|
||||
</resources>
|
||||
|
@ -181,4 +181,6 @@
|
||||
<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>
|
||||
<string name="thanks_for">Thanks for %1$s</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user