【Android】ViewPager的使用

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"><applicationandroid:allowBackup="true"android:dataExtractionRules="@xml/data_extraction_rules"android:fullBackupContent="@xml/backup_rules"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:roundIcon="@mipmap/ic_launcher_round"android:supportsRtl="true"android:theme="@style/AppTheme"tools:targetApi="31"><activityandroid:name=".MainActivity"android:exported="true"android:launchMode="singleTop"android:taskAffinity=""android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"android:hardwareAccelerated="true"android:windowSoftInputMode="adjustResize"android:background="@android:color/white"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application></manifest>

MainActivity.java

import android.os.Bundle;
import android.util.Log;
import android.widget.RadioButton;
import android.widget.RadioGroup;import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;import com.cib.myapplication.adapters.AppFragmentPagerAdapter;
import com.cib.myapplication.fragments.HomeFragment;
import com.cib.myapplication.fragments.MyFragment;
import com.cib.myapplication.fragments.WalletFragment;
import com.cib.myapplication.fragments.WealthFragment;
import com.cib.myapplication.widgets.CustomRadioButton;
import com.cib.myapplication.widgets.CustomViewPager;import java.util.ArrayList;public class MainActivity extends AppCompatActivity {public CustomViewPager mViewPager;private RadioGroup mainTab;private ArrayList<Fragment> mainFraments = new ArrayList<>();private ArrayList<RadioButton> tabBars = new ArrayList<>();public HomeFragment homePageFragment;public WealthFragment wealthFragment;public WalletFragment walletFragment;public MyFragment myFragment;private AppFragmentPagerAdapter mAdapter;public static CustomRadioButton homeBar, wealthBar, walletBar, accountBar;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);EdgeToEdge.enable(this);setContentView(R.layout.activity_main);ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);return insets;});//findmViewPager = findViewById(R.id.activity_content);mainTab = findViewById(R.id.main_tab_views);//find tab barhomeBar = this.findViewById(R.id.bottom_bar_home);wealthBar = this.findViewById(R.id.bottom_bar_wealth);walletBar = this.findViewById(R.id.bottom_bar_wallet);accountBar = this.findViewById(R.id.bottom_bar_account);tabBars.add(homeBar);tabBars.add(wealthBar);tabBars.add(walletBar);tabBars.add(accountBar);//view pagerhomePageFragment = new HomeFragment();wealthFragment = new WealthFragment();walletFragment = new WalletFragment();myFragment = new MyFragment();mainFraments.add(homePageFragment);mainFraments.add(wealthFragment);mainFraments.add(walletFragment);mainFraments.add(myFragment);mAdapter = new AppFragmentPagerAdapter(getSupportFragmentManager(), mainFraments);mViewPager.setAdapter(mAdapter);mainTab.setOnCheckedChangeListener((group, checkedId) -> {int index = group.indexOfChild(group.findViewById(checkedId));Log.d("'QDLog'", "index " + index);mViewPager.setCurrentItem(index);});ViewPager.OnPageChangeListener listener = new ViewPager.OnPageChangeListener() {@Overridepublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}@Overridepublic void onPageSelected(int position) {int currentItem = mViewPager.getCurrentItem();tabBars.get(currentItem).setChecked(true);}@Overridepublic void onPageScrollStateChanged(int state) {}};mViewPager.addOnPageChangeListener(listener);}
}

AppFragmentPagerAdapter.java


import android.view.ViewGroup;import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.fragment.app.FragmentTransaction;import java.util.ArrayList;
import java.util.List;/*** 實現Fragment ViewPager適配器,用于App主體4個TAB頁滑動切換*/
public class AppFragmentPagerAdapter extends FragmentStatePagerAdapter {private List<Fragment> mFragmentList = new ArrayList<>();private FragmentManager fm;public AppFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragmentList) {super(fm);this.fm = fm;this.mFragmentList.addAll(fragmentList);}@Overridepublic Fragment getItem(int position) {return mFragmentList == null ? null : mFragmentList.get(position);}@Overridepublic int getCount() {return mFragmentList == null ? 0 : mFragmentList.size();}@Overridepublic void destroyItem(ViewGroup container, int position, Object object) {// 保證ViewPager切換過程中,page不會被銷毀// super.destroyItem(container, position, object);}public int getItemPosition(Object object) {return POSITION_NONE;}@Overridepublic Object instantiateItem(ViewGroup container, int position) {return super.instantiateItem(container, position);}public void setFragmentList(List<Fragment> fragmentList) {this.mFragmentList.clear();this.mFragmentList.addAll(fragmentList);notifyDataSetChanged();}public void clearFragment() {if (this.mFragmentList != null) {FragmentTransaction fragmentTransaction = fm.beginTransaction();for (Fragment f : this.mFragmentList) {fragmentTransaction.remove(f);}fragmentTransaction.commit();fm.executePendingTransactions();}}
}

