Refactor Java example xml widget ids to be more descriptive
Refactor Java example xml widget ids, because some of them were a bit ambiguous. Pick-to: 6.8 Change-Id: I49f6e1bb14d42859164bf12cb386b779dcaaee15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
046f2d8ba0
commit
e0b1f70e27
|
@ -53,10 +53,10 @@ public class MainActivity extends AppCompatActivity implements QtQmlStatusChange
|
|||
|
||||
m_mainLinear = findViewById(R.id.mainLinear);
|
||||
m_getPropertyValueText = findViewById(R.id.getPropertyValueText);
|
||||
m_qmlStatus = findViewById(R.id.qmlStatus);
|
||||
m_qmlStatus = findViewById(R.id.qmlStatusText);
|
||||
m_androidControlsLayout = findViewById(R.id.javaLinear);
|
||||
m_box = findViewById(R.id.box);
|
||||
m_switch = findViewById(R.id.switch1);
|
||||
m_box = findViewById(R.id.qmlColorBox);
|
||||
m_switch = findViewById(R.id.disconnectQmlListenerSwitch);
|
||||
m_switch.setOnClickListener(view -> switchListener());
|
||||
m_mainQmlComponent = new Main();
|
||||
//! [m_qmlView]
|
||||
|
@ -76,7 +76,7 @@ public class MainActivity extends AppCompatActivity implements QtQmlStatusChange
|
|||
//! [layoutParams]
|
||||
m_qtQuickView.loadComponent(m_mainQmlComponent);
|
||||
|
||||
findViewById(R.id.button).setOnClickListener(view -> onClickListener());
|
||||
findViewById(R.id.changeQmlColorButton).setOnClickListener(view -> onClickListener());
|
||||
|
||||
// Check target device orientation on launch
|
||||
handleOrientationChanges();
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/qmlStatus"
|
||||
android:id="@+id/qmlStatusText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
@ -76,7 +76,7 @@
|
|||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:id="@+id/changeQmlColorButton"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
@ -103,7 +103,7 @@
|
|||
android:textColor="@color/white" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/switch1"
|
||||
android:id="@+id/disconnectQmlListenerSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
@ -151,7 +151,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/box"
|
||||
android:id="@+id/qmlColorBox"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
|
Loading…
Reference in New Issue