MotionLayout动画效果实现的几种方式

news2024/9/23 15:31:38

前言

MotionLayout 的使用大家应该都会了,如果不会看这里。

本文就不科普如何使用,什么属性是什么意思,怎么使用之类的了,这里只是探讨一下 MotionLayout 效果实现的几种方式。

一、ConstraintLayout 的方式定义

我们知道 MotionLayoutConstraintLayout 库中的功能,我们可以直接使用ConstraintLayout 来定义两组不同的 ConstraintLayout 布局,使用ConstraintSet来切换不同的布局。

原始布局:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/constraint_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    app:layout_constraintVertical_bias="0.3">

    <TextView
        android:id="@+id/view_2"
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:padding="16dp"
        app:layout_constraintBottom_toBottomOf="@id/view_1"
        app:layout_constraintEnd_toEndOf="@id/view_1"
        app:layout_constraintStart_toStartOf="@id/view_1" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/view_1"
        android:layout_width="200dp"
        android:layout_height="170dp"
        android:background="@color/colorAccent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />


    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/icon"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_margin="16dp"
        android:src="@mipmap/ic_launcher_round"
        app:layout_constraintBottom_toBottomOf="@id/view_1"
        app:layout_constraintEnd_toEndOf="@id/view_1"
        app:layout_constraintTop_toTopOf="@id/view_1" />


    <View
        android:id="@+id/bottom"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="@color/colorAccent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

改变后的布局:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:background="@color/colorPrimary"
    app:layout_constraintVertical_bias="0.3"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/view_2"
        app:layout_constraintStart_toStartOf="@id/view_1"
        app:layout_constraintEnd_toEndOf="@id/view_1"
        android:layout_width="200dp"
        android:background="@android:color/white"
        android:padding="16dp"
        app:layout_constraintTop_toBottomOf="@id/view_1"
        android:layout_height="wrap_content"
        />

    <androidx.appcompat.widget.AppCompatImageView
        android:layout_width="200dp"
        android:layout_height="150dp"
        android:id="@+id/view_1"
        android:background="@color/colorAccent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>


    <androidx.appcompat.widget.AppCompatImageView
        android:layout_width="32dp"
        android:src="@mipmap/ic_launcher_round"
        android:id="@+id/icon"
        app:layout_constraintEnd_toEndOf="@id/view_1"
        app:layout_constraintTop_toBottomOf="@id/view_1"
        app:layout_constraintBottom_toBottomOf="@id/view_1"
        android:layout_margin="16dp"
        android:layout_height="32dp"/>


    <View android:layout_width="match_parent"
        android:layout_height="50dp"
        android:id="@+id/bottom"
        app:layout_constraintTop_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:background="@color/colorAccent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

使用的时候:

        val raw = ConstraintSet().apply {
            this.clone(this@Demo13JavaActivity, R.layout.activity_demo13_java)
        }

        val detail = ConstraintSet().apply {
            this.clone(this@Demo13JavaActivity, R.layout.activity_demo13_java_transform)
        }

        val constraintLayout = findViewById<ConstraintLayout>(R.id.constraint_parent)

        constraintLayout.click {
            val constraintSet = if (toggle) detail else raw
            TransitionManager.beginDelayedTransition(constraintLayout)
            constraintSet.applyTo(constraintLayout)

            toggle = !toggle
        }

效果:

需要注意的是这里的View的数量和Id需要一 一对 应 哦!

二、MotionLayout Xml 的方式定义

也就是默认的定义,最为普遍的方式,在之前的文章中有一些复杂的定义方式。

这里就以一个简单的Demo说下如何使用:

<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:background="@color/white"
   app:layoutDescription="@xml/activity_demo13_xml_scene"
   app:showPaths="true">


   <View
       android:id="@+id/button"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:background="@color/colorAccent" />


</androidx.constraintlayout.motion.widget.MotionLayout>