HomeFragment.java

import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;import com.cib.myapplication.R;public class HomeFragment extends Fragment {@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {return inflater.inflate(R.layout.fragment_home, container, false);}
}

CustomRadioButton.java


import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;import androidx.appcompat.widget.AppCompatRadioButton;import com.cib.myapplication.R;/*** 自定義底部Button*/
public class CustomRadioButton extends AppCompatRadioButton {private int mDrawableSize; // XML文件中設置的大小public CustomRadioButton(Context context) {this(context, null, 0);}public CustomRadioButton(Context context, AttributeSet attrs) {this(context, attrs, 0);}public CustomRadioButton(Context context, AttributeSet attrs, int defStyle) {super(context, attrs, defStyle);Drawable drawableLeft = null, drawableTop = null, drawableRight = null, drawableBottom = null;TypedArray tArray = context.obtainStyledAttributes(attrs, R.styleable.CustomRadioButton);mDrawableSize = tArray.getDimensionPixelSize(R.styleable.CustomRadioButton_drawablesize, 50);drawableTop = tArray.getDrawable(R.styleable.CustomRadioButton_drawabletop);drawableBottom = tArray.getDrawable(R.styleable.CustomRadioButton_drawableBottom);
//        int attrCount = tArray.getIndexCount();
//        for (int i = 0; i < attrCount; i++) {
//            int attr = tArray.getIndex(i);
//            switch (attr) {
//                case R.styleable.CustomRadioButton_drawablesize:
//                    mDrawableSize = tArray.getDimensionPixelSize(R.styleable.CustomRadioButton_drawablesize, 50);
                    Log.d("appfw", "mDrawableSize:" + mDrawableSize);
//                    break;
//                case R.styleable.CustomRadioButton_drawabletop:
//                    drawableTop = tArray.getDrawable(attr);
//                    break;
//                case R.styleable.CustomRadioButton_drawableBottom:
//                    drawableBottom = tArray.getDrawable(attr);
//                    break;
//                default:
//                    break;
//            }
//        }tArray.recycle();setCompoundDrawablesWithIntrinsicBounds(drawableLeft, drawableTop, drawableRight, drawableBottom);}public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom) {if (left != null) {left.setBounds(0, 0, mDrawableSize, mDrawableSize);}if (right != null) {right.setBounds(0, 0, mDrawableSize, mDrawableSize);}if (top != null) {top.setBounds(0, 0, mDrawableSize, mDrawableSize);}if (bottom != null) {bottom.setBounds(0, 0, mDrawableSize, mDrawableSize);}setCompoundDrawables(left, top, right, bottom);}}

CustomViewPager.java


import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;import androidx.viewpager.widget.ViewPager;public class CustomViewPager extends ViewPager {public CustomViewPager(Context context) {super(context);}public CustomViewPager(Context context, AttributeSet attrs) {super(context, attrs);}@Overridepublic boolean onInterceptTouchEvent(MotionEvent ev) {try {return super.onInterceptTouchEvent(ev);} catch (Exception ex) {ex.printStackTrace();}return false;}@Overridepublic boolean onTouchEvent(MotionEvent ev) {try {return super.onTouchEvent(ev);} catch (Exception ex) {ex.printStackTrace();}return false;}
}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:id="@+id/main"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@color/white"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><!-- App5.0為支持劃動切換頁面變更Content view為ViewPager--><com.cib.myapplication.widgets.CustomViewPagerandroid:id="@+id/activity_content"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@color/white" /><!-- 自定義標簽欄 --><includeandroid:id="@+id/main_tab_views"layout="@layout/bottom_bar_ver5"android:layout_width="match_parent"android:layout_height="50dp"android:layout_alignParentBottom="true" /><RelativeLayoutandroid:id="@+id/rl_older_layout"android:layout_width="match_parent"android:layout_height="56dp"android:layout_alignParentBottom="true"><Viewandroid:layout_width="match_parent"android:layout_height="1px"android:layout_alignParentBottom="true"android:layout_marginBottom="55dp"android:background="@color/devideline_bg" /></RelativeLayout></RelativeLayout><!--    <include--><!--        layout="@layout/bindkeyboard_num"--><!--        android:visibility="gone" />--><!--    <com.cib.qdzg.widgets.NumKeyBoard--><!--        android:id="@+id/num_keyboard_index"--><!--        android:layout_width="match_parent"--><!--        android:layout_height="match_parent"--><!--        android:visibility="gone" />--><!--    <include--><!--        layout="@layout/input"--><!--        android:visibility="gone" />--><!--            <ImageView--><!--                android:id="@+id/iv_advertPic"--><!--                android:layout_width="wrap_content"--><!--                android:layout_height="wrap_content"--><!--                android:visibility="gone" />--></FrameLayout>

bottom_bar_ver5.xml

<?xml version="1.0" encoding="utf-8"?>
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"xmlns:radio="http://schemas.android.com/apk/res-auto"android:id="@+id/main_tab"android:layout_width="match_parent"android:layout_height="50dp"android:background="@color/white"android:orientation="horizontal"><com.cib.myapplication.widgets.CustomRadioButtonandroid:id="@+id/bottom_bar_home"style="@style/bottom_bar_item"android:checked="true"android:text="@string/tabbar_home_title"radio:drawablesize="20dp"radio:drawabletop="@drawable/bottom_bar_home_ver5" /><com.cib.myapplication.widgets.CustomRadioButtonandroid:id="@+id/bottom_bar_wealth"style="@style/bottom_bar_item"android:text="@string/tabbar_wealth_title"radio:drawablesize="20dp"radio:drawabletop="@drawable/bottom_bar_wealth_ver5" /><com.cib.myapplication.widgets.CustomRadioButtonandroid:id="@+id/bottom_bar_wallet"style="@style/bottom_bar_item"android:text="@string/tabbar_wallet_title"radio:drawablesize="20dp"radio:drawabletop="@drawable/bottom_bar_wallet_ver5" /><com.cib.myapplication.widgets.CustomRadioButtonandroid:id="@+id/bottom_bar_account"style="@style/bottom_bar_item"android:text="@string/tabbar_account_title"radio:drawablesize="20dp"radio:drawabletop="@drawable/bottom_bar_account_ver5" /></RadioGroup>

fragment_home.xml,fragment_my.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:gravity="center"android:orientation="vertical"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Home Page"android:textSize="24sp"/>
</LinearLayout>

colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources><color name="purple_200">#FFBB86FC</color><color name="purple_500">#FF6200EE</color><color name="purple_700">#FF3700B3</color><color name="teal_200">#FF03DAC5</color><color name="teal_700">#FF018786</color><color name="black">#FF000000</color><color name="white">#FFFFFFFF</color><color name="bottom_bar_text_normal">#555555</color><color name="bottom_bar_text_checked">#5047FF</color><color name="transparent">#00000000</color><color name="devideline_bg">#E5E5E5</color>
</resources>

strings.xml

<resources><string name="app_name">MyApplication</string><string name="tabbar_home_title">首頁</string><string name="tabbar_wealth_title">財富</string><string name="tabbar_scan_title">掃一掃</string><string name="tabbar_wallet_title">錢包</string><string name="tabbar_account_title">我的</string>
</resources>

styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources><declare-styleable name="CustomRadioButton"><attr name="drawablesize" format="dimension" /><attr name="drawabletop" format="reference" /><attr name="drawableBottom" format="reference" /></declare-styleable><!-- Bottom start --><style name="bottom_bar_item"><item name="android:textSize">12sp</item><item name="android:textColor">@drawable/bottom_bar_text_color</item><item name="android:layout_width">fill_parent</item><item name="android:layout_height">fill_parent</item><item name="android:layout_weight">1</item><item name="android:gravity">center</item><item name="android:paddingTop">5dp</item><item name="android:paddingBottom">5dp</item><item name="android:drawablePadding">1.0dip</item><item name="android:button">@null</item><item name="android:background">@null</item><item name="android:clickable">true</item></style>
</resources>

themes.xml

<resources xmlns:tools="http://schemas.android.com/tools"><!-- Base application theme. --><style name="AppTheme" parent="BaseTheme"></style><style name="BaseTheme" parent="Theme.MaterialComponents.Light.NoActionBar"><item name="android:windowNoTitle">true</item><item name="android:windowFullscreen">true</item><item name="android:windowTranslucentNavigation">true</item><item name="android:windowTranslucentStatus">true</item><item name="android:windowDrawsSystemBarBackgrounds">false</item><item name="android:windowBackground">@drawable/bg_splash_layer</item></style>
</resources>

在這里插入圖片描述

demo download:
demo

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/71740.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/71740.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/71740.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

京東廣告基于 Apache Doris 的冷熱數據分層實踐

一、背景介紹 京東廣告圍繞Apache Doris建設廣告數據存儲服務&#xff0c;為廣告主提供實時廣告效果報表和多維數據分析服務。歷經多年發展&#xff0c;積累了海量的廣告數據&#xff0c;目前系統總數據容量接近1PB&#xff0c;數據行數達到18萬億行&#xff0c;日查詢請求量8…

Windows PyCharm的python項目移動存儲位置后需要做的變更

項目使用的venv虛擬環境&#xff0c;因此項目移動存儲位置后需要重新配置python解釋器的位置&#xff0c;否則無法識別&#xff0c;若非虛擬環境中運行&#xff0c;則直接移動后打開即可&#xff0c;無需任何配置。 PyCharm版本為2021.3.3 (Professional Edition)&#xff0c;其…

前后端對接

前端與后端的對接主要通過 接口 進行數據交互&#xff0c;具體流程和方式如下&#xff1a; 1. 明確需求與接口定義 前后端協商&#xff1a;確定需要哪些接口、接口的功能、請求參數和返回格式。接口文檔&#xff1a;使用工具&#xff08;如 Swagger、Postman、Apifox&#xff…

簡識MQ之Kafka、ActiveMQ、RabbitMQ、RocketMQ傳遞機制

四種主流消息隊列&#xff08;Kafka、ActiveMQ、RabbitMQ、RocketMQ&#xff09;的生產者與消費者傳遞信息的機制說明&#xff0c;以及實際使用中的注意事項和示例&#xff1a; 1. Apache Kafka 傳遞機制 模型&#xff1a;基于 發布-訂閱模型&#xff0c;生產者向 主題&#…

Websocket——心跳檢測

1. 前言&#xff1a;為什么需要心跳機制&#xff1f; 在現代的實時網絡應用中&#xff0c;保持客戶端和服務端的連接穩定性是非常重要的。尤其是在長時間的網絡連接中&#xff0c;存在一些異常情況&#xff0c;導致服務端無法及時感知到客戶端的斷開&#xff0c;可能造成不必要…

tailwindcss 前端 css 框架 無需寫css 快速構建頁面

版本&#xff1a;VUE3 TS 框架 vite 文章中使用tailwindcss 版本&#xff1a; ^3.4.17 簡介&#xff1a; Tailwind CSS 一個CSS 框架&#xff0c;提供組件化的樣式&#xff0c;直接在HTML 中編寫樣式&#xff0c;無需額外自定義CSS &#xff0c;快速&#xff01; 簡潔&#…

MFC開發:如何創建第一個MFC應用程序

文章目錄 一、概述二、MFC 的主要組件三、創建一個MFC窗口四、控件綁定消息函數 一、概述 MFC 是微軟提供的一個 C 類庫&#xff0c;用于簡化 Windows 應用程序的開發。它封裝了 Windows API&#xff0c;提供面向對象的接口&#xff0c;幫助開發者更高效地創建圖形用戶界面&am…

【Git版本控制器】第四彈——分支管理,合并沖突,--no-ff,git stash

&#x1f381;個人主頁&#xff1a;我們的五年 &#x1f50d;系列專欄&#xff1a;Linux網絡編程 &#x1f337;追光的人&#xff0c;終會萬丈光芒 &#x1f389;歡迎大家點贊&#x1f44d;評論&#x1f4dd;收藏?文章 ? 相關筆記&#xff1a; https://blog.csdn.net/djd…

AI助力小微企業技術開發規范化管理 | 雜談

AI助力小微企業技術開發規范化管理 在小型技術研發企業中&#xff0c;人員配置緊張&#xff0c;往往一名員工需要承擔多項職務和任務。例如&#xff0c;后端程序開發人員可能同時要負責需求調研、數據庫設計、后端設計及開發&#xff0c;甚至在某些情況下還需兼任架構師的角色。…

SpringBoot+Vue+微信小程序的貓咖小程序平臺(程序+論文+講解+安裝+調試+售后)

感興趣的可以先收藏起來&#xff0c;還有大家在畢設選題&#xff0c;項目以及論文編寫等相關問題都可以給我留言咨詢&#xff0c;我會一一回復&#xff0c;希望幫助更多的人。 系統介紹 在當下這個高速發展的時代&#xff0c;網絡科技正以令人驚嘆的速度不斷迭代更新。從 5G …

DeepSeek提效實操革命,全場景應用指南 AI提示詞萬能公式四步法以及對話技巧

歡迎來到濤濤聊AI DeepSeek系列文章 三塊顯示器如何擺放效率最高&#xff0c;讓deepseek給深度思考下 阿里云免費試用 DeepSeek大模型。 限時送 100 萬 tokens&#xff0c;快來搶先免費體驗&#xff01;AI 助手不再出現系統繁忙阿里云免費試用 DeepSeek大模型。 限時送 100 萬 …

智慧教室與無紙化同屏技術方案探討與實現探究

引言 隨著教育信息化的不斷發展&#xff0c;智慧教室和無紙化同屏技術逐漸成為提升教學效率和質量的重要手段。大牛直播SDK憑借其強大的音視頻處理能力和豐富的功能特性&#xff0c;在智慧教室和無紙化同屏領域積累了眾多成功案例。本文將深入探討基于大牛直播SDK的智慧教室、…

Linux MySQL 8.0.29 忽略表名大小寫配置

Linux MySQL 8.0.29 忽略表名大小寫配置 問題背景解決方案遇到的問題&#xff1a; 問題背景 突然發現有個大寫的表報不存在。 在Windows上&#xff0c;MySQL是默認支持忽略大小寫的。 這個時候你要查詢一下是不是沒有配置&#xff1a; SHOW VARIABLES LIKE lower_case_table…

【藍橋杯單片機】第十三屆省賽第二場

一、真題 二、模塊構建 1.編寫初始化函數(init.c) void Cls_Peripheral(void); 關閉led led對應的鎖存器由Y4C控制關閉蜂鳴器和繼電器 2.編寫LED函數&#xff08;led.c&#xff09; void Led_Disp(unsigned char ucLed); 將ucLed取反的值賦給P0 開啟鎖存器 關閉鎖存…

【CMake 教程】常用函數與構建案例解析(三)

一、CMake 常用函數簡析 1. 條件判斷 if() / elseif() / else() 在 CMake 腳本中&#xff0c;條件判斷是控制邏輯的重要工具。if() 支持多種比較語句&#xff0c;包括數值、字符串、布爾值和變量存在性等。在條件滿足時執行特定邏輯代碼&#xff0c;下面是典型語法&#xff1…

ASP.NET Core 8.0學習筆記(二十七)——數據遷移:Migrations深入與其他遷移命令

一、數據庫架構的管理 1.EF Core提供兩種方式來保持EF Core的模型與數據庫保持同步。 (1)以數據庫為準&#xff1a;反向工程&#xff08;Db First&#xff09;&#xff0c;適用于中大型工程 (2)以代碼為準&#xff1a;數據遷移&#xff08;Code First&#xff09;&#xff0c;…

Python 基本語法的詳細解釋

目錄 &#xff08;1&#xff09;注釋 &#xff08;2&#xff09;縮進 &#xff08;3&#xff09;變量和數據類型 變量定義 數據類型 &#xff08;4&#xff09;輸入和輸出 輸出&#xff1a;print() 函數 輸入&#xff1a;input() 函數 &#xff08;1&#xff09;注釋 注…

20-R 繪圖 - 餅圖

R 繪圖 - 餅圖 R 語言提供來大量的庫來實現繪圖功能。 餅圖&#xff0c;或稱餅狀圖&#xff0c;是一個劃分為幾個扇形的圓形統計圖表&#xff0c;用于描述量、頻率或百分比之間的相對關系。 R 語言使用 pie() 函數來實現餅圖&#xff0c;語法格式如下&#xff1a; pie(x, l…

Ubuntu 22.04 一鍵部署MinerU1.1.0

MinerU MinerU是一款將PDF轉化為機器可讀格式的工具&#xff08;如markdown、json&#xff09;&#xff0c;可以很方便地抽取為任意格式。 MinerU誕生于書生-浦語的預訓練過程中&#xff0c;我們將會集中精力解決科技文獻中的符號轉化問題&#xff0c;希望在大模型時代為科技發…

紫光同創開發板使用教程(二):sbit文件下載

sbit文件相當于zynq里面的bit文件&#xff0c;紫光的fpga工程編譯完成后會自動生成sbit文件&#xff0c;因工程編譯比較簡單&#xff0c;這里不在講解工程編譯&#xff0c;所以我這里直接下載sbit文件。 1.工程編譯完成后&#xff0c;可以看到Flow列表里面沒有報錯&#xff0c…