导入上一次作业所写代码
|
@ -0,0 +1,15 @@
|
|||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
|
@ -0,0 +1 @@
|
|||
Huangrui
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$PROJECT_DIR$/../../../ProgramFiles/Android/gradle-8.2" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
/build
|
|
@ -0,0 +1,52 @@
|
|||
import org.gradle.kotlin.dsl.sourceSets
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.hnucm.c25"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.hnucm.c25"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
// sourceSets{
|
||||
// main{
|
||||
// jniLibs.srcDir ("libs")
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
implementation("com.google.android.material:material:1.9.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||
implementation("com.google.android.gms:play-services-maps:18.1.0")
|
||||
implementation(files("libs\\BaiduLBS_Android.jar"))
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
implementation ("io.github.youth5201314:banner:2.2.3")
|
||||
implementation ("com.github.bumptech.glide:glide:4.15.1")
|
||||
// implementation ("com.baidu.mapapi:mapapi:5.0.0")
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.hnucm.c25", appContext.getPackageName());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android: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/Theme.Huangrui"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:targetApi="31">
|
||||
<meta-data
|
||||
android:name="com.baidu.lbsapi.API_KEY"
|
||||
android:value="Em8KaARhebL8G1KP0I1anrRnxUsctKEF" />
|
||||
<activity
|
||||
android:name=".DaonaTable"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".TiaozhenDaxiao"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Hudong"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".FinacialLife"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".SearchLine"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ChooseDiscount"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ZhanghaoWenti"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".NewUserNotice"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ChangjianWenti"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".GuanyuWomen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".PayDetail"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".GuanzhuWomen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".LianxiKefu"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".AddPayWay"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".jifen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".KaiFaPiao"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MyLogin"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MyNoLogin"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Abouterweima"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Tanchuang"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".TakeSubway"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".SubwayHistory"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".StationMessage"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Station"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ChufaTable"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ConfirmOrder"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".OnlineBuy"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Card_yanzheng"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".addCard"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".PayWay"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Buyticket"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".chooseLine"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".linedetail"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".SystemInformation"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".havemessage"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".shouye"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".find_password"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".password_enter"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".phone_enter"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Login"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class Abouterweima extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_abouterweima);
|
||||
//todo 返回扫码页面
|
||||
ImageView back = findViewById(R.id.imageView76);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Abouterweima.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class AddPayWay extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add_pay_way);
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(AddPayWay.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 点击添加按钮
|
||||
CardView add = findViewById(R.id.add);
|
||||
CardView addWay = findViewById(R.id.addWay);
|
||||
add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
addWay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
//todo 支付详情
|
||||
CardView detail = findViewById(R.id.card);
|
||||
detail.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(AddPayWay.this,PayDetail.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class Buyticket extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_buyticket);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class Card_yanzheng extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_card_yanzheng);
|
||||
//todo 确认添加银行卡
|
||||
CardView confirmadd = findViewById(R.id.ConfirmAdd);
|
||||
confirmadd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Card_yanzheng.this,OnlineBuy.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回支付方式
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Card_yanzheng.this,linedetail.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class ChangjianWenti extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_changjian_wenti);
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView18);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ChangjianWenti.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 新用户注意
|
||||
TextView notice = findViewById(R.id.textView344);
|
||||
notice.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ChangjianWenti.this,NewUserNotice.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 账号相关
|
||||
TextView zhanghao = findViewById(R.id.textView350);
|
||||
zhanghao.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ChangjianWenti.this,ZhanghaoWenti.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class ChooseDiscount extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_choose_discount);
|
||||
//todo 返回确认订单
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ChooseDiscount.this,ConfirmOrder.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ChufaTable extends AppCompatActivity {
|
||||
|
||||
RecyclerView recyclerView;
|
||||
MyAdapter myAdapter;
|
||||
List<Position> positionList = new ArrayList<>();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_chufa_table);
|
||||
//todo 返回
|
||||
ImageView back = findViewById(R.id.imageView18);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ChufaTable.this, SearchLine.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
for(int i=0;i<6;i++ ){
|
||||
Position position = new Position();
|
||||
position.name = "大望"+i;
|
||||
// position.position="聊天内容";
|
||||
positionList.add(position);
|
||||
}
|
||||
|
||||
recyclerView=findViewById(R.id.recycle);
|
||||
myAdapter = new MyAdapter();
|
||||
recyclerView.setAdapter(myAdapter);
|
||||
//TODO 一行展示一个
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
//TODO 一行展示2个
|
||||
// recyclerView.setLayoutManager(new GridLayoutManager(MainActivity.this,2));
|
||||
}
|
||||
|
||||
//item布局文件中空间初始化
|
||||
public class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView nameTextView;
|
||||
TextView detailTextView;
|
||||
public MyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
nameTextView=itemView.findViewById(R.id.name);
|
||||
detailTextView=itemView.findViewById(R.id.position);
|
||||
}
|
||||
}
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder>{
|
||||
|
||||
|
||||
//加载item布局文件
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(ChufaTable.this).inflate(R.layout.position_item_layout,parent,false);
|
||||
return new MyViewHolder(view);
|
||||
}
|
||||
|
||||
//设置item中的控件设置值 点击事件
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
Position position1 = positionList.get(position);
|
||||
// holder.nameTextView.setText(position1.name);
|
||||
// holder.detailTextView.setText(position1.position);
|
||||
// Glide.with(ChufaTable.this)
|
||||
// .load(chat.imgurl)
|
||||
// .apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||
// .into(holder.imageView);
|
||||
//TODO 点击事件
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Log.i("test","onClick");
|
||||
//TODO 跳转到新的activity
|
||||
Intent intent = new Intent(ChufaTable.this, SearchLine.class);
|
||||
intent.putExtra("start",position1.name);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//item显示条数
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class ConfirmOrder extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_confirm_order);
|
||||
//todo 选择支付方式
|
||||
TextView choosePay = findViewById(R.id.textView139);
|
||||
choosePay.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ConfirmOrder.this,PayWay.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回在线购票
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ConfirmOrder.this,OnlineBuy.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 选择折扣
|
||||
TextView discount = findViewById(R.id.textView140);
|
||||
discount.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ConfirmOrder.this,ChooseDiscount.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 确认
|
||||
CardView queren = findViewById(R.id.queren);
|
||||
queren.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ConfirmOrder.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DaonaTable extends AppCompatActivity {
|
||||
|
||||
RecyclerView recyclerView;
|
||||
MyAdapter myAdapter;
|
||||
List<Position> positionList = new ArrayList<>();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_daona_table);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Position position = new Position();
|
||||
position.name = "军事博物馆采血点"+i;
|
||||
// position.position="聊天内容";
|
||||
positionList.add(position);
|
||||
}
|
||||
|
||||
recyclerView = findViewById(R.id.recycle);
|
||||
myAdapter = new MyAdapter();
|
||||
recyclerView.setAdapter(myAdapter);
|
||||
//TODO 一行展示一个
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
//todo 返回
|
||||
ImageView back = findViewById(R.id.imageView18);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(DaonaTable.this, SearchLine.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//item布局文件中空间初始化
|
||||
public class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView nameTextView;
|
||||
// TextView detailTextView;
|
||||
|
||||
public MyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
nameTextView = itemView.findViewById(R.id.name);
|
||||
// detailTextView = itemView.findViewById(R.id.position);
|
||||
}
|
||||
}
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> {
|
||||
|
||||
|
||||
//加载item布局文件
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(DaonaTable.this).inflate(R.layout.position_item_layout, parent, false);
|
||||
return new MyViewHolder(view);
|
||||
}
|
||||
|
||||
//设置item中的控件设置值 点击事件
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
Position position1 = positionList.get(position);
|
||||
holder.nameTextView.setText(position1.name);
|
||||
// holder.detailTextView.setText(position1.position);
|
||||
// Glide.with(ChufaTable.this)
|
||||
// .load(chat.imgurl)
|
||||
// .apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||
// .into(holder.imageView);
|
||||
//TODO 点击事件
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Log.i("test","onClick");
|
||||
//TODO 跳转到新的activity
|
||||
Intent intent = new Intent(DaonaTable.this, SearchLine.class);
|
||||
intent.putExtra("end",position1.name);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//item显示条数
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.ScaleAnimation;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class FinacialLife extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_finacial_life);
|
||||
|
||||
ConstraintLayout backgroundView = findViewById(R.id.body);
|
||||
|
||||
// 创建一个从小到大的缩放动画
|
||||
ScaleAnimation scaleAnimation = new ScaleAnimation(
|
||||
0.1f, 1.0f, // 从0.1倍大小变化到1倍原大小
|
||||
0.1f, 1.0f, // 从0.1倍大小变化到1倍原大小
|
||||
ScaleAnimation.RELATIVE_TO_SELF, 0.5f, // 相对于自己进行缩放,锚点为视图中心
|
||||
ScaleAnimation.RELATIVE_TO_SELF, 0.5f // 相对于自己进行缩放,锚点为视图中心
|
||||
);
|
||||
|
||||
scaleAnimation.setDuration(3000); // 设置动画持续时间
|
||||
scaleAnimation.setFillAfter(true); // 设置动画结束后保持最终状态
|
||||
|
||||
backgroundView.startAnimation(scaleAnimation);
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView135);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(FinacialLife.this, shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class GuanyuWomen extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_guanyu_women);
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(GuanyuWomen.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class GuanzhuWomen extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_guanzhu_women);
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(GuanzhuWomen.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.ScaleAnimation;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class Hudong extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_hudong);
|
||||
ConstraintLayout backgroundView = findViewById(R.id.body);
|
||||
|
||||
// 创建一个从小到大的缩放动画
|
||||
ScaleAnimation scaleAnimation = new ScaleAnimation(
|
||||
0.1f, 1.0f, // 从0.1倍大小变化到1倍原大小
|
||||
0.1f, 1.0f, // 从0.1倍大小变化到1倍原大小
|
||||
ScaleAnimation.RELATIVE_TO_SELF, 0.5f, // 相对于自己进行缩放,锚点为视图中心
|
||||
ScaleAnimation.RELATIVE_TO_SELF, 0.5f // 相对于自己进行缩放,锚点为视图中心
|
||||
);
|
||||
|
||||
scaleAnimation.setDuration(3000); // 设置动画持续时间
|
||||
scaleAnimation.setFillAfter(true); // 设置动画结束后保持最终状态
|
||||
|
||||
backgroundView.startAnimation(scaleAnimation);
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView135);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Hudong.this, shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link JifenMingxi_fragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class JifenMingxi_fragment extends Fragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public JifenMingxi_fragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment JifenMingxi_fragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static JifenMingxi_fragment newInstance(String param1, String param2) {
|
||||
JifenMingxi_fragment fragment = new JifenMingxi_fragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_jifen_mingxi_fragment, container, false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class KaiFaPiao extends AppCompatActivity {
|
||||
RecyclerView recyclerView ;
|
||||
MyAdapter myAdapter ;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_kai_fa_piao);
|
||||
recyclerView = findViewById(R.id.recycleView1);
|
||||
myAdapter = new MyAdapter();
|
||||
recyclerView.setAdapter(myAdapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView92);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(KaiFaPiao.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public MyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder>{
|
||||
|
||||
|
||||
//加载item布局文件
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(KaiFaPiao.this).inflate(R.layout.fapiao_item_layout,parent,false);
|
||||
return new MyViewHolder(view);
|
||||
}
|
||||
|
||||
//设置item中的控件设置值 点击事件
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
|
||||
//TODO 点击事件
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//TODO 跳转到行程详情
|
||||
ImageView xuanzhong = findViewById(R.id.imageView94);
|
||||
xuanzhong.setSelected(true);
|
||||
// Intent intent = new Intent(KaiFaPiao.this, linedetail.class);
|
||||
// startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//item显示条数
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class LianxiKefu extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_lianxi_kefu);
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LianxiKefu.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class Login extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
//todo 返回手机号登录界面
|
||||
ImageView back = findViewById(R.id.imageView2);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Login.this,phone_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 注册后跳转到登录界面
|
||||
TextView haveLogin = findViewById(R.id.textView3);
|
||||
haveLogin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Login.this,phone_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = new Intent(MainActivity.this,shouye.class);
|
||||
// Intent intent = new Intent(MainActivity.this,FinacialLife.class);
|
||||
// Intent intent = new Intent(MainActivity.this,Hudong.class);
|
||||
// Intent intent = new Intent(MainActivity.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
setContentView(R.layout.activity_main);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.baidu.mapapi.CoordType;
|
||||
import com.baidu.mapapi.SDKInitializer;
|
||||
|
||||
public class MyApplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//todo 地图初始化
|
||||
// 同意百度地图隐私政策
|
||||
SDKInitializer.setAgreePrivacy(getApplicationContext(),true);
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
SDKInitializer.initialize(this);
|
||||
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
||||
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
|
||||
SDKInitializer.setCoordType(CoordType.BD09LL);
|
||||
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
// SDKInitializer.initialize(getApplicationContext());
|
||||
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MyLogin extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_my_login);
|
||||
//todo 常见问题
|
||||
TextView question = findViewById(R.id.textView278);
|
||||
question.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,ChangjianWenti.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 联系客服
|
||||
TextView contact = findViewById(R.id.textView289);
|
||||
contact.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,LianxiKefu.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 关注我们
|
||||
TextView concern = findViewById(R.id.textView296);
|
||||
concern.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,GuanzhuWomen.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 关于我们
|
||||
TextView guanyu = findViewById(R.id.textView297);
|
||||
guanyu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,GuanyuWomen.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 支付方式
|
||||
ConstraintLayout pay = findViewById(R.id.constraintLayout21);
|
||||
pay.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,AddPayWay.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 积分
|
||||
TextView jifen = findViewById(R.id.textView284);
|
||||
jifen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,jifen.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 开具发票
|
||||
ConstraintLayout fapiao = findViewById(R.id.constraintLayout19);
|
||||
fapiao.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,KaiFaPiao.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 首页
|
||||
ImageView shouye = findViewById(R.id.imageView38);
|
||||
shouye.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 扫码进站
|
||||
ImageView saoma = findViewById(R.id.imageView70);
|
||||
saoma.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyLogin.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MyNoLogin extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_my_no_login);
|
||||
//todo 点击登录按钮,跳转到手机号快捷登录
|
||||
ImageView enter = findViewById(R.id.imageView137);
|
||||
enter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,phone_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
//todo 联系客服
|
||||
TextView contact = findViewById(R.id.textView289);
|
||||
contact.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,LianxiKefu.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 关注我们
|
||||
TextView concern = findViewById(R.id.textView296);
|
||||
concern.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,GuanzhuWomen.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 关于我们
|
||||
TextView guanyu = findViewById(R.id.textView297);
|
||||
guanyu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,GuanyuWomen.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 常见问题
|
||||
TextView question = findViewById(R.id.textView278);
|
||||
question.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,ChangjianWenti.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 首页
|
||||
ImageView shouye = findViewById(R.id.imageView38);
|
||||
shouye.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 扫码进站
|
||||
ImageView saoma = findViewById(R.id.imageView70);
|
||||
saoma.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(MyNoLogin.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class NewUserNotice extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_new_user_notice);
|
||||
//todo 返回常见问题
|
||||
ImageView back = findViewById(R.id.imageView76);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(NewUserNotice.this,ChangjianWenti.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class OnlineBuy extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_online_buy);
|
||||
//todo 选择路线
|
||||
EditText begin = findViewById(R.id.editText6);
|
||||
begin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(OnlineBuy.this,chooseLine.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
EditText finish = findViewById(R.id.finish);
|
||||
finish.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(OnlineBuy.this,chooseLine.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 确认订单
|
||||
CardView confirm = findViewById(R.id.ok);
|
||||
confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(OnlineBuy.this,ConfirmOrder.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(OnlineBuy.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class PayDetail extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_pay_detail);
|
||||
//todo 返回支付方式
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(PayDetail.this,AddPayWay.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class PayWay extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_pay_way);
|
||||
TextView addCard = findViewById(R.id.textView95);
|
||||
//todo 添加卡
|
||||
addCard.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(PayWay.this,addCard.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回确认订单
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(PayWay.this,ConfirmOrder.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
public class Position {
|
||||
public String name;
|
||||
public String position;
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.baidu.mapapi.CoordType;
|
||||
import com.baidu.mapapi.SDKInitializer;
|
||||
import com.baidu.mapapi.map.BaiduMap;
|
||||
import com.baidu.mapapi.map.MapView;
|
||||
|
||||
|
||||
public class SearchLine extends AppCompatActivity {
|
||||
private MapView mMapView = null;
|
||||
private BaiduMap mBaiduMap = null;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search_line);
|
||||
// 同意百度地图隐私政策
|
||||
SDKInitializer.setAgreePrivacy(getApplicationContext(),true);
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
SDKInitializer.initialize(getApplicationContext());
|
||||
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
||||
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
|
||||
SDKInitializer.setCoordType(CoordType.BD09LL);
|
||||
//获取地图控件引用
|
||||
mMapView = (MapView) findViewById(R.id.bmapView);
|
||||
mBaiduMap = mMapView.getMap();
|
||||
// //显示卫星图层
|
||||
// mBaiduMap.setMapType(BaiduMap.MAP_TYPE_SATELLITE);
|
||||
//普通地图 ,mBaiduMap是地图控制器对象
|
||||
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SearchLine.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 出发表单
|
||||
EditText chuFa = findViewById(R.id.editText6);
|
||||
chuFa.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SearchLine.this,ChufaTable.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 接收返回表单传来的值
|
||||
String start = getIntent().getStringExtra("start");
|
||||
chuFa.setText(start);
|
||||
|
||||
//todo 到哪表单
|
||||
EditText daoNa = findViewById(R.id.finish);
|
||||
daoNa.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SearchLine.this,DaonaTable.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 接收到哪表单传来的值
|
||||
String end = getIntent().getStringExtra("end");
|
||||
daoNa.setText(end);
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//在activity执行onResume时必须调用mMapView. onResume ()
|
||||
mMapView.onResume();
|
||||
}
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
//在activity执行onPause时必须调用mMapView. onPause ()
|
||||
mMapView.onPause();
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
//在activity执行onDestroy时必须调用mMapView.onDestroy()
|
||||
mMapView.onDestroy();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class Station extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_station);
|
||||
//todo 站点信息
|
||||
TextView station = findViewById(R.id.textView171);
|
||||
station.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Station.this,StationMessage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView18);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Station.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link StationDetailMessage#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class StationDetailMessage extends Fragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public StationDetailMessage() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment StationDetailMessage.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static StationDetailMessage newInstance(String param1, String param2) {
|
||||
StationDetailMessage fragment = new StationDetailMessage();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_station_detail_message, container, false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link StationFacility#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class StationFacility extends Fragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public StationFacility() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment StationFacility.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static StationFacility newInstance(String param1, String param2) {
|
||||
StationFacility fragment = new StationFacility();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_station_facility, container, false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class StationMessage extends AppCompatActivity {
|
||||
|
||||
StationDetailMessage stationDetailMessage = new StationDetailMessage();
|
||||
StationFacility stationFacility = new StationFacility();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_station_message);
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.layout,stationDetailMessage).commit();
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.layout,stationFacility).commit();
|
||||
getSupportFragmentManager().beginTransaction().hide(stationFacility).show(stationDetailMessage).commit();
|
||||
|
||||
TextView message = findViewById(R.id.message);
|
||||
TextView facility = findViewById(R.id.facility);
|
||||
|
||||
message.setSelected(true);
|
||||
|
||||
message.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getSupportFragmentManager().beginTransaction().hide(stationFacility).show(stationDetailMessage).commit();
|
||||
message.setSelected(true);
|
||||
facility.setSelected(false);
|
||||
}
|
||||
});
|
||||
facility.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getSupportFragmentManager().beginTransaction().show(stationFacility).hide(stationDetailMessage).commit();
|
||||
message.setSelected(false);
|
||||
facility.setSelected(true);
|
||||
}
|
||||
});
|
||||
//todo 返回站点列表
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(StationMessage.this,Station.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SubwayHistory extends AppCompatActivity {
|
||||
RecyclerView recyclerView ;
|
||||
MyAdapter myAdapter ;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_subway_history);
|
||||
recyclerView = findViewById(R.id.recycleView);
|
||||
myAdapter = new MyAdapter();
|
||||
recyclerView.setAdapter(myAdapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SubwayHistory.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView startTextView;
|
||||
TextView endTextView;
|
||||
TextView timeTextView;
|
||||
TextView moneyTextView;
|
||||
TextView finishTextView;
|
||||
ImageView enterImage;
|
||||
ImageView endImage;
|
||||
ConstraintLayout history;
|
||||
public MyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
startTextView = itemView.findViewById(R.id.startTextView);
|
||||
endTextView = itemView.findViewById(R.id.endTextView);
|
||||
timeTextView = itemView.findViewById(R.id.timeTextView);
|
||||
moneyTextView = itemView.findViewById(R.id.moneyTextView);
|
||||
finishTextView = itemView.findViewById(R.id.finishTextView);
|
||||
endImage = itemView.findViewById(R.id.endImage);
|
||||
enterImage = itemView.findViewById(R.id.enterImage);
|
||||
history = findViewById(R.id.history);
|
||||
}
|
||||
}
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder>{
|
||||
|
||||
|
||||
//加载item布局文件
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(SubwayHistory.this).inflate(R.layout.history_item_layout,parent,false);
|
||||
return new MyViewHolder(view);
|
||||
}
|
||||
|
||||
//设置item中的控件设置值 点击事件
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
// history_item historyItem = history_items.get(position);
|
||||
// holder.startTextView.setText(historyItem.start);
|
||||
// holder.finishTextView.setText(historyItem.finish);
|
||||
// holder.moneyTextView.setText(historyItem.money);
|
||||
// holder.timeTextView.setText(historyItem.time);
|
||||
// holder.endTextView.setText(historyItem.end);
|
||||
|
||||
//TODO 点击事件
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//TODO 跳转到行程详情
|
||||
Intent intent = new Intent(SubwayHistory.this, linedetail.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//item显示条数
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 20;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class SystemInformation extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_system_information);
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SystemInformation.this,havemessage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.TranslateAnimation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class TakeSubway extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_take_subway);
|
||||
//todo 返回首页
|
||||
ImageView shouye = findViewById(R.id.imageView38);
|
||||
shouye.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(TakeSubway.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 图片的左右摇晃
|
||||
ImageView imageViewRightTop = findViewById(R.id.imageView74);
|
||||
// 创建一个左右摇晃的动画
|
||||
TranslateAnimation shakeAnimation = new TranslateAnimation(
|
||||
0, // 动画开始时在X轴的位置(这里是原位置)
|
||||
5, // 动画结束时在X轴的位置(向右移动5像素)
|
||||
0, // 动画开始时在Y轴的位置
|
||||
0 // 动画结束时在Y轴的位置
|
||||
);
|
||||
shakeAnimation.setDuration(500); // 设置动画持续时间
|
||||
shakeAnimation.setRepeatCount(-1); // 设置重复次数,-1为无限重复
|
||||
shakeAnimation.setRepeatMode(Animation.REVERSE); // 设置重复模式,使其来回摇晃
|
||||
//
|
||||
// // 应用动画
|
||||
imageViewRightTop.startAnimation(shakeAnimation);
|
||||
|
||||
ConstraintLayout shang = findViewById(R.id.constraintLayout2);
|
||||
CardView zhong = findViewById(R.id.zhong);
|
||||
ConstraintLayout zhong1 = findViewById(R.id.zhong1);
|
||||
ConstraintLayout xia = findViewById(R.id.constraintLayout11);
|
||||
ConstraintLayout background = findViewById(R.id.background);
|
||||
//todo 点击三点水
|
||||
ImageView more = findViewById(R.id.imageView75);
|
||||
ConstraintLayout layoutMore = findViewById(R.id.more);
|
||||
more.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
layoutMore.setVisibility(View.VISIBLE);
|
||||
// background.getBackground().setAlpha(20);
|
||||
// shang.getBackground().setAlpha(50);
|
||||
// zhong.getBackground().setAlpha(50);
|
||||
// zhong1.getBackground().setAlpha(50);
|
||||
// xia.getBackground().setAlpha(50);
|
||||
// shang.getBackground().setAlpha(128);
|
||||
// zhong1.setBackgroundColor(R.color.black);
|
||||
// xia.getBackground().setAlpha(128);
|
||||
background.getBackground().setAlpha(128); // 128是50%透明度的值
|
||||
}
|
||||
});
|
||||
//todo 关于乘车码
|
||||
TextView chengchema = findViewById(R.id.textView369);
|
||||
chengchema.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(TakeSubway.this,Abouterweima.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 添加到桌面
|
||||
TextView tianjia = findViewById(R.id.textView370);
|
||||
CardView tanchuang = findViewById(R.id.tanchuang);
|
||||
TextView xiang = findViewById(R.id.textView357);
|
||||
tianjia.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.VISIBLE);
|
||||
layoutMore.setVisibility(View.INVISIBLE);
|
||||
xiang.setSelected(true);
|
||||
background.getBackground().setAlpha(20);
|
||||
shang.getBackground().setAlpha(128);
|
||||
zhong1.getBackground().setAlpha(128);
|
||||
// zhong1.setBackgroundColor(0xFF747474);
|
||||
|
||||
// zhong.getBackground().setAlpha(128);
|
||||
xia.getBackground().setAlpha(128);
|
||||
// background.getBackground().setAlpha(128); // 128是50%透明度的值
|
||||
}
|
||||
});
|
||||
//todo 再想想
|
||||
|
||||
xiang.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.INVISIBLE);
|
||||
// background.getBackground().setAlpha(255); // 255是不透明的值
|
||||
shang.getBackground().setAlpha(255);
|
||||
zhong1.getBackground().setAlpha(255);
|
||||
zhong.getBackground().setAlpha(255);
|
||||
xia.getBackground().setAlpha(255);
|
||||
// zhong1.setBackgroundColor(R.color.white);
|
||||
}
|
||||
});
|
||||
//todo 立即添加
|
||||
TextView add = findViewById(R.id.textView358);
|
||||
add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.INVISIBLE);
|
||||
background.getBackground().setAlpha(255); // 255是不透明的值
|
||||
shang.getBackground().setAlpha(255);
|
||||
zhong1.getBackground().setAlpha(255);
|
||||
zhong.getBackground().setAlpha(255);
|
||||
xia.getBackground().setAlpha(255);
|
||||
}
|
||||
});
|
||||
//todo 我的
|
||||
ImageView my = findViewById(R.id.imageView40);
|
||||
my.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(TakeSubway.this,MyNoLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 调整大小
|
||||
TextView tiaozhen = findViewById(R.id.textView371);
|
||||
tiaozhen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(TakeSubway.this,TiaozhenDaxiao.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class Tanchuang extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_tanchuang);
|
||||
TextView textView;
|
||||
// textView.setVisibility(View.VISIBLE);
|
||||
// AlertDialog alertDialog2 = new AlertDialog.Builder(this)
|
||||
//// .setTitle("这是标题")
|
||||
// .setMessage("确定将该应用添加至手机桌面快捷方式")
|
||||
//// .setIcon(R.mipmap.ic_launcher)
|
||||
// .setPositiveButton("确定", new DialogInterface.OnClickListener() {//添加"Yes"按钮
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// Toast.makeText(Tanchuang.this, "这是确定按钮", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// .setNegativeButton("取消", new DialogInterface.OnClickListener() {//添加取消
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// Toast.makeText(Tanchuang.this, "这是取消按钮", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
// })
|
||||
// .setNeutralButton("普通按钮", new DialogInterface.OnClickListener() {//添加普通按钮
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// Toast.makeText(Tanchuang.this, "这是普通按钮按钮", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
// })
|
||||
// .create();
|
||||
// alertDialog2.show();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
public class TiaozhenDaxiao extends AppCompatActivity {
|
||||
private ImageView erweima; // 定义一个 ImageView 成员变量
|
||||
private SeekBar seekbar;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_tiaozhen_daxiao);
|
||||
erweima = findViewById(R.id.imageView71); // 获取 ImageView 的引用
|
||||
seekbar = findViewById(R.id.seekBar); // 获取 SeekBar 的引用
|
||||
|
||||
//todo 返回乘车
|
||||
ImageView back = findViewById(R.id.imageView136);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(TiaozhenDaxiao.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
// 设置 SeekBar 的监听器
|
||||
seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
// 根据 progress 值更新 ImageView 的尺寸
|
||||
updateQRCodeSize(progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
// 用户开始触摸滑动条时的逻辑(如果需要)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
// 用户停止触摸滑动条时的逻辑(如果需要)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateQRCodeSize(int progress) {
|
||||
// 根据 progress 值计算新的尺寸
|
||||
// 举例:将 progress 值转换为尺寸(这里需要根据您的实际需求来计算)
|
||||
int newSize = (int) (200 + progress); // 200 是 ImageView 的初始宽度或高度
|
||||
erweima.getLayoutParams().width = newSize;
|
||||
erweima.getLayoutParams().height = newSize;
|
||||
erweima.requestLayout(); // 请求重新布局 ImageView
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link WodeShangping_fragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class WodeShangping_fragment extends Fragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public WodeShangping_fragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment WodeShangping_fragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static WodeShangping_fragment newInstance(String param1, String param2) {
|
||||
WodeShangping_fragment fragment = new WodeShangping_fragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_wode_shangping_fragment, container, false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class ZhanghaoWenti extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_zhanghao_wenti);
|
||||
//todo 返回常见问题
|
||||
ImageView back = findViewById(R.id.imageView76);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ZhanghaoWenti.this,ChangjianWenti.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class addCard extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add_card);
|
||||
//todo 下一步
|
||||
CardView next = findViewById(R.id.next);
|
||||
next.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(addCard.this,Card_yanzheng.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回支付方式
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(addCard.this,ConfirmOrder.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class chooseLine extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_choose_line);
|
||||
ImageView back = findViewById(R.id.imageView18);
|
||||
//todo 返回在线购票
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(chooseLine.this, OnlineBuy.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 清除输入框中的内容
|
||||
ImageView clean = findViewById(R.id.imageView19);
|
||||
EditText shuru = findViewById(R.id.editText3);
|
||||
clean.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
shuru.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class find_password extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_find_password);
|
||||
//todo 点击注册按钮,跳转到登录页面
|
||||
TextView login = findViewById(R.id.textView3);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(find_password.this,password_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class havemessage extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_havemessage);
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(havemessage.this,shouye.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 将消息全部标为已读
|
||||
TextView cleanMessage = findViewById(R.id.textView18);
|
||||
ImageView num1 = findViewById(R.id.imageView16);
|
||||
ImageView num2 = findViewById(R.id.imageView17);
|
||||
cleanMessage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
cleanMessage.setVisibility(View.INVISIBLE);
|
||||
num1.setVisibility(View.INVISIBLE);
|
||||
num2.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
//todo 查看具体的系统通知
|
||||
TextView information = findViewById(R.id.textView20);
|
||||
information.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(havemessage.this,SystemInformation.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
public class history_item {
|
||||
public String start;
|
||||
public String end;
|
||||
public String finish;
|
||||
public String money;
|
||||
public String time;
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class jifen extends AppCompatActivity {
|
||||
|
||||
JifenMingxi_fragment jifenMingxiFragment = new JifenMingxi_fragment();
|
||||
WodeShangping_fragment wodeShangpingFragment = new WodeShangping_fragment();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_jifen);
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.jifenConstraint,wodeShangpingFragment).commit();
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.jifenConstraint,jifenMingxiFragment).commit();
|
||||
getSupportFragmentManager().beginTransaction().show(jifenMingxiFragment).hide(wodeShangpingFragment).commit();
|
||||
|
||||
TextView jifen = findViewById(R.id.Jifen);
|
||||
TextView Shangping = findViewById(R.id.Shangping);
|
||||
|
||||
jifen.setSelected(true);
|
||||
|
||||
jifen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getSupportFragmentManager().beginTransaction().show(jifenMingxiFragment).hide(wodeShangpingFragment).commit();
|
||||
jifen.setSelected(true);
|
||||
Shangping.setSelected(false);
|
||||
}
|
||||
});
|
||||
Shangping.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getSupportFragmentManager().beginTransaction().hide(jifenMingxiFragment).show(wodeShangpingFragment).commit();
|
||||
jifen.setSelected(false);
|
||||
Shangping.setSelected(true);
|
||||
}
|
||||
});
|
||||
//todo 返回我的
|
||||
ImageView back = findViewById(R.id.imageView92);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(jifen.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class linedetail extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_linedetail);
|
||||
//todo 返回首页
|
||||
ImageView back = findViewById(R.id.imageView13);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(linedetail.this,SubwayHistory.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class password_enter extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_password_enter);
|
||||
//todo 返回未登录
|
||||
ImageView back = findViewById(R.id.imageView2);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(password_enter.this,MyNoLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
TextView phoneEnter = findViewById(R.id.textView4);
|
||||
phoneEnter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(password_enter.this,phone_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 跳转到注册界面
|
||||
TextView login = findViewById(R.id.textView);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(password_enter.this,Login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 忘记密码
|
||||
TextView forget = findViewById(R.id.textView2);
|
||||
forget.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(password_enter.this,find_password.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class phone_enter extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_phone_enter);
|
||||
//todo 账号密码登录
|
||||
TextView zhanghao = findViewById(R.id.textView4);
|
||||
zhanghao.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(phone_enter.this,password_enter.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 返回我的界面
|
||||
ImageView back = findViewById(R.id.imageView2);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(phone_enter.this,MyNoLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 点击注册按钮,跳转到注册页面
|
||||
TextView login = findViewById(R.id.textView);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(phone_enter.this,Login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 点击登录
|
||||
TextView enter = findViewById(R.id.textView3);
|
||||
enter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(phone_enter.this,MyLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.media.Image;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.adapter.BannerAdapter;
|
||||
import com.youth.banner.adapter.BannerImageAdapter;
|
||||
import com.youth.banner.holder.BannerImageHolder;
|
||||
import com.youth.banner.indicator.CircleIndicator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class shouye extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_shouye);
|
||||
ImageView message = findViewById(R.id.imageView11);
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("https://alifei03.cfp.cn/creative/vcg/800/new/VCG41N1349337241.jpg");
|
||||
list.add("https://alifei03.cfp.cn/creative/vcg/800/new/VCG211366776934.jpg");
|
||||
list.add("https://alifei02.cfp.cn/creative/vcg/800/new/VCG211430222848.jpeg");
|
||||
Banner banner = findViewById(R.id.banner);
|
||||
banner.setAdapter(new BannerImageAdapter<String>(list) {
|
||||
@Override
|
||||
public void onBindView(BannerImageHolder holder, String data, int position, int size) {
|
||||
Glide.with(holder.itemView)
|
||||
.load(data)
|
||||
.into(holder.imageView);
|
||||
}
|
||||
});
|
||||
banner.setIndicator(new CircleIndicator(this));
|
||||
banner.setIndicatorRadius(100);
|
||||
|
||||
message.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,havemessage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 在线购票
|
||||
ConstraintLayout onlineBuy = findViewById(R.id.constraintLayout5);
|
||||
onlineBuy.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,OnlineBuy.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
// todo 线路查询
|
||||
ConstraintLayout searchLine = findViewById(R.id.constraintLayout4);
|
||||
searchLine.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,SearchLine.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
// todo 站点信息
|
||||
ConstraintLayout stationMessage = findViewById(R.id.constraintLayout8);
|
||||
stationMessage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,Station.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
// todo 乘车记录
|
||||
ConstraintLayout history = findViewById(R.id.constraintLayout9);
|
||||
history.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,SubwayHistory.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 扫码进站
|
||||
ImageView erweima = findViewById(R.id.imageView37);
|
||||
erweima.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,TakeSubway.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 我的
|
||||
ImageView my = findViewById(R.id.imageView40);
|
||||
my.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,MyNoLogin.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 财富生活
|
||||
CardView caifu = findViewById(R.id.cardView5);
|
||||
caifu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,FinacialLife.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 出行报告
|
||||
CardView chuxing = findViewById(R.id.chuxing);
|
||||
chuxing.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(shouye.this,Hudong.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#9B9B9B" android:state_selected="true"/>
|
||||
<item android:color="#1A83FD" android:state_selected="false"/>
|
||||
</selector>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#3D4C7D" android:state_selected="true"/>
|
||||
<item android:color="#B1B7CB" android:state_selected="false"/>
|
||||
</selector>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/black" android:state_selected="true"/>
|
||||
<item android:color="#AAAAAA" android:state_selected="false"/>
|
||||
</selector>
|
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 787 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 995 B |
After Width: | Height: | Size: 974 B |
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<gradient
|
||||
android:startColor="@color/white"
|
||||
android:endColor="@color/white"/>
|
||||
<corners
|
||||
android:radius="100dp"
|
||||
android:bottomLeftRadius="50dp"
|
||||
android:bottomRightRadius="50dp"
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,8 @@
|
|||
<!-- res/drawable/dashed_line.xml -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke
|
||||
android:color="#B8B0B0"
|
||||
android:dashWidth="1dp"
|
||||
android:dashGap="2dp"
|
||||
android:width="1dp" />
|
||||
</shape>
|
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 33 KiB |