iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >Android实现第三方登录的上拉展开,下拉隐藏,下拉隐藏示例
  • 130
分享到

Android实现第三方登录的上拉展开,下拉隐藏,下拉隐藏示例

android下拉展开第三 2023-05-31 14:05:49 130人浏览 安东尼
摘要

Android的UI和交互是很重要的一部分,直接影响到用户对软件的体验。随着项目经验的积累,发现Android中动画的运用越来越重要。本篇文章抽出了项目登录界面中实现的第三方登录,用户可以上拉展开,下拉隐藏第三方登录这么一个效果,提高用户和

Android的UI和交互是很重要的一部分,直接影响到用户对软件的体验。随着项目经验的积累,发现Android中动画的运用越来越重要。本篇文章抽出了项目登录界面中实现的第三方登录,用户可以上拉展开,下拉隐藏第三方登录这么一个效果,提高用户和软件的交互性。

实现效果:

Android实现第三方登录的上拉展开,下拉隐藏,下拉隐藏示例

(1)activity_main.xml

<?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"   tools:context="com.example.propertyanimation.MainActivity">    <RelativeLayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_alignParentBottom="true"     android:orientation="vertical">      <RelativeLayout       android:id="@+id/re_ControlshowhideView"       android:layout_width="match_parent"       android:layout_height="wrap_content"       android:layout_marginBottom="10dp"       android:orientation="vertical">        <RelativeLayout         android:id="@+id/re_showarrowhead"         android:layout_width="match_parent"         android:layout_height="wrap_content">          <View           android:layout_width="match_parent"           android:layout_height="0.1dp"           android:layout_marginLeft="12dp"           android:layout_marginRight="12dp"           android:layout_marginTop="17dip"           android:background="#dadada" />          <ImageView           android:id="@+id/arrowhead"           android:layout_width="30dip"           android:layout_height="30dip"           android:layout_centerInParent="true"           android:src="@drawable/jiantoubelow" />        </RelativeLayout>        <TextView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_below="@id/re_showarrowhead"         android:layout_marginTop="10dp"         android:gravity="center"         android:text="-其他登录方式-" />      </RelativeLayout>      <RelativeLayout       android:id="@+id/showhideView"       android:layout_width="match_parent"       android:layout_height="wrap_content"       android:layout_below="@id/re_ControlshowhideView"       android:gravity="center"       android:visibility="Gone"       android:orientation="vertical">        <Button         android:id="@+id/btn_qq"         android:layout_width="40dp"         android:layout_height="57.5dp"         android:layout_gravity="center_vertical"         android:layout_marginLeft="10dp"         android:background="@drawable/qqlogin"         android:clickable="true"         android:gravity="center"         android:paddingLeft="10dp"         android:textSize="16sp" />        <Button         android:id="@+id/btn_weixin"         android:layout_width="40dp"         android:layout_height="57.5dp"         android:layout_gravity="center_vertical"         android:layout_marginLeft="10dp"         android:layout_toRightOf="@+id/btn_qq"         android:background="@drawable/weixinlogin"         android:clickable="true"         android:gravity="center"         android:paddingLeft="10dp"         android:textSize="16sp" />     </RelativeLayout>    </RelativeLayout>    </RelativeLayout> 

--结束END--

本文标题: Android实现第三方登录的上拉展开,下拉隐藏,下拉隐藏示例

本文链接: https://www.lsjlt.com/news/226197.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作