Skip to content

Commit b3c56b8

Browse files
committed
Add textCapSentences flag to inputType attribute
Closes issue pockethub#112
1 parent b7b7c41 commit b3c56b8

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

app/res/layout/comment_create.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@
2626

2727
<EditText
2828
android:id="@+id/et_comment"
29-
style="@style/EditText"
29+
style="@style/FormalMultiLineEditText"
3030
android:layout_width="match_parent"
3131
android:layout_height="match_parent"
3232
android:layout_alignParentLeft="true"
3333
android:layout_below="@id/v_header_separator"
3434
android:layout_margin="10dp"
35-
android:gravity="top"
3635
android:hint="@string/comment_hint"
37-
android:inputType="textMultiLine|textAutoCorrect"
3836
android:scrollbars="horizontal|vertical" >
3937

4038
<requestFocus />

app/res/layout/gist_create.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@
5959

6060
<EditText
6161
android:id="@+id/et_gist_description"
62-
style="@style/EditText"
62+
style="@style/FormalSingleLineEditText"
6363
android:layout_width="match_parent"
64-
android:layout_height="wrap_content"
65-
android:hint="@string/gist_description_hint"
66-
android:inputType="text|textAutoCorrect"
67-
android:singleLine="true" />
64+
android:hint="@string/gist_description_hint" />
6865

6966
<TextView
7067
style="@style/HeaderTitleText"

app/res/layout/issue_edit.xml

+3-9
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@
4141

4242
<EditText
4343
android:id="@+id/et_issue_title"
44-
style="@style/EditText"
45-
android:layout_width="match_parent"
46-
android:layout_height="wrap_content"
47-
android:inputType="text|textAutoCorrect"
48-
android:singleLine="true" />
44+
style="@style/FormalSingleLineEditText"
45+
android:layout_width="match_parent" />
4946

5047
<TextView
5148
style="@style/HeaderTitleText"
@@ -125,11 +122,8 @@
125122

126123
<EditText
127124
android:id="@+id/et_issue_body"
128-
style="@style/EditText"
125+
style="@style/FormalMultiLineEditText"
129126
android:layout_width="match_parent"
130-
android:layout_height="wrap_content"
131-
android:gravity="top"
132-
android:inputType="textMultiLine|textAutoCorrect"
133127
android:minLines="5"
134128
android:scrollbars="horizontal|vertical" />
135129
</LinearLayout>

app/res/values/styles.xml

+17-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<resources>
17+
<resources xmlns:android="http://schemas.android.com/apk/res/android">
18+
19+
<style name="Global">
20+
<item name="android:layout_height">wrap_content</item>
21+
<item name="android:layout_width">wrap_content</item>
22+
</style>
1823

1924
<style name="AvatarActionBar">
2025
<item name="android:layout_width">28dp</item>
@@ -47,14 +52,24 @@
4752
<item name="android:divider">@null</item>
4853
</style>
4954

50-
<style name="EditText">
55+
<style name="EditText" parent="Global">
5156
<item name="android:textColor">@color/text</item>
5257
<item name="android:textCursorDrawable">@drawable/edit_text_cursor</item>
5358
<item name="android:textSize">14sp</item>
5459
<item name="android:padding">10dp</item>
5560
<item name="android:background">@drawable/edit_text_background</item>
5661
</style>
5762

63+
<style name="FormalMultiLineEditText" parent="EditText">
64+
<item name="android:gravity">top</item>
65+
<item name="android:inputType">textMultiLine|textAutoCorrect|textCapSentences</item>
66+
</style>
67+
68+
<style name="FormalSingleLineEditText" parent="EditText">
69+
<item name="android:singleLine">true</item>
70+
<item name="android:inputType">text|textAutoCorrect|textCapSentences</item>
71+
</style>
72+
5873
<style name="LoginEditText" parent="EditText">
5974
<item name="android:layout_width">match_parent</item>
6075
<item name="android:layout_height">wrap_content</item>

0 commit comments

Comments
 (0)