Skip to content

Commit

Permalink
Add textCapSentences flag to inputType attribute
Browse files Browse the repository at this point in the history
Closes issue #112
  • Loading branch information
kevinsawicki committed Jul 13, 2012
1 parent b7b7c41 commit b3c56b8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
4 changes: 1 addition & 3 deletions app/res/layout/comment_create.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@

<EditText
android:id="@+id/et_comment"
style="@style/EditText"
style="@style/FormalMultiLineEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="@id/v_header_separator"
android:layout_margin="10dp"
android:gravity="top"
android:hint="@string/comment_hint"
android:inputType="textMultiLine|textAutoCorrect"
android:scrollbars="horizontal|vertical" >

<requestFocus />
Expand Down
7 changes: 2 additions & 5 deletions app/res/layout/gist_create.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@

<EditText
android:id="@+id/et_gist_description"
style="@style/EditText"
style="@style/FormalSingleLineEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/gist_description_hint"
android:inputType="text|textAutoCorrect"
android:singleLine="true" />
android:hint="@string/gist_description_hint" />

<TextView
style="@style/HeaderTitleText"
Expand Down
12 changes: 3 additions & 9 deletions app/res/layout/issue_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@

<EditText
android:id="@+id/et_issue_title"
style="@style/EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text|textAutoCorrect"
android:singleLine="true" />
style="@style/FormalSingleLineEditText"
android:layout_width="match_parent" />

<TextView
style="@style/HeaderTitleText"
Expand Down Expand Up @@ -125,11 +122,8 @@

<EditText
android:id="@+id/et_issue_body"
style="@style/EditText"
style="@style/FormalMultiLineEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top"
android:inputType="textMultiLine|textAutoCorrect"
android:minLines="5"
android:scrollbars="horizontal|vertical" />
</LinearLayout>
Expand Down
19 changes: 17 additions & 2 deletions app/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="Global">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>

<style name="AvatarActionBar">
<item name="android:layout_width">28dp</item>
Expand Down Expand Up @@ -47,14 +52,24 @@
<item name="android:divider">@null</item>
</style>

<style name="EditText">
<style name="EditText" parent="Global">
<item name="android:textColor">@color/text</item>
<item name="android:textCursorDrawable">@drawable/edit_text_cursor</item>
<item name="android:textSize">14sp</item>
<item name="android:padding">10dp</item>
<item name="android:background">@drawable/edit_text_background</item>
</style>

<style name="FormalMultiLineEditText" parent="EditText">
<item name="android:gravity">top</item>
<item name="android:inputType">textMultiLine|textAutoCorrect|textCapSentences</item>
</style>

<style name="FormalSingleLineEditText" parent="EditText">
<item name="android:singleLine">true</item>
<item name="android:inputType">text|textAutoCorrect|textCapSentences</item>
</style>

<style name="LoginEditText" parent="EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
Expand Down

0 comments on commit b3c56b8

Please sign in to comment.