定义的场景xml:

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:motion="http://schemas.android.com/apk/res-auto">

   <!--  只能设置一些Constraint布局的一些专用属性 用于位置变换  -->
   <ConstraintSet android:id="@+id/start">
       <Constraint
           android:id="@+id/button"
           android:layout_width="64dp"
           android:layout_height="64dp"
           android:layout_marginStart="8dp"
           motion:layout_constraintBottom_toBottomOf="parent"
           motion:layout_constraintStart_toStartOf="parent"
           motion:layout_constraintTop_toTopOf="parent">

           <!--  可以设置自定义的属性  -->
           <CustomAttribute
               motion:attributeName="backgroundColor"
               motion:customColorValue="#D81B60" />

       </Constraint>

   </ConstraintSet>

   <ConstraintSet android:id="@+id/end">
       <Constraint
           android:id="@+id/button"
           android:layout_width="34dp"
           android:layout_height="34dp"
           android:layout_marginEnd="8dp"
           motion:layout_constraintBottom_toBottomOf="parent"
           motion:layout_constraintEnd_toEndOf="parent"
           motion:layout_constraintTop_toTopOf="parent">

           <!--  可以设置自定义的属性  -->
           <CustomAttribute
               motion:attributeName="backgroundColor"
               motion:customColorValue="#9999FF" />

       </Constraint>
   </ConstraintSet>


   <Transition
       motion:constraintSetEnd="@+id/end"
       motion:constraintSetStart="@+id/start"
       motion:duration="1000"
       motion:motionInterpolator="linear">

       <!--   点击     -->
       <OnClick
           motion:clickAction="toggle"
           motion:targetId="@+id/button" />


       <KeyFrameSet>

           <KeyAttribute
               android:rotation="-45"
               android:scaleX="2"
               android:scaleY="2"
               motion:framePosition="40"
               motion:motionTarget="@+id/button" />

           <KeyPosition
               motion:framePosition="70"
               motion:keyPositionType="parentRelative"
               motion:motionTarget="@+id/button"
               motion:percentY="0.25" />

       </KeyFrameSet>


   </Transition>

</MotionScene>

效果:

场景内部的设置涉及到关键帧位置与关键帧属性的配置,代码中都有详细的注释,大家留意即可!

三、MotionLayout 配合 AppbarLayout

封装一个自己的 MotionLayout,当 AppbarLayout 滚动的过程中监听它的完成度,设置 MotionLayout 的Progress。

自定义MotionLayout:

class MyAppbarMotionLayout @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : MotionLayout(context, attrs, defStyleAttr), AppBarLayout.OnOffsetChangedListener {

    override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) {
        val progressVal = -verticalOffset / appBarLayout?.totalScrollRange?.toFloat()!!
        YYLogUtils.w("progress:$progressVal")
        progress = progressVal

    }

    override fun onAttachedToWindow() {
        super.onAttachedToWindow()
        (parent as? AppBarLayout)?.addOnOffsetChangedListener(this)
    }
}

使用:

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


    <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:Easy_title="协同AppbarLayout" />


    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">


        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:orientation="vertical"
            app:elevation="0dp">

            <com.guadou.kt_demo.demo.demo13_motionlayout.view.MyAppbarMotionLayout
                android:id="@+id/motionLayout"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:minHeight="50dp"
                app:layoutDescription="@xml/scene_13_appbar"
                app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed">


                <ImageView
                    android:id="@+id/background"
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    android:scaleType="centerCrop"
                    android:src="@drawable/chengxiao" />

                <TextView
                    android:id="@+id/label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Cheng Xiao"
                    android:textColor="#FFFFFF"
                    android:textSize="25dp"
                    android:transformPivotX="0dp"
                    android:transformPivotY="0dp" />

            </com.guadou.kt_demo.demo.demo13_motionlayout.view.MyAppbarMotionLayout>

        </com.google.android.material.appbar.AppBarLayout>


        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/scroll_content" />

        </androidx.core.widget.NestedScrollView>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>


</LinearLayout>

定义的场景:

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:motion="http://schemas.android.com/apk/res-auto">

    <Transition
        motion:constraintSetEnd="@+id/end"
        motion:constraintSetStart="@+id/start" />

    <ConstraintSet android:id="@+id/start">
        <Constraint
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:alpha="1.0"
            motion:layout_constraintBottom_toBottomOf="parent" />

        <Constraint
            android:id="@+id/label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:rotation="-90.0"
            motion:layout_constraintBottom_toBottomOf="@+id/background"
            motion:layout_constraintLeft_toLeftOf="@id/background">

            <CustomAttribute
                motion:attributeName="textSize"
                motion:customFloatValue="25" />

            <CustomAttribute
                motion:attributeName="textColor"
                motion:customColorValue="@color/white" />

        </Constraint>
    </ConstraintSet>

    <ConstraintSet android:id="@+id/end">

        <Constraint
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:alpha="0.7"
            motion:layout_constraintBottom_toBottomOf="parent" />

        <Constraint
            android:id="@+id/label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginBottom="8dp"
            android:rotation="0.0"
            motion:layout_constraintBottom_toBottomOf="@+id/background"
            motion:layout_constraintLeft_toLeftOf="@id/background"
            motion:layout_constraintRight_toRightOf="@id/background"
            motion:layout_constraintTop_toTopOf="@id/background">

            <CustomAttribute
                motion:attributeName="textSize"
                motion:customFloatValue="18" />

            <CustomAttribute
                motion:attributeName="textColor"
                motion:customColorValue="@color/black" />

        </Constraint>

    </ConstraintSet>
