liuzhenxing1118 преди 8 месеца
родител
ревизия
9432316a75
променени са 2 файла, в които са добавени 62 реда и са изтрити 17 реда
  1. 1 1
      app/src/main/java/com/xplora/xpvideo/activity/MainActivity.java
  2. 61 16
      app/src/main/res/layout/activity_main.xml

+ 1 - 1
app/src/main/java/com/xplora/xpvideo/activity/MainActivity.java

@@ -79,7 +79,7 @@ public class MainActivity extends Activity implements Listener.VideoListener {
     }
 
     private void initView() {
-        mContentView = findViewById(R.id.video_bg);
+        mContentView = findViewById(R.id.layout_video);
         ImageButton acceptCancel = findViewById(R.id.acceptCancel);
         ImageButton acceptAnswer = findViewById(R.id.acceptAnswer);
 

+ 61 - 16
app/src/main/res/layout/activity_main.xml

@@ -1,35 +1,80 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="#000000"
+    >
 
     <RelativeLayout
-        android:id="@+id/video_bg"
+        android:id="@+id/layout_video"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        >
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
+        <RelativeLayout
+            android:id="@+id/layout_info"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            >
+            <ImageView
+                android:id="@+id/iconIv"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:layout_marginStart="10dp"
+                android:background="@drawable/default_avatar"
+                />
+            <TextView
+                android:id="@+id/nameTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_toEndOf="@+id/iconIv"
+                android:layout_alignTop="@+id/iconIv"
+                android:layout_marginStart="5dp"
+                android:textColor="@color/white"
+                android:textSize="12sp"
+                android:textStyle="bold"
+                android:text="nameafdsafdsa"
+                />
+            <TextView
+                android:id="@+id/descTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_toEndOf="@+id/iconIv"
+                android:layout_alignBottom="@+id/iconIv"
+                android:layout_marginStart="5dp"
+                android:textColor="@color/white"
+                android:textSize="11sp"
+                android:text="invent afdasfdsafdsa"
+                />
+        </RelativeLayout>
 
         <LinearLayout
+            android:id="@+id/layout_accept"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
             android:layout_marginBottom="20dp"
+            android:gravity="center"
             >
-
             <ImageButton
-                android:id="@+id/acceptCancel"
-                android:layout_width="68dp"
-                android:layout_height="68dp"
-                android:src="@drawable/hangup"/>
-
+                android:id="@+id/cancelBtn"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:background="@drawable/hangup"/>
             <ImageButton
-                android:id="@+id/acceptAnswer"
-                android:layout_width="68dp"
-                android:layout_height="68dp"
-                android:src="@drawable/answer"/>
-
+                android:id="@+id/answerBtn"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_marginStart="30dp"
+                android:background="@drawable/answer"
+                />
         </LinearLayout>
 
     </RelativeLayout>
-
 </RelativeLayout>