Skip to content

Commit a5c1cae

Browse files
committed
Display Field Cell Update
1 parent ebdceb2 commit a5c1cae

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

app/src/main/java/com/quemb/qmbform/sample/controller/SampleAnnotationFormFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void onViewCreated(View view, Bundle savedInstanceState) {
6969
super.onViewCreated(view, savedInstanceState);
7070

7171
Entry entry = new Entry();
72+
entry.display = "Its me";
7273
entry.title = "Hello";
7374
entry.description = "World";
7475
entry.date = new Date();

app/src/main/java/com/quemb/qmbform/sample/model/Entry.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
*/
1515
public class Entry implements FormElementDelegate {
1616

17+
@FormElement(
18+
label = R.string.lb_display,
19+
rowDescriptorType = RowDescriptor.FormRowDescriptorTypeDetail,
20+
sortId = 0,
21+
section = R.string.section_general
22+
)
23+
public String display;
24+
1725
@FormElement(
1826
label = R.string.lb_title,
1927
rowDescriptorType = RowDescriptor.FormRowDescriptorTypeText,

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<string name="lb_multi_value">Multiple Value</string>
1818
<string name="section_multiValue">Multiple Value</string>
1919
<string name="lb_add_new_tag">Add new tag</string>
20+
<string name="lb_display">Display</string>
2021

2122
</resources>

lib/QMBForm/src/main/res/layout/detail_text_field_cell.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99

1010
<TextView
11-
android:layout_width="0dp"
11+
android:layout_marginBottom="6dp"
1212
android:layout_height="wrap_content"
13-
android:layout_weight="1"
13+
android:layout_width="wrap_content"
1414
android:id="@+id/textView"/>
1515

1616
<TextView

0 commit comments

Comments
 (0)