Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
check list text size
important info text size
important info item focuses keyboard
about text is in center

resolves #38
  • Loading branch information
Alex authored and aaronj1335 committed Aug 18, 2016
1 parent cbf24ad commit 67a867a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import android.widget.EditText;

import com.g11x.checklistapp.data.Database;

Expand All @@ -44,8 +45,17 @@ public void onClick(View view) {
});
}

@Override
protected void onStart() {
super.onStart();

EditText editText = (EditText)findViewById(R.id.title);
editText.requestFocus();
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
}

private void onClickCreate() {
TextView title = (TextView) findViewById(R.id.title);
EditText title = (EditText) findViewById(R.id.title);
String titleText = title.getText().toString();
Intent intent = new Intent(this, ImportantInformationActivity.class);
intent.putExtra("title", titleText);
Expand Down
71 changes: 41 additions & 30 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,53 @@
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context="com.g11x.checklistapp.AboutActivity">

<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/app_name"
android:textStyle="bold"
android:textSize="24sp"
android:id="@+id/textView"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/main_content"
app:layout_constraintTop_toTopOf="@+id/main_content"
app:layout_constraintRight_toRightOf="@+id/main_content"
app:layout_constraintBottom_toBottomOf="@+id/main_content"/>
app:layout_constraintVertical_bias="0.5">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="@+id/all_code_copy_google"
android:text="@string/about_text"
android:background="@android:color/transparent"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
app:layout_constraintTop_toBottomOf="@+id/textView"
android:layout_marginTop="16dp"
app:layout_constraintRight_toRightOf="@+id/main_content"/>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/main_content"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
app:layout_constraintRight_toRightOf="@+id/main_content"
app:layout_constraintTop_toTopOf="@+id/main_content"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/apache_license_link"
android:text="@string/apache_license_link"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
app:layout_constraintTop_toBottomOf="@+id/all_code_copy_google"
android:layout_marginTop="16dp"
app:layout_constraintRight_toRightOf="@+id/main_content"/>
<TextView
android:id="@+id/all_code_copy_google"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@android:color/transparent"
android:ems="10"
android:gravity="center"
android:text="@string/about_text"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
app:layout_constraintRight_toRightOf="@+id/main_content"
app:layout_constraintTop_toBottomOf="@+id/textView"/>

<TextView
android:id="@+id/apache_license_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/apache_license_link"
app:layout_constraintLeft_toLeftOf="@+id/main_content"
app:layout_constraintRight_toRightOf="@+id/main_content"
app:layout_constraintTop_toBottomOf="@+id/all_code_copy_google"/>
</LinearLayout>


</android.support.constraint.ConstraintLayout>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/layout/activity_important_information.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
android:id="@+id/activity_important_information"
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"
tools:context="com.g11x.checklistapp.ImportantInformationActivity"
android:orientation="horizontal">

Expand Down
34 changes: 0 additions & 34 deletions app/src/main/res/layout/fragment_dummy.xml

This file was deleted.

3 changes: 2 additions & 1 deletion app/src/main/res/layout/view_checklist_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

<TextView
android:id="@+id/info_text"
android:padding="20dp"
android:padding="14dp"
android:textSize="18sp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
4 changes: 3 additions & 1 deletion app/src/main/res/layout/view_important_information_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@
<TextView
android:id="@+id/data"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:padding="14dp"
android:textSize="18sp"/>
</LinearLayout>

0 comments on commit 67a867a

Please sign in to comment.