安卓第一阶段实训项目:基于存储卡音乐播放器V0.6----实训报告(六)

安卓第一阶段实训项目:基于存储卡音乐播放器V0.6----实训报告(六)


功能要求

在0.5版本基础上增加启动页
更改ProgressBar为SeekBar

一、SeekBar是什么?

SeekBar 是水平进度条 ProgressBar 的间接子类,相当于一个可以拖动的水平进度条。

二、运行效果

在这里插入图片描述

1.代码部分

大多数代码基于0.5版本,有需要可以去看我的0.5版本

https://editor.csdn.net/md/?articleId=112465913

启动页splashscreensctivity.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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".SplashScreen">
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:orientation="vertical">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/yjtp"
            />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/Run"
            android:textSize="50dp"
            />
    </LinearLayout>



</LinearLayout>

类SplashScreen

package net.yq.sdcardmusicplayerv06;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import net.yq.sdcardmusicplayerv06.ui.MainActivity;

public class SplashScreen extends Activity {
   

    @Override
    protected void onCreate(Bundle savedInstanceState) {
   
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splashscreensctivity);
        //3s后执行run方法进入主界面
        new Handler().postDelayed(new Runnable() {
   
            @Override
            public void run(
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值