</MotionScene>

这样就能实现MotionLayout 跟随 AppbarLayout的滚动做对应滚动了。

效果:

四、MotionLayout 配合 ViewPager

这样的效果和 AppbarLayout 的情况类似,当ViewPager滚动页面的时候,顶部的MotionLayout做对应的动画。

自定义MotionLayout:

class MyViewpagerMotionLayout @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : MotionLayout(context, attrs, defStyleAttr), ViewPager.OnPageChangeListener {

    override fun onPageScrollStateChanged(state: Int) {
    }

    override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
        val numPages = 3
        progress = (position + positionOffset) / (numPages - 1)
    }

    override fun onPageSelected(position: Int) {
    }

    override fun onAttachedToWindow() {
        super.onAttachedToWindow()

        val viewGroup = (parent as? ViewGroup)!!
        for (i in 0 until viewGroup.childCount) {
            val view = viewGroup.getChildAt(i)
            if (view is ViewPager) {
                view.addOnPageChangeListener(this)
                break
            }
        }

    }
}

使用的xml:

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


    <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:Easy_title="协同AppbarLayout" />


    <com.guadou.kt_demo.demo.demo13_motionlayout.view.MyViewpagerMotionLayout
        android:id="@+id/motionLayout"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        app:layoutDescription="@xml/scene_13_viewpager">


        <ImageView
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:scaleType="centerCrop"
            android:src="@drawable/chengxiao" />

        <TextView
            android:id="@+id/label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Cheng Xiao"
            android:textColor="#FFFFFF"
            android:textSize="25dp" />

    </com.guadou.kt_demo.demo.demo13_motionlayout.view.MyViewpagerMotionLayout>

    <androidx.viewpager.widget.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </androidx.viewpager.widget.ViewPager>


</LinearLayout>

场景的xml:

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:motion="http://schemas.android.com/apk/res-auto">

    <Transition
        motion:constraintSetEnd="@+id/end"
        motion:constraintSetStart="@+id/start" />


    <KeyFrameSet>

        <KeyAttribute
            motion:framePosition="50"
            motion:motionTarget="@id/label" >

            <CustomAttribute
                motion:attributeName="textSize"
                motion:customFloatValue="15" />

            <CustomAttribute
                motion:attributeName="textColor"
                motion:customColorValue="@android:color/holo_blue_light" />

        </KeyAttribute>

        <KeyPosition
            motion:framePosition="50"
            motion:keyPositionType="parentRelative"
            motion:motionTarget="@id/label"
            motion:percentY="0.15" />

    </KeyFrameSet>

    <ConstraintSet android:id="@+id/start">
        <Constraint
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:alpha="1.0"
            motion:layout_constraintBottom_toBottomOf="parent" />

        <Constraint
            android:id="@+id/label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            motion:layout_constraintBottom_toBottomOf="@+id/background"
            motion:layout_constraintLeft_toLeftOf="parent"
            motion:layout_constraintStart_toStartOf="parent"
            motion:layout_constraintTop_toTopOf="@id/background">

            <CustomAttribute
                motion:attributeName="textSize"
                motion:customFloatValue="25" />

            <CustomAttribute
                motion:attributeName="textColor"
                motion:customColorValue="@color/white" />

        </Constraint>
    </ConstraintSet>

    <ConstraintSet android:id="@+id/end">

        <Constraint
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:alpha="1.0"
            motion:layout_constraintBottom_toBottomOf="parent" />

        <Constraint
            android:id="@+id/label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            motion:layout_constraintBottom_toBottomOf="@+id/background"
            motion:layout_constraintRight_toRightOf="parent"
            motion:layout_constraintEnd_toEndOf="parent"
            motion:layout_constraintTop_toTopOf="@id/background">

            <CustomAttribute
                motion:attributeName="textSize"
                motion:customFloatValue="25" />

            <CustomAttribute
                motion:attributeName="textColor"
                motion:customColorValue="@android:color/holo_red_dark" />

        </Constraint>

    </ConstraintSet>
