全国免费服务热线:

18982081108
✕

成都弹性云服务器,成都高防云服务器,互联网数据服务,成都祈钰瑶

Android实现QQ图片说说照片选择效果-创新互联

本文实例为大家分享了Android实现QQ图片说说照片选择的具体代码,供大家参考,具体内容如下

从网站建设到定制行业解决方案,为提供做网站、网站建设服务体系,各种行业企业客户提供网站建设解决方案,助力业务快速发展。创新互联建站将不断加快创新步伐,提供优质的建站服务。

效果展示

Android实现QQ图片说说照片选择效果布局文件

布局是很简单的,一个GridView,直接上布局:


layout/activity_add_photo.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:orientation="vertical">

 <RelativeLayout
  android:layout_width="match_parent"
  android:layout_height="60dp"
  android:background="#00BB9C">

  <TextView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_centerInParent="true"
   android:text="写动态"
   android:textAppearance="?android:attr/textAppearanceLarge"
   android:textColor="@android:color/white" />

  <TextView
   android:id="@+id/send"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_alignParentRight="true"
   android:layout_centerVertical="true"
   android:layout_marginRight="10dp"
   android:text="发送"
   android:textAppearance="?android:attr/textAppearanceLarge"
   android:textColor="@android:color/white" />

 </RelativeLayout>

 <LinearLayout
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_margin="16dp"
  android:orientation="vertical">

  <EditText
   android:layout_width="match_parent"
   android:layout_height="100dp"
   android:enabled="false"
   android:focusable="false"
   android:gravity="top"
   android:hint="分享您的那点新鲜事儿..."
   android:maxLines="5" />

  <LinearLayout
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:padding="5dp">

   <GridView
    android:id="@+id/gridview"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:numColumns="4" />

  </LinearLayout>  

 </LinearLayout>

</LinearLayout>