OSDN Git Service

ライブビューデータを拾うために検討中。その3。
authorMRSa <mrsa@myad.jp>
Fri, 3 May 2019 15:01:30 +0000 (00:01 +0900)
committerMRSa <mrsa@myad.jp>
Fri, 3 May 2019 15:01:30 +0000 (00:01 +0900)
app/src/main/java/net/osdn/gokigen/cameratest/camtest/CamTest.java
app/src/main/java/net/osdn/gokigen/cameratest/pages/TestViewFragment.java
app/src/main/res/layout/fragment_main.xml
app/src/main/res/values/dimens.xml

index fb88617..cbe97bb 100644 (file)
@@ -110,6 +110,10 @@ public class CamTest implements View.OnClickListener, ILiveViewImage
                 readImageFile("sampledata2.bin");
                 showMessageText("show 'sampledata2.bin'.");
                 break;
+            case R.id.button4:
+                readImageFile("sampledata3.bin");
+                showMessageText("show 'sampledata3.bin'.");
+                break;
             default:
                 showMessageText("Unknown : " + id);
                 break;
index 4983668..82dfb09 100644 (file)
@@ -58,9 +58,11 @@ public class TestViewFragment extends Fragment
                 Button btn1 = rootView.findViewById(R.id.button1);
                 Button btn2 = rootView.findViewById(R.id.button2);
                 Button btn3 = rootView.findViewById(R.id.button3);
+                Button btn4 = rootView.findViewById(R.id.button4);
                 btn1.setOnClickListener(testTarget);
                 btn2.setOnClickListener(testTarget);
                 btn3.setOnClickListener(testTarget);
+                btn4.setOnClickListener(testTarget);
             }
         }
         catch (Exception e)
index 47b3022..4b7ba9e 100644 (file)
         android:id="@+id/section_label"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/activity_horizontal_margin"
+        android:layout_marginStart="4dp"
         android:layout_marginTop="@dimen/activity_vertical_margin"
-        android:layout_marginEnd="@dimen/activity_horizontal_margin"
-        android:layout_marginBottom="@dimen/activity_vertical_margin"
+        android:layout_marginEnd="4dp"
+        android:layout_marginBottom="4dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="@id/constraintLayout"
         tools:layout_constraintLeft_creator="1"
     <TextView
         android:id="@+id/show_information"
         android:layout_width="wrap_content"
-        android:layout_height="22dp"
+        android:layout_height="wrap_content"
         android:layout_marginStart="8dp"
         android:layout_marginLeft="8dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="8dp"
+        android:layout_marginTop="2dp"
+        android:layout_marginEnd="2dp"
         android:layout_marginRight="8dp"
         android:text="@string/blank"
         app:layout_constraintEnd_toEndOf="parent"
@@ -38,9 +38,9 @@
         android:id="@+id/button1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="60dp"
+        android:layout_marginStart="1dp"
+        android:layout_marginLeft="2dp"
+        android:layout_marginBottom="58dp"
         android:text="@string/label_button1"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent" />
@@ -49,9 +49,9 @@
         android:id="@+id/button2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginStart="1dp"
+        android:layout_marginLeft="2dp"
+        android:layout_marginBottom="1dp"
         android:text="@string/label_button2"
         app:layout_constraintBottom_toTopOf="@id/button1"
         app:layout_constraintStart_toStartOf="parent" />
         android:id="@+id/button3"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginStart="1dp"
+        android:layout_marginLeft="2dp"
+        android:layout_marginBottom="1dp"
         android:text="@string/label_button3"
         app:layout_constraintBottom_toTopOf="@id/button2"
         app:layout_constraintStart_toStartOf="parent" />
 
+    <Button
+        android:id="@+id/button4"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="1dp"
+        android:layout_marginLeft="2dp"
+        android:layout_marginBottom="1dp"
+        android:text="@string/label_button4"
+        app:layout_constraintBottom_toTopOf="@id/button3"
+        app:layout_constraintStart_toStartOf="parent" />
+
     <ImageView
         android:id="@+id/imageView"
         android:layout_width="wrap_content"
-        android:layout_height="440dp"
+        android:layout_height="320dp"
         android:layout_marginTop="2dp"
         android:contentDescription="@string/blank"
         android:scaleType="fitCenter"
         android:id="@+id/information-view"
         android:layout_width="300dp"
         android:layout_height="150dp"
-        android:layout_marginStart="2dp"
-        android:layout_marginLeft="2dp"
-        android:layout_marginEnd="2dp"
-        android:layout_marginRight="2dp"
         android:layout_marginBottom="2dp"
         android:contentDescription="@string/blank"
         android:scaleType="fitCenter"
         android:visibility="visible"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toEndOf="@+id/button2"
         app:layout_constraintTop_toBottomOf="@+id/imageView"
-        app:layout_constraintVertical_bias="0.0" />
+        app:layout_constraintVertical_bias="0.234" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>
index cef3abc..f67923f 100644 (file)
@@ -1,7 +1,7 @@
 <resources>
     <!-- Default screen margins, per the Android Design guidelines. -->
-    <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="activity_vertical_margin">16dp</dimen>
-    <dimen name="fab_margin">16dp</dimen>
+    <dimen name="activity_horizontal_margin">4dp</dimen>
+    <dimen name="activity_vertical_margin">4dp</dimen>
+    <dimen name="fab_margin">4dp</dimen>
     <dimen name="appbar_padding_top">8dp</dimen>
 </resources>