</MotionScene>

当ViewPager滚动的时候,设置MotionLayout的 progress 。

效果:

此效果的场景内部的设置涉及到关键帧位置与关键帧属性的配置,关键帧属性内又定义了自定义属性,大家留意!

总结

MotionLayout 可以 配合的控件很多,这里只是列出了常用的一些控件,它还能配合DrawerLayout TabLayout等。本质都是监听事件,改变 MotionLayoutProgress 值。

结合这几种常用的方式,我们就能完成大部分的页面动画效果了!

源码地址

https://gitee.com/newki123456/Kotlin-Room

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/377132.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

第三回:布局格式定方圆

import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams[font.sans-serif] [SimHei] #用来正常显示中文标签 plt.rcParams[axes.unicode_minus] False #用来正常显示负号一、子图 1. 使用 plt.subplots 绘制均匀状态下的子图 返回元素分…

ROS1学习笔记:ROS中的坐标管理系统(ubuntu20.04)

参考B站古月居ROS入门21讲&#xff1a;ROS中的坐标系管理系统 基于VMware Ubuntu 20.04 Noetic版本的环境 文章目录一、机器人中的坐标变换二、TF功能包三、小海龟跟随实验3.1 启动实验3.2 查看当前的TF树3.3 坐标相对位置可视化3.3.1 tf_echo3.3.2 rviz一、机器人中的坐标变换…

2023上半年软考,广州/东莞/深圳/江苏报班是明智的选择

软考是全国计算机技术与软件专业技术资格&#xff08;水平&#xff09;考试&#xff08;简称软考&#xff09;项目&#xff0c;是由国家人力资源和社会保障部、工业和信息化部共同组织的国家级考试&#xff0c;既属于国家职业资格考试&#xff0c;又是职称资格考试。 系统集成…

飞桨paddlenlp安装报错python setup.py egg_info did not run successfully.

原因缺少setuptools_scm 安装setuptools_scm pip install setuptools_scm 然后再安装paddlenlp就会噼里啪啦的下载一大堆东东了 下载OVER

【K8S系列】第十四讲:初识K8s架构之服务器的变迁

目录 序言 1简介 1.1 物理机时代 物理服务器的缺点 1.2 虚拟机 虚拟机优缺点 1.3 容器时代 1.4 总结 2 容器编排 2.1 什么是容器编排 序言 人生犹如一股奔流&#xff0c;没有暗礁&#xff0c;激不起美丽的浪花。 三言两语&#xff0c;不如细心探索 今天学习一下K8s…

ROS从入门到精通2-6:Rviz可视化进阶(画坐标轴、直线、平面、圆柱等)

目录0 专栏介绍1 Rviz可视化2 环境配置3 使用方法4 测试用例0 专栏介绍 本专栏旨在通过对ROS的系统学习&#xff0c;掌握ROS底层基本分布式原理&#xff0c;并具有机器人建模和应用ROS进行实际项目的开发和调试的工程能力。 &#x1f680;详情&#xff1a;《ROS从入门到精通》…

因《狂飙》张颂文,吐槽广东人比内地人聪明,周杰才是地域黑鼻祖

最近一段时间&#xff0c;电视剧《狂飙》落下帷幕&#xff0c;但是关于这部电视剧的争议&#xff0c;却从来就没有停止过。尤其是主演张颂文&#xff0c;更是受到了大家的关注&#xff0c;不但圈住了很多的粉丝&#xff0c;影视圈很多同行也对他赞许有加。 自古以来同行是冤家&…

SSM-SpringBoot(快速启动,yaml配置)

