show the current notes title at the top

This commit is contained in:
tibbi 2016-10-02 12:12:50 +02:00
parent 37e031cfbf
commit fadb288ff5
6 changed files with 27 additions and 10 deletions

View File

@ -13,6 +13,7 @@ import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import com.simplemobiletools.notes.R;
import com.simplemobiletools.notes.Utils;
@ -27,6 +28,8 @@ import butterknife.OnClick;
public class MainActivity extends SimpleActivity {
@BindView(R.id.notes_view) EditText mNotesView;
@BindView(R.id.current_note_label) TextView mCurrNoteLabel;
@BindView(R.id.current_note_title) TextView mCurrNoteTitle;
private DBHelper mDb;
private Note mCurrentNote;
@ -41,6 +44,7 @@ public class MainActivity extends SimpleActivity {
mDb = DBHelper.newInstance(getApplicationContext());
mCurrentNote = mDb.getGeneralNote();
mNotesView.setText(mCurrentNote.getValue());
mCurrNoteTitle.setText(mCurrentNote.getTitle());
}
@Override

View File

@ -15,10 +15,23 @@
android:id="@+id/current_note_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_margin"
android:layout_marginBottom="@dimen/activity_margin"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginTop="@dimen/activity_margin"
android:alpha=".6"
android:text="@string/current_note"/>
<TextView
android:id="@+id/current_note_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_margin"
android:layout_marginLeft="@dimen/normal_padding"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginTop="@dimen/activity_margin"
android:layout_toRightOf="@+id/current_note_label"
android:alpha=".6"/>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/notes_scrollview"

View File

@ -15,7 +15,7 @@
android:id="@+id/settings_dark_theme_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_padding"
android:layout_marginTop="@dimen/normal_padding"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin">
@ -24,7 +24,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/settings_padding"
android:paddingLeft="@dimen/normal_padding"
android:text="@string/dark_theme"/>
<android.support.v7.widget.SwitchCompat
@ -41,10 +41,10 @@
android:id="@+id/settings_font_size_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_padding"
android:layout_marginTop="@dimen/normal_padding"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/settings_padding"
android:paddingRight="@dimen/normal_padding"
android:paddingTop="@dimen/activity_margin">
<TextView
@ -52,7 +52,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/settings_padding"
android:paddingLeft="@dimen/normal_padding"
android:text="@string/note_font_size"/>
<android.support.v7.widget.AppCompatSpinner

View File

@ -1,7 +1,7 @@
<resources>
<dimen name="social_padding">12dp</dimen>
<dimen name="social_logo">50dp</dimen>
<dimen name="settings_padding">12dp</dimen>
<dimen name="normal_padding">12dp</dimen>
<dimen name="normal_text_size">18sp</dimen>
<dimen name="config_text_size">22sp</dimen>

View File

@ -2,7 +2,7 @@
<dimen name="activity_margin">16dp</dimen>
<dimen name="social_padding">8dp</dimen>
<dimen name="social_logo">40dp</dimen>
<dimen name="settings_padding">8dp</dimen>
<dimen name="normal_padding">8dp</dimen>
<dimen name="small_text_size">12sp</dimen>
<dimen name="normal_text_size">14sp</dimen>

View File

@ -42,8 +42,8 @@
<style name="SpinnerItem.DropDownItem" parent="@android:style/Widget.TextView">
<item name="android:gravity">center_vertical</item>
<item name="android:paddingTop">@dimen/settings_padding</item>
<item name="android:paddingBottom">@dimen/settings_padding</item>
<item name="android:paddingTop">@dimen/normal_padding</item>
<item name="android:paddingBottom">@dimen/normal_padding</item>
<item name="android:paddingLeft">@dimen/activity_margin</item>
<item name="android:paddingRight">@dimen/activity_margin</item>
</style>