mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-01-30 22:14:52 +01:00
move the note layout into a fragment file
This commit is contained in:
parent
6e6c6095de
commit
b251c21a77
@ -24,6 +24,7 @@ import com.simplemobiletools.notes.dialogs.WidgetNoteDialog
|
||||
import com.simplemobiletools.notes.extensions.getTextSize
|
||||
import com.simplemobiletools.notes.models.Note
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.fragment_note.*
|
||||
|
||||
class MainActivity : SimpleActivity() {
|
||||
private var mCurrentNote: Note? = null
|
||||
|
@ -6,50 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notes_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_note_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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_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
|
||||
android:id="@+id/notes_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/current_note_label"
|
||||
android:fillViewport="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/notes_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="top"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"/>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
<include layout="@layout/fragment_note"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/notes_fab"
|
||||
|
43
app/src/main/res/layout/fragment_note.xml
Normal file
43
app/src/main/res/layout/fragment_note.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/note_Fragment_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_note_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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_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
|
||||
android:id="@+id/notes_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/current_note_label"
|
||||
android:fillViewport="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/notes_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="top"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:padding="@dimen/activity_margin"/>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
Loading…
x
Reference in New Issue
Block a user