1 SpingBoot简介 1.1 创建SpringBoot项目 创建 层次 boot程序最基本的架子 开发 RestController RequestMapping("/books") public class BookController {GetMapping("/{id}")public String getById(PathVariable Integer id){System.out.println(&qu…

亚马逊云科技张文翊:云计算正成为企业数字化的“技术底座”

在走进经济筑底重启回升的2023年&#xff0c;我们该如何直面这场需要时间验证的修复之旅&#xff1f;亚马逊全球副总裁、亚马逊云科技大中华区执行董事张文翊与《经济观察报》App的“企业家说2023”栏目展开对谈&#xff0c;分享亚马逊云科技如何立于云端&#xff0c;帮助企业上…

Java及JVM简介

世界上没有最好的编程语言&#xff0c;只有最适用于具体应用场景的编程语言 懂得JVM内部的内存结构、工作机制&#xff0c;是设计高扩展性应用和诊断运行时问题的基础&#xff0c;也是Java工程师进阶的必备能力。 java介绍 java是目前应用最为广泛的软件开发平台之一。随着…

Elasticsearch:创建一个简单的 “你的意思是?” 推荐搜索

“你的意思是” 是搜索引擎中一个非常重要的功能&#xff0c;因为它们通过显示建议的术语来帮助用户&#xff0c;以便他可以进行更准确的搜索。比如&#xff0c;在百度中&#xff0c;我们进行搜索时&#xff0c;它通常会显示一些更为常用推荐的搜索选项来供我们选择&#xff1a…

MyEclipse技术全面解析——EJB开发工具介绍(二)

在上文中&#xff08;点击这里回顾>>&#xff09;&#xff0c;我们为大家介绍了MyEclipse EJB开发工具以及如何创建一个EJB项目。本文将继续讲解如何EJB 3.x项目的持久性支持&#xff0c;以及EJB项目的参数等&#xff0c;欢迎下载最新版MyEclipse体验&#xff01;MyEclip…

【JAVA程序设计】【C00106】基于SSM(非maven)的演唱会网上订票系统——有文档

【C00106】基于SSM&#xff08;非maven&#xff09;的演唱会网上订票系统——有文档项目简介项目获取开发环境项目技术运行截图项目简介 基于SSMBootstrapMYSQL演唱会网上订票系统分为二个角色&#xff1a;系统管理员、用户 管理员角色包含以下功能&#xff1a; 管理员信息、网…

taobao.user.seller.get( 查询卖家用户信息 )

&#xffe5;开放平台基础API必须用户授权 查询卖家用户信息&#xff08;只能查询有店铺的用户&#xff09; 只能卖家类应用调用。 公共参数 请求地址: HTTP地址 http://gw.api.taobao.com/router/rest 公共请求参数: 公共响应参数: 请求参数 点击获取key和secret请求示例…

华为OD机试模拟题 用 C++ 实现 - 叠放书籍(2023.Q1)

最近更新的博客 【华为OD机试模拟题】用 C++ 实现 - 最多获得的短信条数(2023.Q1)) 文章目录 最近更新的博客使用说明叠放书籍题目输入输出示例一输入输出Code使用说明 参加华为od机试,一定要注意不要完全背诵代码,需要理解之后模仿写出,通过率才会高。 华为 OD 清单…

Linux命令之lz4命令

一、lz4命令简介 LZ4是一种压缩格式&#xff0c;特点是压缩/解压缩速度超快(压缩率不如gzip)&#xff0c;如果你特别在意压缩速度&#xff0c;或者当前环境的CPU资源紧缺&#xff0c;可以考虑这种格式。lz4是一种非常快速的无损压缩算法&#xff0c;基于字节对齐LZ77系列压缩方…

Mysql 常用日期处理函数

Mysql 常用日期处理函数 1 建表语句 SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS 0; -- ---------------------------- -- Table structure for emp -- ---------------------------- DROP TABLE IF EXISTS emp; CREATE TABLE emp (EMPNO int(4) NOT NULL,ENAME varchar(10…

网络编程Socket套接字,UDP和TCP的服务器客户端程序实现

目录 一. 何为网络编程 二. Socket套接字 1. 简单认识 UDP 和 TCP 2. 基于 UDP 实现简单的客户端服务器的网络通信程序 1. 方法使用 2. 回显服务器的实现 3. 回显客户端的实现 3. 基于 UDP 实现简单的客户端服务器的网络通信程序 1. 方法使用 2. 回显服务器的实现 …

NSGA-Ⅲ源代码

NSGA-Ⅲ源代码如下&#xff0c;供大家学习和应用。该算法在梯级水电-火电的应用订阅专栏即可查看&#xff1a; 1、主函数 % % Copyright (c) 2016, Mostapha Kalami Heris & Yarpiz (www.yarpiz.com) % All rights reserved. Please read the "LICENSE" file…

【项目实战】从0开始入门JDK源码 - LinkedList源码 - 实现双端队列、队列、栈分析

一、类图分析 从 LinkedList的类图可以知道,LinkedList实现了 Deque双端队列接口 1.1 LinkedList拥有队列、双端队列的特性 Deque接口继承于 Queue接口,所以 LinkedList拥有队列、双端队列的特性; 1.2 LinkedList同时也拥有栈的特性 其次,JAVA中,有一个过时类 Stac…