首页 分享 基于安卓Android Studio宠物领养app实现

基于安卓Android Studio宠物领养app实现

来源:萌宠菠菠乐园 时间:2025-07-01 02:08

浩宇软件开发 已于 2024-11-11 10:18:08 修改

于 2024-09-29 09:54:54 首次发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

文章目录 1. 项目功能思维导图2. 项目涉及到的技术点3. 开发环境4. 项目运行效果图5. 部分功能实现过程6. 视频教程学习

1. 项目功能思维导图

请添加图片描述

2. 项目涉及到的技术点

使用MySQL数据库实现数据存储使用CountDownTimer实现启动页倒计时使用SharedPreferences实现记住密码登录使用BottomNavigationView实现底部导航栏使用Activity+Fragment实现底部导航栏页面之间切换使用RecyclerView+Adapter实现宠物信息列表使用TabLayout+ViewPager实现宠物滑动分类使用CardView卡片控件实现头像圆角使用AlertDialog实现退出登录提醒框使用springBoot搭建服务端使用okhttp实现app端和服务端数据通讯

3. 开发环境

app端

开发工具:Androidstudio开发语言:Javajdk版本:11+以上

服务端

开发工具:IDEA开发语言:Java开发框架:springBoot

web端

开发工具:Vscode开发环境:NodejsElement UI +Vue 实现框架搭建

4. 项目运行效果图

请添加图片描述请添加图片描述
请添加图片描述
在这里插入图片描述
在这里插入图片描述

5. 部分功能实现过程

底部导航栏布局activity_main.xml

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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:orientation="vertical"> <FrameLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@id/rel" /> <RelativeLayout android:id="@+id/rel" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottomNavigationView" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="100dp" app:menu="@menu/navigation" /> </RelativeLayout> <androidx.cardview.widget.CardView android:id="@+id/btn_push" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="10dp" android:backgroundTint="@color/purple_200" app:cardCornerRadius="25dp"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/baseline_add_24" /> </androidx.cardview.widget.CardView> </RelativeLayout>

xml

底部导航栏MainActivity.java实现

public class MainActivity extends BaseActivity { private HomeFragment mHomeFragment; private MineFragment mMineFragment; private BottomNavigationView bottomNavigationView; @Override protected int getLayoutId() { return R.layout.activity_main; } @Override protected void initView() { bottomNavigationView = findViewById(R.id.bottomNavigationView); bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { if (item.getItemId() == R.id.push) { startActivity(new Intent(MainActivity.this, PushActivity.class)); } else if (item.getItemId() == R.id.home) { selectedFragment(0); return true; } else { selectedFragment(2); return true; } return false; } }); } @Override protected void initListener() { findViewById(R.id.btn_push).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(MainActivity.this, PushActivity.class)); } }); } @Override protected void initData() { selectedFragment(0); } private void selectedFragment(int position) { FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); hideFragment(fragmentTransaction); if (position == 0) { if (mHomeFragment == null) { mHomeFragment = new HomeFragment(); fragmentTransaction.add(R.id.content, mHomeFragment); } else { fragmentTransaction.show(mHomeFragment); } } else if (position == 2) { if (mMineFragment == null) { mMineFragment = new MineFragment(); fragmentTransaction.add(R.id.content, mMineFragment); } else { fragmentTransaction.show(mMineFragment); } } //提交 fragmentTransaction.commit(); } private void hideFragment(FragmentTransaction fragmentTransaction) { if (mHomeFragment != null) { fragmentTransaction.hide(mHomeFragment); } if (mMineFragment != null) { fragmentTransaction.hide(mMineFragment); } } }

java

运行

6. 视频教程学习

Androidstudio底部导航栏实现: https://www.bilibili.com/video/BV1MQ4y1H7wM/?spm_id_from=333.337.search-card.all.click&vd_source=984bb03f768809c7d33f20179343d8c8

Android安卓项目目录介绍,如何正确运行Android项目: https://blog.csdn.net/jky_yihuangxing/article/details/141933510

springBoot项目目录介绍,如何启动springBoot项目: https://blog.csdn.net/jky_yihuangxing/article/details/141926182

相关知识

android studio安卓花店宠物水果蔬菜商城源码大作业成品sqlite期末作品
基于android的宠物app
基于Android Studio 萌宠乐园App(宠物领养、宠物寻找)—原创
基于安卓android的流浪猫狗救助领养APP
android studio宠物app
基于安卓APP的宠物管理系统设计与实现
基于springboot实现的原生Andriod宠物救助领养app【源码+文档+远程】
基于android的宠物领养系统(Android studio毕业设计+Adroid课程设计+mysql)
安卓动物购物领养社区 领养app 宠物领养 全套视频教程 手把手教程
[计算机毕业设计]基于安卓的宠物领养app

网址: 基于安卓Android Studio宠物领养app实现 https://www.mcbbbk.com/newsview1194205.html

所属分类:萌宠日常
上一篇: 宠物领养指南:如何找到你的理想伴
下一篇: [附源码+数据库+毕业论文+开题

推荐分享