Text field types to capitalize sentences…

device-2018-09-10-130014

I recently received a comment from a Just Notes user about how much they loved the simplicity of the notes app. However, they also pointed out that the text field that you type into doesn’t automatically capitalize sentences or names, and somewhat lacks a bit in terms of use.

He was right.

I typically use this for typing grocery lists, and things that don’t turn out to be complete sentences. So I noticed, but it didn’t really matter to me. I realize that others may use it differently, so I wanted to fix this.

So I did.

You can check out the commit here, where I updated to the target api of 26 (per Google’s requirements to be listed on the Play Store now – *sigh*) and changed the text field type. Here is the only thing that actually changed in my app, from this:

android:inputType=”textMultiLine”

to this:

android:inputType=”textCapSentences|textAutoCorrect|textAutoComplete|textMultiLine” />

And that’s it. That makes it work with auto correct, auto complete, and to capitalize sentences!

Linux – keep it simple.

JustNotes – when your notes are too long to read!

A user of my open source app, JustNotes, made an interesting observation… if your note gets too long, you can’t read it because it goes below the keyboard and you can’t scroll it upward. You can read the bug tracker issue on my GitHub for the full story. This is a really great point. I guess I had always thought of using this app for small, short notes, but it is conceivable to make a list or note that was longer than the top half of your screen.

Fortunately, I’ve progressed a bit in my programming skills since then, so I was able to fix it in about ten minutes. Essentially, I just added a scroll field for the text, like so:

justnotes_gif

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_writenote"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.alaskalinuxuser.justnotes.writenote"
    tools:showIn="@layout/activity_writenote">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="top|center"
        android:orientation="vertical">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:inputType="textMultiLine"
        android:ems="10"
        android:gravity="top|left"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:id="@+id/multiTextView" />

    </LinearLayout>
    </ScrollView>

</RelativeLayout>

As you can see, I just implemented a ScrollView around the LinearLayout. Simple. Functional. Just the way I like it!

Linux – keep it simple.

Just letting the user know…

When making apps, I have begun to realize that I don’t do a very good job of creating intuitive and informative interfaces. The fact that the user his the export button doesn’t really tell the Just Notes app user that they actually did anything, or that notes were exported. That is why I added this commit:

https://github.com/alaskalinuxuser/app_justnotes/commit/9162b2bb87c46574765ced7b4a7f9b8ff223756f

Essentially, I created a pop up (called a toast) that tells the user their notes were, in fact, exported. Something I probably should have done a long time ago!

Linux – keep it simple.