Fixed title screen animation for Lollipop+
Larger buttons overall and better spacing between replies.
|
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 326 B |
@@ -18,6 +18,8 @@
|
||||
|
||||
<dimen name="conversation_statementpadding">5dp</dimen>
|
||||
<dimen name="conversation_textsize">16sp</dimen>
|
||||
<dimen name="conversation_replyseparator_margintop">5dp</dimen>
|
||||
<dimen name="conversation_replyseparator_marginbottom">5dp</dimen>
|
||||
|
||||
<dimen name="actionbar_text">12sp</dimen>
|
||||
<dimen name="statusbar_text">11sp</dimen>
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
<style name="AndorsTrail_Blue_TextButton" parent="android:style/Widget.Button">
|
||||
<item name="android:background">@drawable/ui_blue_textbutton</item>
|
||||
<item name="android:textColor">@color/ui_blue_textbutton_textcolor</item>
|
||||
<item name="android:paddingTop">20dp</item>
|
||||
<item name="android:paddingBottom">20dp</item>
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
<item name="android:paddingRight">5dp</item>
|
||||
</style>
|
||||
|
||||
<style name="AndorsTrail_Blue_ImageButton" parent="android:style/Widget.ImageButton">
|
||||
|
||||
@@ -22,6 +22,7 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
@@ -134,11 +135,16 @@ public final class ConversationActivity
|
||||
}
|
||||
|
||||
private int getSelectedReplyIndex() {
|
||||
int j = 0;
|
||||
for (int i = 0; i < replyGroup.getChildCount(); ++i) {
|
||||
final View v = replyGroup.getChildAt(i);
|
||||
if (v == null) continue;
|
||||
if (!(v instanceof RadioButton)) {
|
||||
continue;
|
||||
}
|
||||
final RadioButton rb = (RadioButton) v;
|
||||
if (rb.isChecked()) return i;
|
||||
if (rb.isChecked()) return j;
|
||||
j++;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -147,12 +153,21 @@ public final class ConversationActivity
|
||||
int replyCount = replyGroup.getChildCount();
|
||||
if (replyCount <= 0) return;
|
||||
if (i < 0) i = 0;
|
||||
else if (i >= replyCount) i = replyCount - 1;
|
||||
else if (i >= (replyCount+1)/2) i = replyCount/2;
|
||||
|
||||
View v = replyGroup.getChildAt(i);
|
||||
if (v == null) return;
|
||||
RadioButton rb = (RadioButton) v;
|
||||
rb.setChecked(true);
|
||||
for (int j = 0; j < replyGroup.getChildCount(); ++j) {
|
||||
View v = replyGroup.getChildAt(j);
|
||||
if (v == null) continue;
|
||||
if (!(v instanceof RadioButton)) {
|
||||
continue;
|
||||
}
|
||||
i--;
|
||||
if (i < 0) {
|
||||
RadioButton rb = (RadioButton) v;
|
||||
rb.setChecked(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,6 +215,9 @@ public final class ConversationActivity
|
||||
for (int i = 0; i < replyGroup.getChildCount(); ++i) {
|
||||
final View v = replyGroup.getChildAt(i);
|
||||
if (v == null) continue;
|
||||
if (!(v instanceof RadioButton)) {
|
||||
continue;
|
||||
}
|
||||
final RadioButton rb = (RadioButton) v;
|
||||
if (rb.isChecked()) {
|
||||
return rb;
|
||||
@@ -449,6 +467,14 @@ public final class ConversationActivity
|
||||
rb.setShadowLayer(1, 1, 1, Color.BLACK);
|
||||
rb.setFocusable(false);
|
||||
rb.setFocusableInTouchMode(false);
|
||||
if (replyGroup.getChildCount() > 0) { //For all but the first.
|
||||
ImageView iv = new ImageView(this);
|
||||
iv.setBackgroundResource(R.drawable.ui_blue_listseparator);
|
||||
RadioGroup.LayoutParams ivLayoutParams = new RadioGroup.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT);
|
||||
ivLayoutParams.setMargins(0, getResources().getDimensionPixelOffset(R.dimen.conversation_replyseparator_margintop), 0, getResources().getDimensionPixelOffset(R.dimen.conversation_replyseparator_marginbottom));
|
||||
iv.setLayoutParams(ivLayoutParams);
|
||||
replyGroup.addView(iv, ivLayoutParams);
|
||||
}
|
||||
replyGroup.addView(rb, layoutParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.gpl.rpg.AndorsTrail.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
@@ -64,6 +66,12 @@ public final class StartScreenActivity extends FragmentActivity implements OnNew
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
((AnimationDrawable)((ImageView)findViewById(R.id.title_logo)).getDrawable()).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||