Android安卓实战项目(3)—一个炫酷的健身APP界面
一.项目运行介绍
1.大致浏览
2.功能介绍
(1)功能一
上导航条
(2)功能二
下导航条
二.具体实现
MainActivity.java
package com.rckdeveloper.fitenessapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends AppCompatActivity {
CardView cardView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
cardView1= (CardView) findViewById(R.id.cardView1);
cardView1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent= new Intent(MainActivity.this,SkillsTrainingActivity.class);
startActivity(intent);
}
});
}
}
HandPushUpActivity.java
package com.rckdeveloper.fitenessapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class HandPushUpActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hand_push_up);
}
}
SkillsTrainingActivity.java
package com.rckdeveloper.fitenessapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class SkillsTrainingActivity extends AppCompatActivity {
CardView cardView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_skills_training);
cardView= (CardView) findViewById(R.id.cardView);
cardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent= new Intent(SkillsTrainingActivity.this,HandPushUpActivity.class);
startActivity(intent);
}
});
}
}
三.项目源码
链接:https://pan.baidu.com/s/1PGHpywIbtBFpjbCeqp7ocA?pwd=jynl
提取码:jynl