毕业设计- Android英语单词记
时间:2022-03-04 07:19:35 阅读数:53,294人阅读
作者:Android学习小站
版权声明:转载请注明出处,谢谢!
—— 如果你想做一项长期工作,首先得拥有一个健康的身体。
项目介绍
系统分为背单词、词库选择、词汇考试、我的收藏四个模块
1. 词汇选择 可以在词库列表中选择需要背单词的词库如大学英语四级词库、考研英语词库等等,选好词库后选择相应数量的单词开始背单词;
2. 背单词 根据选择的词库和选择的数量开始背单词,可以选择背单词模式、记单词模式,可以点击试听英式发音或美式发音,对有难度的单词可点击收藏;
3. 词汇考试 此为考试模式,根据选择的回答记录分数;
4. 我的 即我的收藏列表,显示收藏的单词详情信息如英标、发音、词性、词义等等;
项目截图
实现原理
布局文件activity_main.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:orientation="vertical"> <com.santiago.jidanci.business.home.NoScrollViewPager android:id="@+id/home_page_container" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"> </com.santiago.jidanci.business.home.NoScrollViewPager> <include layout="@layout/line_horizontal_cyan" /> <com.google.android.material.tabs.TabLayout android:id="@+id/home_tab_layout" android:layout_width="match_parent" android:layout_height="@dimen/bottom_layout_height" app:tabBackground="@color/layout_white" app:tabIndicatorHeight="0dp" app:tabSelectedTextColor="@color/colorPrimary" app:tabTextColor="@color/text_hint"/> </LinearLayout>
/** * 程序主界面 */ public class HomeActivity extends BaseActivity { private NoScrollViewPager mViewPager; private TabLayout mTabLayout; private HomeFragmentAdapter mFragmentAdapter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); initView(); initClick(); } @Override public void initView() { mViewPager = findViewById(R.id.home_page_container); mTabLayout = findViewById(R.id.home_tab_layout); initTab(); initPager(); } @Override public void initClick() { } private void initTab() { int[] iconsIdArr = new int[]{R.drawable.home_tab_first_selector, R.drawable.home_tab_study_selector, R.drawable.home_tab_activity_selector, R.drawable.home_tab_community_selector}; int[] tabTextIdArr = new int[]{R.string.home_first, R.string.home_study, R.string.home_activity, R.string.home_account}; for (int i = 0; i < iconsIdArr.length; i++) { View tabItem = getLayoutInflater().inflate(R.layout.item_home_tab_bar, null); ImageView icon = tabItem.findViewById(R.id.home_iv_tab_bar_icon); TextView text = tabItem.findViewById(R.id.home_tv_tab_bar_text); icon.setImageResource(iconsIdArr[i]); text.setText(getText(tabTextIdArr[i])); mTabLayout.addTab(mTabLayout.newTab().setCustomView(tabItem)); } } private void initPager() { ListfragmentList = new ArrayList<>(); fragmentList.add(new HomeFirstFragment()); fragmentList.add(new HomeStudyFragment()); fragmentList.add(new HomeActivityFragment()); fragmentList.add(new HomeAccountFragment()); mFragmentAdapter = new HomeFragmentAdapter(this, fragmentList); mViewPager.setAdapter(mFragmentAdapter); mViewPager.setCurrentItem(0); mViewPager.setOffscreenPageLimit(1); mTabLayout.addOnTabSelectedListener(new tabSelectListener(mViewPager)); mViewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(mTabLayout)); } }
购买套餐
权益 | 套餐A | 套餐B |
---|---|---|
完整代码 | ![]() |
![]() |
远程调试 | 不支持 | ![]() |
代码答疑 | 不支持 | ![]() |
价 格 | ¥200 | ¥400 |
------转载请注明出处,感谢您对原创作者的支持------
有偿提供技术支持、Bug修复、项目外包、毕业设计、大小作业
Android学习小站
Q Q:1095817610
微信:jx-helu
邮箱:1095817610@qq.com
添加请备注"Android学习小站"
