@ -1,91 +0,0 @@
|
||||
# ---> Android
|
||||
# Built application files
|
||||
*.apk
|
||||
*.aar
|
||||
*.ap_
|
||||
*.aab
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
# Uncomment the following line in case you need and you don't have the release build type files in your app
|
||||
# release/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/gradle.xml
|
||||
.idea/assetWizardSettings.xml
|
||||
.idea/dictionaries
|
||||
.idea/libraries
|
||||
.idea/jarRepositories.xml
|
||||
# Android Studio 3 in .gitignore file.
|
||||
.idea/caches
|
||||
.idea/modules.xml
|
||||
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
|
||||
.idea/navEditor.xml
|
||||
|
||||
# Keystore files
|
||||
# Uncomment the following lines if you do not want to check your keystore files in.
|
||||
#*.jks
|
||||
#*.keystore
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
.cxx/
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
# google-services.json
|
||||
|
||||
# Freeline
|
||||
freeline.py
|
||||
freeline/
|
||||
freeline_project_description.json
|
||||
|
||||
# fastlane
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/test_output
|
||||
fastlane/readme.md
|
||||
|
||||
# Version control
|
||||
vcs.xml
|
||||
|
||||
# lint
|
||||
lint/intermediates/
|
||||
lint/generated/
|
||||
lint/outputs/
|
||||
lint/tmp/
|
||||
# lint/reports/
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
@ -1,20 +0,0 @@
|
||||
Copyright (c) 1995-1999 The Apache Group. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their name, without prior written permission of the Apache Group.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following acknowledgment:
|
||||
"This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
This software consists of voluntary contributions made by many individuals on behalf of the Apache Group and was originally based on public domain software written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign. For more information on the Apache Group and the Apache HTTP server project, please see <http://www.apache.org/>.
|
@ -1 +0,0 @@
|
||||
/build
|
@ -1,40 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.example.test'
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.test"
|
||||
minSdk 27
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation 'com.github.crazyandcoder:citypicker:6.0.2'
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
# 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
|
@ -1,26 +0,0 @@
|
||||
package com.example.test;
|
||||
|
||||
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.example.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
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:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".activity.fragmentActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.login"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.user"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.fruitFragment"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.register"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -1,48 +0,0 @@
|
||||
package com.example.test;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.test.activity.register;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
private Button registerButton, loginButton;
|
||||
private EditText usernameText, paswdEdit;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.login);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()){
|
||||
case R.id.login:
|
||||
Toast.makeText(this,"登录",Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case R.id.register:
|
||||
Intent intent = new Intent(this, register.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void init(){
|
||||
registerButton = findViewById(R.id.register);
|
||||
registerButton.setOnClickListener(this);
|
||||
loginButton = findViewById(R.id.login);
|
||||
loginButton.setOnClickListener(this);
|
||||
}
|
||||
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
package com.example.test.activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.test.R;
|
||||
|
||||
|
||||
public class login extends AppCompatActivity implements View.OnClickListener {
|
||||
private EditText userEdit;
|
||||
private EditText passEdit;
|
||||
private Button regBut;
|
||||
private Button logBut;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.login);
|
||||
regBut = findViewById(R.id.register);
|
||||
logBut = findViewById(R.id.login);
|
||||
regBut.setOnClickListener(this);
|
||||
logBut.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId())
|
||||
{
|
||||
case R.id.login:
|
||||
check();
|
||||
break;
|
||||
case R.id.register:
|
||||
Intent intent = new Intent(this, register.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void check() {
|
||||
Intent intent = getIntent();
|
||||
Bundle bundle = intent.getExtras();
|
||||
String username = bundle.getString("username");
|
||||
String password = bundle.getString("password");
|
||||
userEdit = findViewById(R.id.username);
|
||||
String user = userEdit.getText().toString();
|
||||
passEdit = findViewById(R.id.password);
|
||||
String pass = passEdit.getText().toString();
|
||||
if(pass.equals(password)&&user.equals(username))
|
||||
{
|
||||
String sex = bundle.getString("sex");
|
||||
String adress = bundle.getString("adress");
|
||||
Intent userIntent = new Intent(this, user.class);
|
||||
Bundle userBundle = new Bundle();
|
||||
userBundle.putString("username",username);
|
||||
userBundle.putString("sex",sex);
|
||||
userBundle.putString("adress",adress);
|
||||
userIntent.putExtras(userBundle);
|
||||
startActivity(userIntent);
|
||||
}else{
|
||||
Toast.makeText(this,"用户名或密码不对",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,145 +0,0 @@
|
||||
package com.example.test.activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import com.example.test.R;
|
||||
import com.lljjcoder.Interface.OnCityItemClickListener;
|
||||
import com.lljjcoder.bean.CityBean;
|
||||
import com.lljjcoder.bean.DistrictBean;
|
||||
import com.lljjcoder.bean.ProvinceBean;
|
||||
import com.lljjcoder.citywheel.CityConfig;
|
||||
import com.lljjcoder.style.citypickerview.CityPickerView;
|
||||
|
||||
public class register extends AppCompatActivity implements View.OnClickListener, RadioGroup.OnCheckedChangeListener {
|
||||
private EditText userEdit;
|
||||
private EditText passEdit;
|
||||
private EditText paEdit;
|
||||
private RadioGroup sexBut;
|
||||
private TextView adressText;
|
||||
private String sex ="男";
|
||||
private Button regBut;
|
||||
CityPickerView citypv;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.register);
|
||||
init();
|
||||
}
|
||||
|
||||
public void init(){
|
||||
citypv = new CityPickerView();
|
||||
citypv.init(this);
|
||||
initConfig();
|
||||
citypv.setOnCityItemClickListener(new OnCityItemClickListener() {
|
||||
@Override
|
||||
public void onSelected(ProvinceBean province, CityBean city, DistrictBean district) {
|
||||
String pro = province.getName();
|
||||
String ci = city.getName();
|
||||
String dis = district.getName();
|
||||
adressText.setText(String.format("%s %s %s",pro,ci,dis));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
}
|
||||
});
|
||||
userEdit = findViewById(R.id.reg_username);
|
||||
passEdit = findViewById(R.id.reg_password);
|
||||
paEdit = findViewById(R.id.reg_apassword);
|
||||
adressText = findViewById(R.id.reg_adress);
|
||||
adressText.setOnClickListener(this);
|
||||
sexBut = findViewById(R.id.reg_sex);
|
||||
sexBut.setOnCheckedChangeListener(this);
|
||||
regBut = findViewById(R.id.reg_register);
|
||||
regBut.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void initConfig() {
|
||||
CityConfig cityConfig = new CityConfig.Builder()
|
||||
.title("选择城市")//标题
|
||||
.titleTextSize(18)//标题文字大小
|
||||
.titleTextColor("#585858")//标题文字颜 色
|
||||
.titleBackgroundColor("#E9E9E9")//标题栏背景色
|
||||
.confirTextColor("#585858")//确认按钮文字颜色
|
||||
.confirmText("ok")//确认按钮文字
|
||||
.confirmTextSize(16)//确认按钮文字大小
|
||||
.cancelTextColor("#585858")//取消按钮文字颜色
|
||||
.cancelText("cancel")//取消按钮文字
|
||||
.cancelTextSize(16)//取消按钮文字大小
|
||||
.setCityWheelType(CityConfig.WheelType.PRO_CITY_DIS)//显示类,只显示省份一级,显示省市两级还是显示省市区三级
|
||||
.showBackground(true)//是否显示半透明背景
|
||||
.visibleItemsCount(7)//显示item的数量
|
||||
.province("浙江省")//默认显示的省份
|
||||
.city("杭州市")//默认显示省份下面的城市
|
||||
.district("滨江区")//默认显示省市下面的区县数据
|
||||
.provinceCyclic(true)//省份滚轮是否可以循环滚动
|
||||
.cityCyclic(true)//城市滚轮是否可以循环滚动
|
||||
.districtCyclic(true)//区县滚轮是否循环滚动
|
||||
.drawShadows(false)//滚轮不显示模糊效果
|
||||
.setLineColor("#03a9f4")//中间横线的颜色
|
||||
.setLineHeigh(5)//中间横线的高度
|
||||
.setShowGAT(true)//是否显示港澳台数据,默认不显示
|
||||
.build();
|
||||
citypv.setConfig(cityConfig);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()){
|
||||
case R.id.reg_adress:
|
||||
citypv.showCityPicker();
|
||||
break;
|
||||
case R.id.reg_register:
|
||||
check();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void check() {
|
||||
Intent intent = new Intent(this,login.class);
|
||||
String username = userEdit.getText().toString();
|
||||
String password = passEdit.getText().toString();
|
||||
String apassword = paEdit.getText().toString();
|
||||
String adress = adressText.getText().toString();
|
||||
if(password.equals(apassword)){
|
||||
if(username.equals("")||username.startsWith(" ")||password.equals("")||password.startsWith(" ")){
|
||||
Toast.makeText(this,"用户名或密码为空",Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
if(adress.equals("")||adress.equals("地址选择"))
|
||||
Toast.makeText(this,"未选择地址",Toast.LENGTH_SHORT).show();
|
||||
else{
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("username",username);
|
||||
bundle.putString("password",password);
|
||||
bundle.putString("adress",adress);
|
||||
bundle.putString("sex",sex);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
Toast.makeText(this,"两次密码不一致",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
//根据用户选择来改变sex的值
|
||||
sex = R.id.reg_male==checkedId?"男":"女";
|
||||
}
|
||||
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package com.example.test.activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
public class user extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
private TextView userText;
|
||||
private TextView sexText;
|
||||
private TextView adressText;
|
||||
private Button logoutBut;
|
||||
private View shoppingView;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.content_user);
|
||||
display();
|
||||
}
|
||||
|
||||
private void display() {
|
||||
Intent intent = getIntent();
|
||||
Bundle bundle = intent.getExtras();
|
||||
String username = bundle.getString("username");
|
||||
String sex = bundle.getString("sex");
|
||||
String adress = bundle.getString("adress");
|
||||
userText = findViewById(R.id.user_username);
|
||||
userText.setText(username);
|
||||
sexText = findViewById(R.id.user_sex);
|
||||
sexText.setText(sex);
|
||||
adressText = findViewById(R.id.user_city);
|
||||
adressText.setText(adress);
|
||||
logoutBut = findViewById(R.id.logout);
|
||||
logoutBut.setOnClickListener(this);
|
||||
shoppingView = findViewById(R.id.user_shopping_line);
|
||||
shoppingView.setOnClickListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId())
|
||||
{
|
||||
case R.id.logout:
|
||||
logout();
|
||||
case R.id.user_shopping_line:
|
||||
goShopping();
|
||||
}
|
||||
}
|
||||
|
||||
protected void goShopping() {
|
||||
Intent intent = new Intent(this, fruitFragment.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
protected void logout() {
|
||||
Intent intent = new Intent(this, login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
package com.example.test.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.entity.fruitContent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class fruitContentAdapter extends BaseAdapter {
|
||||
private Holder holder;
|
||||
private fruitContent fruitContents[];
|
||||
private Context context;
|
||||
|
||||
public fruitContentAdapter() {
|
||||
}
|
||||
|
||||
public fruitContentAdapter(fruitContent fruitContents[], Context context) {
|
||||
this.fruitContents = fruitContents;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fruitContents.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return fruitContents[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
public void setBackgroundColor(int position,String color){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View convertview, ViewGroup viewGroup) {
|
||||
holder = new fruitContentAdapter.Holder();
|
||||
fruitContent content = fruitContents[i];
|
||||
if(convertview==null){
|
||||
convertview = LayoutInflater.from(context).inflate(R.layout.fruit_content_item,null);
|
||||
holder.iv_img = convertview.findViewById(R.id.fruit_content_img);
|
||||
holder.tv_name = convertview.findViewById(R.id.fruit_content_name);
|
||||
holder.tv_desc = convertview.findViewById(R.id.fruit_content_desc);
|
||||
holder.tv_tag = convertview.findViewById(R.id.fruit_content_tag);
|
||||
holder.tv_price = convertview.findViewById(R.id.fruit_content_price);
|
||||
convertview.setTag(holder);
|
||||
}else {
|
||||
holder = (fruitContentAdapter.Holder) convertview.getTag();
|
||||
}
|
||||
holder.iv_img.setImageResource(content.getImg());
|
||||
holder.tv_name.setText(content.getName());
|
||||
// holder.tv_name.getPaint().setFakeBoldText(true);
|
||||
holder.tv_desc.setText(content.getDesc());
|
||||
if(content.getTag()==1)
|
||||
holder.tv_tag.setText("爆款直降");
|
||||
holder.tv_price.setText(content.getPrice()+"");
|
||||
return convertview;
|
||||
}
|
||||
static class Holder{
|
||||
ImageView iv_img;
|
||||
TextView tv_name;
|
||||
TextView tv_desc;
|
||||
TextView tv_tag;
|
||||
TextView tv_price;
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package com.example.test.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.entity.fruitKind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class fruitKindAdapter extends BaseAdapter {
|
||||
private List<fruitKind> fruitKinds;
|
||||
private Context context;
|
||||
private Holder holder;
|
||||
private int selected_item=0;
|
||||
|
||||
public fruitKindAdapter() {
|
||||
}
|
||||
|
||||
public fruitKindAdapter(List<fruitKind> fruitKinds, Context context) {
|
||||
this.fruitKinds = fruitKinds;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fruitKinds.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return fruitKinds.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View convertview, ViewGroup viewGroup) {
|
||||
holder = new Holder();
|
||||
fruitKind kind = fruitKinds.get(i);
|
||||
if(convertview==null){
|
||||
convertview = LayoutInflater.from(context).inflate(R.layout.fruit_kind_item,null);
|
||||
if(i == 0){
|
||||
convertview.setBackgroundResource(R.color.gray);
|
||||
}
|
||||
holder.iv_img = convertview.findViewById(R.id.kind_img);
|
||||
holder.tv_name = convertview.findViewById(R.id.kind_name);
|
||||
if(kind.getImg()!=0)
|
||||
holder.iv_img.setImageResource(kind.getImg());
|
||||
holder.tv_name.setText(kind.getName());
|
||||
convertview.setTag(holder);
|
||||
}else {
|
||||
holder = (Holder) convertview.getTag();
|
||||
holder.iv_img.setImageResource(kind.getImg());
|
||||
holder.tv_name.setText(kind.getName());
|
||||
}
|
||||
return convertview;
|
||||
}
|
||||
static class Holder{
|
||||
ImageView iv_img;
|
||||
TextView tv_name;
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
package com.example.test.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class titleAdapter extends BaseAdapter {
|
||||
private String titles[];
|
||||
private Context context;
|
||||
|
||||
public titleAdapter() {
|
||||
}
|
||||
|
||||
public titleAdapter(String[] titles, Context context) {
|
||||
this.titles = titles;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return titles.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return titles[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View convertview, ViewGroup viewGroup) {
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.list_item,null);
|
||||
TextView text = view.findViewById(R.id.item_title);
|
||||
text.setText(titles[i]);
|
||||
return view;
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
package com.example.test.entity;
|
||||
|
||||
public class OrangeUser {
|
||||
private Integer id;
|
||||
private String username;
|
||||
private String password;
|
||||
private String sex;
|
||||
private String city;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrangeUser{" +
|
||||
"username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", sex='" + sex + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.example.test.entity;
|
||||
|
||||
public class fruit {
|
||||
private String name;
|
||||
private double price;
|
||||
|
||||
public fruit() {
|
||||
}
|
||||
|
||||
public fruit(String name, double price) {
|
||||
this.name = name;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.example.test.entity;
|
||||
|
||||
public class fruitContent {
|
||||
private int img;
|
||||
private String name;
|
||||
private String desc;
|
||||
private int tag;
|
||||
private double price;
|
||||
|
||||
public fruitContent() {
|
||||
}
|
||||
|
||||
public fruitContent(int img, String name, String desc, int tag, double price) {
|
||||
this.img = img;
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.tag = tag;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public int getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(int img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(int tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
package com.example.test.entity;
|
||||
|
||||
public class fruitKind {
|
||||
private String name;
|
||||
private int img;
|
||||
|
||||
public fruitKind() {
|
||||
}
|
||||
|
||||
public fruitKind(String name, int img) {
|
||||
this.name = name;
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(int img) {
|
||||
this.img = img;
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package com.example.test.entity;
|
||||
|
||||
public class planet {
|
||||
private String name;
|
||||
private int img;
|
||||
private String desc;
|
||||
|
||||
public planet() {
|
||||
}
|
||||
|
||||
public planet(String name, int img, String desc) {
|
||||
this.name = name;
|
||||
this.img = img;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(int img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.service.quicksettings.Tile;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.activity.fragmentActivity;
|
||||
|
||||
public class contentFragment extends Fragment {
|
||||
private TextView tv_content;
|
||||
private ImageView iv_img ;
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view =inflater.inflate(R.layout.fragment_content, container, false);
|
||||
if(view!=null){
|
||||
tv_content=view.findViewById(R.id.content_content);
|
||||
iv_img=view.findViewById(R.id.content_img);
|
||||
}
|
||||
setcontent(((fragmentActivity)getActivity()).getContents()[0],((fragmentActivity)getActivity()).getImgs()[0]);
|
||||
return view;
|
||||
}
|
||||
|
||||
public void setcontent(String content,int img){
|
||||
tv_content.setText(content);
|
||||
iv_img.setImageResource(img);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.activity.fruitFragment;
|
||||
import com.example.test.adapter.fruitContentAdapter;
|
||||
import com.example.test.entity.fruitContent;
|
||||
|
||||
import java.nio.file.NotLinkException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class fruitContentFragment extends Fragment {
|
||||
private View view;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
view= inflater.inflate(R.layout.fragment_fruit_content, container, false);
|
||||
fruitFragment activity=(fruitFragment)getActivity();
|
||||
List<fruitContent[]> fruitContents = activity.getFruitContents();
|
||||
show(fruitContents.get(0));
|
||||
return view;
|
||||
}
|
||||
public void show(fruitContent fruitContents[]){
|
||||
ListView listView = view.findViewById(R.id.fruit_content_listview);
|
||||
listView.setDivider(null);
|
||||
fruitContentAdapter adapter = new fruitContentAdapter(fruitContents,getActivity());
|
||||
listView.setAdapter(adapter);
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.activity.fruitFragment;
|
||||
import com.example.test.adapter.fruitKindAdapter;
|
||||
import com.example.test.entity.fruitContent;
|
||||
import com.example.test.entity.fruitKind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class fruitKindFragment extends Fragment {
|
||||
|
||||
private int selected_item = 0;
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view=inflater.inflate(R.layout.fragment_fruit_kind, container, false);
|
||||
ListView listView = view.findViewById(R.id.kind_listview);
|
||||
listView.setDivider(null);
|
||||
listView.setDividerHeight(30);
|
||||
fruitFragment activity = (fruitFragment) getActivity();
|
||||
List<fruitKind> fruitKinds = activity.getfuritKinds();
|
||||
fruitKindAdapter fruitKindAdapter = new fruitKindAdapter(fruitKinds, getActivity());
|
||||
listView.setAdapter(fruitKindAdapter);
|
||||
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
fruitFragment activity=(fruitFragment)getActivity();
|
||||
List<fruitContent[]> list = activity.getFruitContents();
|
||||
fruitContentFragment fragment = (fruitContentFragment)activity.getSupportFragmentManager().findFragmentById(R.id.fruit);
|
||||
fragment.show(list.get(i));
|
||||
if(i!=selected_item){
|
||||
adapterView.getChildAt(selected_item).setBackgroundResource(R.color.white);
|
||||
adapterView.getChildAt(i).setBackgroundResource(R.color.gray);
|
||||
selected_item=i;
|
||||
}
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.example.test.R;
|
||||
|
||||
public class rightSeconedFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_right_second, container, false);
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.activity.fragmentActivity;
|
||||
import com.example.test.adapter.titleAdapter;
|
||||
|
||||
|
||||
public class titleFragment extends Fragment {
|
||||
private String titles[];
|
||||
private String contents[];
|
||||
private int imgs[];
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view= inflater.inflate(R.layout.fragment_title, container, false);
|
||||
initListView(view);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
public void initListView(View view) {
|
||||
fragmentActivity activity = (fragmentActivity) getActivity();
|
||||
titles = activity.getTitles();
|
||||
contents = activity.getContents();
|
||||
imgs=activity.getImgs();
|
||||
ListView listview = view.findViewById(R.id.listview);
|
||||
titleAdapter titleAdapter = new titleAdapter(titles,activity);
|
||||
listview.setAdapter(titleAdapter);
|
||||
listview.setOnItemClickListener(new AdapterView.OnItemClickListener(){
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
contentFragment cf= (contentFragment)((fragmentActivity) getActivity()).
|
||||
getSupportFragmentManager().findFragmentById(R.id.content);
|
||||
cf.setcontent(contents[i],imgs[i]);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 14 KiB |
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="#EFB81C" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#c0c0c0" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="#c0c0c0" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#c0c0c0" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 801 B |
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 448 B |
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 这个是选中的时候item显示背景色 -->;
|
||||
<item android:drawable="@color/yellow" android:state_selected="true"/>
|
||||
<!-- 未选中时的背景颜色 -->
|
||||
<item android:drawable="@color/white"/>
|
||||
</selector>
|
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 608 B |
@ -1,170 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
Before Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 7.8 KiB |
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#FFFFFF"/>
|
||||
<corners android:radius="2dip"/>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFFFFF"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:src="@drawable/arrow_down" android:gravity="end"/>
|
||||
</item>
|
||||
</layer-list>
|
Before Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB |
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal">
|
||||
<fragment
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:name="com.example.test.fragment.titleFragment"
|
||||
android:layout_weight="1"
|
||||
tools:layout="@layout/fragment_title"/>
|
||||
<fragment
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:name="com.example.test.fragment.contentFragment"
|
||||
tools:layout="@layout/fragment_content"/>
|
||||
|
||||
</LinearLayout>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.fruitFragment">
|
||||
<fragment
|
||||
android:id="@+id/kind"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="23"
|
||||
android:name="com.example.test.fragment.fruitKindFragment"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
<fragment
|
||||
android:id="@+id/fruit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="77"
|
||||
android:name="com.example.test.fragment.fruitContentFragment"/>
|
||||
</LinearLayout>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.login">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.user">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,235 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#E8E8E8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/people" />
|
||||
|
||||
<!--卡券-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_pay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="40dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_pay"
|
||||
android:textColor="#000"
|
||||
android:text="卡券"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--账号-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_username_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_username"
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_account"
|
||||
android:textColor="#000"
|
||||
android:text="账号:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--性别-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_sex_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="1dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_sex"
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:drawableLeft="@drawable/user_sex"
|
||||
android:textColor="#000"
|
||||
android:text="性别:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--城市-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_city_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="1dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_city"
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/city"
|
||||
android:textColor="#000"
|
||||
android:text="城市:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--通用-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_general"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_general"
|
||||
android:textColor="#000"
|
||||
android:text="通用"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--购物-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_shopping_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="1dp"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/user_shopping"
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:drawableLeft="@drawable/cart"
|
||||
android:textColor="#000"
|
||||
android:text="购物"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--设置-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="35dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/setting"
|
||||
android:textColor="#000"
|
||||
android:text="设置"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/logout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="150dp"
|
||||
android:text="退出登录"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/button_login"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/content_img"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
<TextView
|
||||
android:id="@+id/content_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".fragment.fruitContentFragment">
|
||||
<ListView
|
||||
android:id="@+id/fruit_content_listview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</FrameLayout>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".fragment.fruitKindFragment">
|
||||
<ListView
|
||||
android:id="@+id/kind_listview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</FrameLayout>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ListView
|
||||
android:id="@+id/listview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/fruit_content_img"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="3">
|
||||
<TextView
|
||||
android:id="@+id/fruit_content_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/fruit_content_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textFontWeight="5"/>
|
||||
<TextView
|
||||
android:id="@+id/fruit_content_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/red" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/fruit_content_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="/份"/>
|
||||
<ImageView
|
||||
android:layout_marginLeft="150dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/shopping"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp">
|
||||
<ImageView
|
||||
android:id="@+id/kind_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"/>
|
||||
<TextView
|
||||
android:id="@+id/kind_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/item_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|