Skip to content

Commit

Permalink
Only use the larger sizes on tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Jan 19, 2015
1 parent 6755844 commit a1b7467
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
3 changes: 1 addition & 2 deletions res/layout/row_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="24dp"
android:orientation="horizontal">

<TextView
Expand Down Expand Up @@ -49,7 +48,7 @@
android:linksClickable="true"
android:lineSpacingExtra="4dp"
android:paddingRight="8dp"
android:layout_marginBottom="4dp"
android:layout_marginBottom="@dimen/message_row_spacing"
android:layout_weight="1" />

<ImageView
Expand Down
2 changes: 2 additions & 0 deletions res/values-sw600dp-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@

<resources>
<dimen name="drawer_width">200dp</dimen>
<integer name="default_text_size">16</integer>
<dimen name="message_row_spacing">4dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
<dimen name="unread_top_txt_size">16sp</dimen>
<dimen name="unread_bottom_txt_size">16sp</dimen>
<dimen name="unread_bubble_size">28dp</dimen>
<integer name="default_text_size">16</integer>
<dimen name="message_row_spacing">4dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions res/values-sw800dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@
<dimen name="unread_top_txt_size">16sp</dimen>
<dimen name="unread_bottom_txt_size">16sp</dimen>
<dimen name="unread_bubble_size">28dp</dimen>
<integer name="default_text_size">16</integer>
<dimen name="message_row_spacing">4dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@
<dimen name="status_bar_height">25dp</dimen>
<dimen name="scrollbar_inset">0dp</dimen>
<dimen name="scrollbar_size">2dp</dimen>
<integer name="default_text_size">14</integer>
<dimen name="message_row_spacing">0dp</dimen>
</resources>
2 changes: 1 addition & 1 deletion res/xml-v14/preferences_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<com.robobunny.SeekBarPreference
android:key="textSize"
android:title="Text Size"
android:defaultValue="16"
android:defaultValue="@integer/default_text_size"
android:max="24"
robobunny:min="12"
robobunny:unitsLeft=""
Expand Down
2 changes: 1 addition & 1 deletion res/xml/preferences_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<com.robobunny.SeekBarPreference
android:key="textSize"
android:title="Text Size"
android:defaultValue="16"
android:defaultValue="@integer/default_text_size"
android:max="24"
robobunny:min="12"
robobunny:unitsLeft=""
Expand Down
2 changes: 1 addition & 1 deletion src/com/irccloud/android/fragment/MessageViewFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ public void run() {
private synchronized void refresh(MessageAdapter adapter, TreeMap<Long,EventsDataSource.Event> events) {
synchronized (adapterLock) {
if(getActivity() != null)
textSize = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("textSize", 16);
textSize = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("textSize", getActivity().getResources().getInteger(R.integer.default_text_size));
timestamp_width = -1;
if(conn.getReconnectTimestamp() == 0)
conn.cancel_idle_timer(); //This may take a while...
Expand Down

0 comments on commit a1b7467

Please sign in to comment.