ConversationActivity: Make text input smaller and more "flat".

This commit is contained in:
Sebastian Kaspari 2012-01-21 11:50:58 +01:00
parent da885094da
commit b09ba251ea
3 changed files with 42 additions and 1 deletions

View File

@ -47,6 +47,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textImeMultiLine"
android:background="@layout/input_background"
android:imeOptions="actionSend" />
<Button
android:id="@+id/speech"

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Yaaic - Yet Another Android IRC Client
Copyright 2009-2011 Sebastian Kaspari
This file is part of Yaaic.
Yaaic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Yaaic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
-->
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#3f5d9b" />
<padding
android:left="3dp"
android:top="3dp"
android:right="3dp"
android:bottom="3dp" />
<solid
android:color="#ffffff" />
</shape>

View File

@ -213,7 +213,12 @@ public class ConversationActivity extends Activity implements ServiceConnection,
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
indicator.setTextSize(settings.getFontSize() * dm.scaledDensity);
float fontSize = settings.getFontSize() * dm.scaledDensity;
indicator.setTextSize(fontSize);
int padding = (int) (5 * dm.scaledDensity);
input.setPadding(padding, padding, padding, padding);
indicator.setTypeface(Typeface.MONOSPACE);
// Optimization : cache field lookups
Collection<Conversation> mConversations = server.getConversations();