1550812172 2 years ago
parent 9b0fd87656
commit a4b7b2113b

14
.gitignore vendored

@ -0,0 +1,14 @@
*.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

3
.idea/.gitignore vendored

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1 @@
Activity_FragmentTabHost

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<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
app/.gitignore vendored

@ -0,0 +1 @@
/build

@ -0,0 +1,51 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 31
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "ee.example.activity_fragmenttabhost"
minSdkVersion 16
targetSdkVersion 31
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 fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.youth.banner:banner:1.4.10' //
//
implementation 'com.github.bumptech.glide:glide:4.11.0'
//recyclerview
implementation 'androidx.recyclerview:recyclerview:1.1.0'
//viewpager2
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
implementation 'com.qmuiteam:qmui:1.1.2'
implementation 'com.android.support:recyclerview-v7:30.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 ee.example.activity_fragmenttabhost;
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("ee.example.activity_fragmenttabhost", appContext.getPackageName());
}
}

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ee.example.activity_fragmenttabhost">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/承德避暑山庄"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".LoginActivity"
android:banner="@android:style/Theme.Light.NoTitleBar"
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=".Content"
android:label="详情"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="false" />
<activity
android:name=".Regiter"
android:exported="false" />
<activity
android:name=".MainChangemima"
android:exported="false" />
<activity
android:name=".New1"
android:exported="false" />
</application>
</manifest>

@ -0,0 +1,34 @@
package ee.example.activity_fragmenttabhost;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;
public class Content extends AppCompatActivity {
private ImageView imageView1;
private TextView textView1,textView2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_content);
intidata();
if(Data.sat_con==0){
imageView1.setImageResource(R.drawable.jinianguan);
textView1.setText(R.string.con1);
textView2.setText(R.string.con11);
}
else if(Data.sat_con==1){
imageView1.setImageResource(R.drawable.jinian2);
textView1.setText(R.string.con2);
textView2.setText(R.string.con22);
}
}
private void intidata(){
imageView1=(ImageView)findViewById(R.id.conImage1);
textView1=findViewById(R.id.conText1);
textView2=findViewById(R.id.conText2);
}
}

@ -0,0 +1,39 @@
package ee.example.activity_fragmenttabhost;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.view.View;
public class Data {
public static Boolean sta_dl=true;
public static Boolean sta_np=false;
public static String sta_name;
public static String sta_password;
public static int sat_con=0;
public static ArrayList<Integer> images = new ArrayList<Integer>();
public static void initView()
{
images.add(R.drawable.fj1);
images.add(R.drawable.fj2);
images.add(R.drawable.fj3);
images.add(R.drawable.fj4);
images.add(R.drawable.fj5);
/*imageTitle.add("西柏坡");
imageTitle.add("2");
imageTitle.add("3");
imageTitle.add("4");
imageTitle.add("5");
imageTitle.add("6");*/
}
}

@ -0,0 +1,34 @@
package ee.example.activity_fragmenttabhost;
public class Data2 {
private String new_title;
private String new_content;
private String content_title;
public Data2(String new_title,String content_title, String new_content) {
this.new_title = new_title;
this.new_content = new_content;
this.content_title = content_title;
}
public String getNew_title() {
return new_title;
}
public String getContent_title() {
return content_title;
}
public String getNew_content() {
return new_content;
}
public void setNew_title(String new_title) {
this.new_title = new_title;
}
public void setNew_content(String new_content) {
this.new_content = new_content;
}
}

@ -0,0 +1,38 @@
package ee.example.activity_fragmenttabhost;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class DataBaseHelper extends SQLiteOpenHelper {
private static DataBaseHelper instance;
private static String CREATE_USERS="create table users"
+"(id integer primary key autoincrement,"
+"name text,"
+"password text)";
public DataBaseHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
sqLiteDatabase.execSQL(CREATE_USERS);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
}
public static DataBaseHelper getInstance(Context context){
if(instance==null)
instance =new DataBaseHelper(context,"travel.db",null,2);
return instance;
}
}

@ -0,0 +1,43 @@
package ee.example.activity_fragmenttabhost;
public class Datas {
public static int[] icons = {
R.drawable.bishu,
R.drawable.chengde,
R.drawable.fj1,
R.drawable.fj5,
R.drawable.fj2,
R.drawable.fj3,
R.drawable.fj4,
R.drawable.fj6,
R.drawable.fj7,
R.drawable.fj8,
R.drawable.fj9,
R.drawable.fj10,
R.drawable.fj11,
R.drawable.fj12,
R.drawable.fj13,
R.drawable.fj14,
R.drawable.fj15,
};
public static String[] title = {
"承德避暑山庄",
"承德苏联红军烈士纪念碑",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
"景点",
};
}

@ -0,0 +1,17 @@
package ee.example.activity_fragmenttabhost;
import android.content.Context;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.youth.banner.loader.ImageLoader;
public class GlideImageLoader extends ImageLoader {
@Override
public void displayImage(Context context, Object path, ImageView imageView) {
//Glide 加载图片简单用法
Glide.with(context).load(path).into(imageView);
}
}

@ -0,0 +1,6 @@
package ee.example.activity_fragmenttabhost;
public class ItemBean {
public int icon;//图片资源
public String title;//标题
}

@ -0,0 +1,165 @@
package ee.example.activity_fragmenttabhost;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.RequiresApi;
public class LoginActivity extends Activity {
private EditText name;
private EditText password;
private TextView jum;
private Button zhuce;
private Button denglu;
private CheckBox cb1;
private CheckBox cb2;
static private String SPdata="SPdata";
static private String SPname="name";
static private String SPpassword="password";
static private String SPauto="auto";
static private String spname;
static private String spassword;
static private boolean spauto;
private DataBaseHelper dbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
//setStatusBar();
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
//getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
intiview();
dbHelper=DataBaseHelper.getInstance(this);
spauto=false;
checkIfRemember();
if(Data.sta_dl==true)
if(spauto==true) {
Intent intent=new Intent(LoginActivity.this,MainActivity.class);
Data.sta_np=true;
startActivity(intent);
finish();
}
jum.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(LoginActivity.this,MainActivity.class);
startActivity(intent);
Data.sta_np=false;
finish();
}
});
zhuce.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(LoginActivity.this, Regiter.class);
startActivity(intent);
}
});
denglu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SQLiteDatabase db=dbHelper.getWritableDatabase();
String Name=name.getText().toString();
String Password=password.getText().toString();
if(Name.equals("")){
Toast.makeText(LoginActivity.this,"账号不能为空",Toast.LENGTH_SHORT).show();
}
else {
if(Password.equals("")){
Toast.makeText(LoginActivity.this,"密码不能为空",Toast.LENGTH_SHORT).show();
}
else{
Cursor cursor;
cursor = db.rawQuery("select password from users where name=?",new String[]{Name});
if(cursor.moveToNext()){
@SuppressLint("Range")
String true_password = cursor.getString(cursor.getColumnIndex("password"));
cursor.close();
if(true_password.equals(Password)){
if(cb1.isChecked()){
if(cb2.isChecked()) {
spauto=true;
rememberMe(Name, Password,spauto);
Data.sta_dl=true;}
else { spauto=false ;rememberMe(Name,Password,spauto);} //将用户的帐号与密码存入SharedPreferences
}
else { spauto=false ;rememberMe(null,null,spauto);}
Toast.makeText(LoginActivity.this,"登录成功",Toast.LENGTH_SHORT).show();
Intent intent=new Intent(LoginActivity.this,MainActivity.class);
Data.sta_np=true;
Data.sta_name=Name;
Data.sta_password=true_password;
startActivity(intent);
finish();
}
else Toast.makeText(LoginActivity.this,"密码错误,密码应为"+true_password,Toast.LENGTH_SHORT).show();
}
else Toast.makeText(LoginActivity.this,"无此账号,先去注册一个吧",Toast.LENGTH_SHORT).show();
cursor.close();
}
}
}
});
}
private void intiview(){
name=findViewById(R.id.main_zhanghao);
password=findViewById(R.id.main_mima);
zhuce=findViewById(R.id.main_zhuce);
denglu=findViewById(R.id.main_denglu);
jum=findViewById(R.id.tiaoguo);
cb1=findViewById(R.id.Check_Box1);
cb2=findViewById(R.id.Check_Box2);
}
public void checkIfRemember(){
SharedPreferences sp = getSharedPreferences(SPdata,MODE_PRIVATE); //获得SharedPreferences
spname = sp.getString(SPname, null); //取键值对中的帐号值
spassword = sp.getString(SPpassword, null); //取键值对中的密码值
spauto = sp.getBoolean(SPauto, false); //取键值对中的密码值
if(spname != null && spassword!= null){
Data.sta_name=spname;
Data.sta_password=spassword;
name.setText(spname); //给EditText控件赋帐号
password.setText(spassword); //给EditText控件赋密码
cb1.setChecked(true);
if(spauto==true) cb2.setChecked(true);
}
}
public void rememberMe(String name1,String password1,boolean auto1){
SharedPreferences sp = getSharedPreferences(SPdata,MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit(); //获得Editor
editor.putString(SPname, name1); //将用户的帐号存入Preferences
editor.putString(SPpassword, password1); //将密码存入Preferences
editor.putBoolean(SPauto , auto1);
editor.commit();
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void setStatusBar(){
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//注意要清除 FLAG_TRANSLUCENT_STATUS flag
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().setStatusBarColor(getResources().getColor(R.color.xml_color));//设置要显示的颜色Color.TRANSPARENT为透明
}
}

@ -0,0 +1,85 @@
package ee.example.activity_fragmenttabhost;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTabHost;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.TabHost;
import android.widget.TextView;
import android.view.WindowManager;
public class MainActivity extends AppCompatActivity{
private static final String TAG = "MainActivity";
private Bundle mBundle = new Bundle();
private FragmentTabHost mTabHost;
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
Data.initView();
setContentView(R.layout.activity_main);
Bundle mBundle = new Bundle();
mBundle.putString("tag", TAG);
//初始化tabHost
mTabHost = (FragmentTabHost) findViewById(R.id.tabhost);
//将tabHost和FrameLayout关联
mTabHost.setup(getApplicationContext(), getSupportFragmentManager(), R.id.tabcontent_page);
//添加tab和其对应的fragment
//addTab(标签跳转的Fragment传递参数的Bundle)
mTabHost.addTab(
getTabView(R.string.tab_home, R.drawable.shouye_2),
TabFragment_Home.class,
mBundle);
mTabHost.addTab(
getTabView(R.string.tab_find, R.drawable.faxian),
TabFragment_Find.class,
mBundle);
mTabHost.addTab(
getTabView(R.string.tab_community, R.drawable.shequ),
TabFragment_Community.class,
mBundle);
mTabHost.addTab(
getTabView(R.string.tab_me, R.drawable.wode_1),
TabFragment_Me.class,
mBundle);
//设置tabs之间的分隔线不显示
mTabHost.getTabWidget().setShowDividers(LinearLayout.SHOW_DIVIDER_NONE);
}
private TabHost.TabSpec getTabView(int textId, int imgId) {
String text = getResources().getString(textId);
Drawable drawable = getResources().getDrawable(imgId);
//必须设置图片大小,否则不显示
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
View view_tabitem = getLayoutInflater().inflate(R.layout.item_tabbar, null);
TextView tv_item = (TextView) view_tabitem.findViewById(R.id.tv_item_tabbar);
tv_item.setText(text);
tv_item.setCompoundDrawables(null, drawable, null, null);
TabHost.TabSpec spec = mTabHost.newTabSpec(text).setIndicator(view_tabitem);
return spec;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void setStatusBar(){
//getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//注意要清除 FLAG_TRANSLUCENT_STATUS flag
//getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().setStatusBarColor(getResources().getColor(R.color.xml_color));//设置要显示的颜色Color.TRANSPARENT为透明
}
}

@ -0,0 +1,111 @@
package ee.example.activity_fragmenttabhost;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class MainChangemima extends AppCompatActivity {
private SQLiteDatabase db;
private DataBaseHelper helper;
private EditText main_Gzhanghao;
private EditText main_Oldmima;
private EditText main_Newmima;
private Button main_Gquxiao;
private Button main_Gqueding;
static private String SPdata="SPdata";
static private String SPname="name";
static private String SPpassword="password";
static private String SPauto="auto";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_changemima);
intiview();
main_Gquxiao.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent =new Intent(MainChangemima.this,MainActivity.class);
startActivity(intent);
finish();
}
});
main_Gqueding.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String zhanghao=main_Gzhanghao.getText().toString();
String oldmima=main_Oldmima.getText().toString();
String newmima=main_Newmima.getText().toString();
if(zhanghao.equals("")){
Toast.makeText(MainChangemima.this,"账号不能为空",Toast.LENGTH_SHORT).show();
}
else {
if(oldmima.equals("")&&newmima.equals("")){
Toast.makeText(MainChangemima.this,"新密码或旧密码不能为空",Toast.LENGTH_SHORT).show();
}
else{
Cursor cursor;
cursor = db.rawQuery("select password from users where name=?",new String[]{zhanghao});
if(cursor.moveToNext()){
@SuppressLint("Range")
String true_password = cursor.getString(cursor.getColumnIndex("password"));
cursor.close();
if(true_password.equals(oldmima)){
db.execSQL("update users set password=? where name=?",new String[]{newmima,zhanghao});
Intent intent = new Intent(MainChangemima.this,MainActivity.class);
rememberMe(null, null, false);
startActivity(intent);
finish();
}
else Toast.makeText(MainChangemima.this,"旧密码错误"+true_password,Toast.LENGTH_SHORT).show();
}
else Toast.makeText(MainChangemima.this,"无此账号,先去注册一个吧",Toast.LENGTH_SHORT).show();
cursor.close();
}
}
}
});
}
private void intiview(){
helper=DataBaseHelper.getInstance(this);
db=helper.getWritableDatabase();
main_Gzhanghao=findViewById(R.id.main_gzhanghao);
main_Oldmima=findViewById(R.id.main_oldmima);
main_Newmima=findViewById(R.id.main_newmima);
main_Gquxiao=findViewById(R.id.main_gquxiao);
main_Gqueding=findViewById(R.id.main_gqueding);
}
public void rememberMe(String name1,String password1,boolean auto1){
SharedPreferences sp = getSharedPreferences(SPdata,MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit(); //获得Editor
editor.putString(SPname, name1); //将用户的帐号存入Preferences
editor.putString(SPpassword, password1); //将密码存入Preferences
editor.putBoolean(SPauto , auto1);
editor.commit();
}
@Override
//按两次back键退出
public boolean onKeyDown(int keyCode, KeyEvent event) {
//获取按键并比较两次按back的时间大于2s不退出否则退出
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == 0) {
Intent intent =new Intent(MainChangemima.this,MainActivity.class);
startActivity(intent);
finish();
}
return super.onKeyDown(keyCode, event);
}
}

@ -0,0 +1,75 @@
package ee.example.activity_fragmenttabhost;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.InnerHolder> {
private final List<ItemBean> mData;
private OnItemClickListener mOnItemClickListener;
public MyAdapter(List<ItemBean> data) {
this.mData = data;
}
@NonNull
@Override
public InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = View.inflate(parent.getContext(), R.layout.item_stagger, null);
return new InnerHolder(view);
}
public void setOnItemClickListener(OnItemClickListener mOnItemClickListener) {
this.mOnItemClickListener = mOnItemClickListener;
}
public interface OnItemClickListener {
void onItemClick(View view, int position);
}
@Override
public void onBindViewHolder(@NonNull final InnerHolder holder, int position) {
holder.setData(mData.get(position),position);
if(mOnItemClickListener != null){
//为ItemView设置监听器
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int position = holder.getLayoutPosition(); // 1
mOnItemClickListener.onItemClick(holder.itemView,position); // 2
}
});
}
}
@Override
public int getItemCount() {
//返回条目个数
if (mData != null) {
return mData.size();
}
return 0;
}
public class InnerHolder extends RecyclerView.ViewHolder {
private TextView mTitle;
private ImageView mIcon;
public InnerHolder(@NonNull View itemView) {
super(itemView);
mTitle = (TextView) itemView.findViewById(R.id.title);
mIcon = (ImageView) itemView.findViewById(R.id.icon);
}
public void setData(ItemBean itemBean,int position) {
mTitle.setText(itemBean.title);
mIcon.setImageResource(itemBean.icon);
}
}
}

@ -0,0 +1,56 @@
package ee.example.activity_fragmenttabhost;
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 java.util.List;
public class MyAdapter2 extends BaseAdapter{
private List<Data2> mData;
private Context mContext;
public MyAdapter2(List<Data2> mData, Context mContext) {
this.mData = mData;
this.mContext = mContext;
}
@Override
public int getCount() {
return mData.size();
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if(convertView == null){
convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item,parent,false);
viewHolder = new ViewHolder();
viewHolder.txt_item_title = (TextView) convertView.findViewById(R.id.txt_item_title);
convertView.setTag(viewHolder);
}else{
viewHolder = (ViewHolder) convertView.getTag();
}
viewHolder.txt_item_title.setText(mData.get(position).getNew_title());
return convertView;
}
private class ViewHolder{
TextView txt_item_title;
}
}

@ -0,0 +1,84 @@
package ee.example.activity_fragmenttabhost;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Context;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
public class New1 extends AppCompatActivity {
private TextView txt_title;
private FrameLayout fl_content;
private Context mContext;
private ArrayList<Data2> datas = null;
private FragmentManager fManager = null;
private long exitTime = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
mContext = New1.this;
fManager = getFragmentManager();
bindViews();
datas = new ArrayList<Data2>();
for (int i = 1; i <= 20; i++) {
if(i == 1){
Data2 data1 = new Data2("承德避暑山庄" ,"承德避暑山庄" ,"避暑山庄又称“热河行宫”、“承德离宫”。它从康熙四十二年1703年开始动工兴建至乾隆五十七年1792年最后落成历时89年。清代前中期的几位皇帝几乎每年都来这里消夏避暑处理政务通常是每年农历四、五月份来九、十月份返回北京。避暑山庄实际上已成为清朝的第二政治中心。整个山庄占地564万平方米山庄可分为宫殿区和苑景区两部分宫殿区由正宫、松鹤斋、万壑松风和东宫四组建筑组成。苑景区又分为山区、湖区、平原区三部分。以山区面积最广约占山庄总面积的70%多。山庄集全国园林精华于一园,具有南秀北雄的特点。\n" +
"\n" +
"清代山庄内共有亭子90座堤桥29座碑刻摩崖25处假山叠石70余组殿宇、楼堂、寺庙、亭台、塔阁等各种建筑120余组总建筑面积达10万多平方米。康熙皇帝以4个字命名的36景和乾隆皇帝以3个字命名的36景最为著名合称“避暑山庄72景”。康熙皇帝称赞这里是“自有山川开北极天然风景胜西湖。”山庄宫墙长约10公里因为它形似长城承德人亲切地称它为“小长城”。宫墙外是仿全国各族著名庙宇而修建的皇家寺庙群这些寺庙呈半圆形环绕在山庄-,形成众星拱月之势,象征着当时全国各民族紧紧围绕在清王朝统治中心的周围。随着岁月的流逝,朝代的变更,避暑山庄也历尽了沧桑。新中国成立后,山庄才得到了新生,现在是全国保存得最好、规模最大的皇家园林,是世界文化遗产、是中外驰名的旅游胜地。\n" +
"\n" +
"清朝初年,中国藏传佛教在我国蒙、藏地区(包括青海、新疆)势力强大,教徒信仰虔诚,佛经教义是蒙、-民的精神支柱。喇嘛教上层人物在政治上有效地控制着地方政权,经济上汇聚着大量财富,文化上掌握着经堂教院。清政府为加强对北疆的统治,巩固国家统一,对边疆各少数民族实行“怀柔”政策。“怀柔”政策的一个重要内容就是对蒙藏民族采取“因其教不易其俗”、“以习俗为治”的方针。乾隆说“兴黄教,即所以安众蒙古,所系非小,故不可不保护之”。反映了清统治者以顺应少数民族习俗、尊重蒙藏上层人物宗教信仰,来实现密切地方和中央政府的关系,巩固国家统一为目的的战略思想。\n" +
"\n" +
"避暑山庄自康熙四十七年1708年驻跸使用以后皇帝每年秋狝秋狝(xiǎn):中国古代在不同的季节打猎有不同的称呼。在春季称为春蒐;在夏季称为夏苗;在秋季称为秋狝;在冬季称为冬狩。)前后均要在此长期停住,消夏避暑,处理军政要务。由此而来的大批蒙藏等少数民族首领和外国使臣,每年都要到承德谒见皇帝,参加庆典。借此,清廷便在承德大兴土木,建造寺庙,为前来的上层政教人物提供瞻礼、膜拜等宗教活动场所,功能上同避暑山庄相辅相成,互为补遗。\n" +
" ");
datas.add(data1);}
Data2 data = new Data2("景点" + i,"景点"+i ,i + "~内容~~~~~~~~");
datas.add(data);
}
NewListFragment nlFragment = new NewListFragment(fManager, datas);
FragmentTransaction ft = fManager.beginTransaction();
ft.replace(R.id.fl_content, nlFragment);
ft.commit();
}
private void bindViews() {
txt_title = (TextView) findViewById(R.id.txt_title);
fl_content = (FrameLayout) findViewById(R.id.fl_content);
}
//点击回退键的处理判断Fragment栈中是否有Fragment
//没双击退出程序否则像是Toast提示
//有popbackstack弹出栈
@Override
public void onBackPressed() {
if (fManager.getBackStackEntryCount() == 0) {
if ((System.currentTimeMillis() - exitTime) > 2000) {
Toast.makeText(getApplicationContext(), "再按一次退出程序",
Toast.LENGTH_SHORT).show();
exitTime = System.currentTimeMillis();
} else {
super.onBackPressed();
}
} else {
fManager.popBackStack();
txt_title.setText("新闻列表");
}
}
}

@ -0,0 +1,26 @@
package ee.example.activity_fragmenttabhost;
import android.annotation.SuppressLint;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class NewContentFragment extends Fragment {
@SuppressLint("ValidFragment")
NewContentFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fg_content, container, false);
TextView txt_content = (TextView) view.findViewById(R.id.txt_content);
//getArgument获取传递过来的Bundle对象
txt_content.setText(getArguments().getString("content"));
return view;
}
}

@ -0,0 +1,62 @@
package ee.example.activity_fragmenttabhost;
import android.annotation.SuppressLint;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import java.util.ArrayList;
@SuppressLint("ValidFragment")
public class NewListFragment extends Fragment implements AdapterView.OnItemClickListener {
private FragmentManager fManager;
private ArrayList<Data2> datas;
private ListView list_news;
public NewListFragment(FragmentManager fManager, ArrayList<Data2> datas) {
this.fManager = fManager;
this.datas = datas;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fg_newlist, container, false);
list_news = (ListView) view.findViewById(R.id.list_news);
MyAdapter2 myAdapter = new MyAdapter2(datas, getActivity());
list_news.setAdapter((ListAdapter) myAdapter);
list_news.setOnItemClickListener(this);
return view;
}
@SuppressLint("ResourceType")
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
FragmentTransaction fTransaction = fManager.beginTransaction();
NewContentFragment ncFragment = new NewContentFragment();
Bundle bd = new Bundle();
bd.putString("content", datas.get(position).getNew_content());
ncFragment.setArguments(bd);
//获取Activity的控件
TextView txt_title = (TextView) getActivity().findViewById(R.id.txt_title);
txt_title.setText(datas.get(position).getNew_content());
txt_title.setText(datas.get(position).getContent_title());
//加上Fragment替换动画
fTransaction.setCustomAnimations(R.anim.fragment_slide_left_enter, R.anim.fragment_slide_left_exit);
fTransaction.replace(R.id.fl_content, ncFragment);
//调用addToBackStack将Fragment添加到栈中
fTransaction.addToBackStack(null);
fTransaction.commit();
}
}

@ -0,0 +1,68 @@
package ee.example.activity_fragmenttabhost;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Regiter extends AppCompatActivity {
private EditText name;
private EditText password;
private Button queren;
private Button quxiao;
private DataBaseHelper dbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.regiter);
dbHelper=DataBaseHelper.getInstance(this);
iniview();
quxiao.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
queren.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String Name= name.getText().toString();
String Password= password.getText().toString();
SQLiteDatabase db = dbHelper.getWritableDatabase();
if(Name.equals("")){
Toast.makeText(Regiter.this,"账号不能为空",Toast.LENGTH_SHORT).show();
}
else {
if(Password.equals("")){
Toast.makeText(Regiter.this,"密码不能为空",Toast.LENGTH_SHORT).show();
}
else{
Cursor cursor = db.rawQuery("select name from users where name=? ", new String[]{Name});
//用户是否存在
if (cursor.moveToNext()){
Toast.makeText(Regiter.this,"该用户已经存在",Toast.LENGTH_SHORT).show();
cursor.close();
}else{
db.execSQL("insert into users(name,password)values(?,?)", new String[]{Name, Password});
Toast.makeText(Regiter.this,"注册成功",Toast.LENGTH_SHORT).show();
cursor.close();
finish();
}
}
}
}
});
}
private void iniview(){
name=findViewById(R.id.zhanghao);
password=findViewById(R.id.mima);
queren=findViewById(R.id.queding);
quxiao=findViewById(R.id.quxiao);
}
}

@ -0,0 +1,38 @@
package ee.example.activity_fragmenttabhost;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
public class TabFragment_Community extends Fragment {
private static final String TAG = "TabFirstFragment";
protected View mView;
protected Context mContext;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mContext = getActivity();
mView = inflater.inflate(R.layout.community, container, false);
return mView;
}
@Override
public void onPause() {
super.onPause();
}
}

@ -0,0 +1,92 @@
package ee.example.activity_fragmenttabhost;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import java.util.ArrayList;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
@SuppressLint("ValidFragment")
public class TabFragment_Find extends Fragment {
private static final String TAG = "TabFirstFragment";
protected View mView;
MyAdapter adapter;
private RecyclerView mlist;//转换为成员变量
private List<ItemBean> mdata;
protected Context mContext;
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
initData();
mlist = getActivity().findViewById(R.id.recycler_view);
showStagger();
adapter.setOnItemClickListener(new MyAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
Toast.makeText(getActivity(), "你点了第" + (position + 1) + "个条目", Toast.LENGTH_SHORT).show();
Data.sat_con = position;
Intent intent = new Intent();
intent.setClass(getActivity(), Content.class);
startActivity(intent);
}
});
}
@Override
public void onCreate (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
private void showStagger () {
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, LinearLayout.VERTICAL);
//这只布局管理器方向
layoutManager.setReverseLayout(false);
mlist.setLayoutManager(layoutManager);
// RecyclerView瀑布流
adapter = new MyAdapter(mdata);
mlist.setAdapter(adapter);
}//创建监听接口
@Override
public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle
savedInstanceState){
mContext = getActivity();
mView = inflater.inflate(R.layout.find, container, false);
return mView;
}
@Override
public void onPause () {
super.onPause();
}
private void initData () {
//listview数据集合<Databea>---adapter创建适配器)----setadapter(设置到listview里面)----显示数据
mdata = new ArrayList<>();//创建数据集合并提取为成员变量
//创建模拟数据
for (int i = 0; i < Datas.icons.length; i++) {
//创建数据对象
ItemBean data = new ItemBean();
data.icon = Datas.icons[i];
data.title = Datas.title[i];
//添加到集合里头
mdata.add(data);
}
}
}

@ -0,0 +1,97 @@
package ee.example.activity_fragmenttabhost;
import android.content.Context;
import android.content.Intent;
import android.graphics.Outline;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.widget.ImageButton;
import android.widget.Toast;
import com.youth.banner.BannerConfig;
import com.youth.banner.listener.OnBannerListener;
import com.youth.banner.Banner;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import static ee.example.activity_fragmenttabhost.Data.initView;
public class TabFragment_Home extends Fragment {
private static final String TAG = "TabFirstFragment";
protected Context mContext;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
Banner banner = getActivity().findViewById(R.id.banner);
super.onActivityCreated(savedInstanceState);
banner.setImageLoader(new GlideImageLoader());//创建Gli类继承imageloader类
banner.setImages(Data.images);
//banner.setBannerTitles(imageTitle);
banner.setIndicatorGravity(BannerConfig.CENTER);//设置指示器位置
//设置是否自动轮播(不设置则默认自动)
banner.isAutoPlay(true);
//设置轮播图片间隔时间不设置默认为2000
banner.setDelayTime(2500);
//设置圆角
banner.setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 30);
}
});
banner.setClipToOutline(true);
banner.setIndicatorGravity(BannerConfig.CENTER);
banner.setImages(Data.images)//设置监听
.setOnBannerListener(new OnBannerListener() {
@Override
public void OnBannerClick(int position) {
Toast.makeText(getActivity(), "你点了第" + (position + 1) + "张轮播图", Toast.LENGTH_SHORT).show();
}
})
.start();//最后调用的方法启动轮播
ImageButton imageButton = getActivity().findViewById(R.id.imb_queding);
imageButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Toast.makeText(getActivity(), "success2",Toast.LENGTH_LONG).show();
Intent intent = new Intent(getActivity(),New1.class);
startActivity(intent);
}
});
}
@Override
public void onCreate( Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initView();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mContext=getActivity();
View mView = inflater.inflate(R.layout.home, container, false);
return mView;
}
@Override
public void onPause() {
super.onPause();
}
}

@ -0,0 +1,80 @@
package ee.example.activity_fragmenttabhost;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
public class TabFragment_Me extends Fragment {
protected View mView;
protected Context mContext;
private Button me_Tuichu;
private Button me_Gaimima;
// private Button me_Gainicheng;
private TextView me_Zhanghu;
@Override
public void onActivityCreated( Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
intiview();
me_Tuichu.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
//Data.sta_dl=false;Intent intent=new Intent(getActivity(),LoginActivity.class);
Data.sta_dl=false;Intent intent=new Intent(getActivity(),LoginActivity.class);
startActivity(intent);
Data.images.clear();
getActivity().finish();
}
});
me_Gaimima.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent =new Intent(getActivity(),MainChangemima.class);
startActivity(intent);
Data.images.clear();
getActivity().finish();
}
});
if(Data.sta_np==true){
me_Zhanghu.setText("当前账户为:"+ Data.sta_name+" 密码为:"+ Data.sta_password);
}
else { me_Zhanghu.setText("当前为游客登陆");}
}
@Override
public void onCreate( Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mContext=getActivity();
mView=inflater.inflate(R.layout.me,container,false);
return mView;
}
@Override
public void onPause() {
super.onPause();
}
private void intiview(){
me_Tuichu=getActivity().findViewById(R.id.me_tuichu);
me_Zhanghu=getActivity().findViewById(R.id.me_zhanghu);
me_Gaimima=getActivity().findViewById(R.id.me_gaimima);
//me_Gainicheng=getActivity().findViewById(R.id.me_gainicheng);
}
}

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="100dp" android:valueTo="0dp"
android:valueType="floatType"
android:propertyName="translationX"
android:duration="@android:integer/config_mediumAnimTime" />
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="0.0" android:valueTo="1.0"
android:valueType="floatType"
android:propertyName="alpha"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="0dp" android:valueTo="-100dp"
android:valueType="floatType"
android:propertyName="translationX"
android:duration="@android:integer/config_mediumAnimTime" />
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="1.0" android:valueTo="0.0"
android:valueType="floatType"
android:propertyName="alpha"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="-100dp" android:valueTo="0dp"
android:valueType="floatType"
android:propertyName="translationX"
android:duration="@android:integer/config_mediumAnimTime" />
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="0.0" android:valueTo="1.0"
android:valueType="floatType"
android:propertyName="alpha"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="0dp" android:valueTo="100dp"
android:valueType="floatType"
android:propertyName="translationX"
android:duration="@android:integer/config_mediumAnimTime" />
<objectAnimator
android:interpolator="@android:interpolator/decelerate_quint"
android:valueFrom="1.0" android:valueTo="0.0"
android:valueType="floatType"
android:propertyName="alpha"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

@ -0,0 +1,30 @@
<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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/shequ" />
<item android:drawable="@drawable/shequ" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/shouye_2"/>
<item android:drawable="@drawable/home"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/faxian" />
<item android:drawable="@drawable/faxian" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/shouye_2" />
<item android:drawable="@drawable/shouye_2" />
</selector>

@ -0,0 +1,170 @@
<?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="#3DDC84"
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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/wode_1"/>
<item android:drawable="@drawable/wode_1" />
</selector>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomLeftRadius="8sp"
android:topLeftRadius="8sp"
android:bottomRightRadius="8sp"
android:topRightRadius="8sp"/>
<solid android:color="#3ED1D1D1"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -0,0 +1,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/tab_bg_s" />
<item android:drawable="@drawable/tab_bg_n" />
</selector>

@ -0,0 +1,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="@color/tab_text_selected" />
<item android:color="@color/tab_text_normal" />
</selector>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@ -0,0 +1,48 @@
<?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"
android:orientation="vertical"
tools:context=".Content">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToOutline="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ImageView
android:layout_marginTop="25dp"
android:id="@+id/conImage1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:src="@drawable/jinian2"
/>
<TextView
android:layout_marginLeft="8sp"
android:layout_marginRight="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:id="@+id/conText1"
android:textColor="#03A9F4"/>
<TextView
android:layout_marginLeft="8sp"
android:layout_marginRight="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/conText2"
android:layout_marginBottom="30dp"
android:textColor="#303030"/>
</LinearLayout>
</ScrollView>
</LinearLayout>

@ -0,0 +1,30 @@
<?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="vertical" >
<!--<GridView android:verticalSpacing="2dp"
android:numColumns="3"
android:horizontalSpacing="2dp"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/gridView" xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"/>-->
<!--
把FragmentLayout放在FragmentTabHost上面标签页就在页面底部
反之FragmentLayout在FragmentTabHost下面标签页就在页面顶部。
-->
<FrameLayout
android:id="@+id/tabcontent_page"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<androidx.fragment.app.FragmentTabHost
android:id="@+id/tabhost"
android:layout_width="match_parent"
android:layout_height="@dimen/tabbar_height" />
</LinearLayout>

@ -0,0 +1,31 @@
<RelativeLayout 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=".MainActivity">
<TextView
android:id="@+id/txt_title"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/text_selector"
android:textColor="@color/white"
android:text="新闻列表"
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txt_title"
android:layout_marginTop="1dp"
android:fillViewport="true">
<FrameLayout
android:id="@+id/fl_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/txt_title" />
</ScrollView>
</RelativeLayout>

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:orientation="horizontal"
android:layout_height="match_parent"
tools:context=".MainChangemima"
android:background="@drawable/back">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35sp"
android:gravity="center"
android:text="账 号:"
android:textColor="@color/textcolorhint"
android:textSize="@dimen/txtsize" />
<EditText
android:id="@+id/main_gzhanghao"
android:layout_width="230sp"
android:layout_height="match_parent"
android:background="@color/editcolor"
android:gravity="center"
android:hint="请输入账号"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35sp"
android:gravity="center"
android:text="旧密码:"
android:textColor="@color/textcolorhint"
android:textSize="@dimen/txtsize" />
<EditText
android:id="@+id/main_oldmima"
android:layout_width="230sp"
android:layout_height="match_parent"
android:background="@color/editcolor"
android:gravity="center"
android:hint="请输入旧密码"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35sp"
android:gravity="center"
android:text="新密码:"
android:textColor="@color/textcolorhint"
android:textSize="@dimen/txtsize" />
<EditText
android:id="@+id/main_newmima"
android:layout_width="230sp"
android:layout_height="match_parent"
android:background="@color/editcolor"
android:gravity="center"
android:hint="请输入新密码"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="100sp"
android:layout_height="wrap_content"
android:id="@+id/main_gquxiao"
android:text="取消"
android:backgroundTint="#3867AC"/>
<Button
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_marginLeft="30sp"
android:id="@+id/main_gqueding"
android:text="确定"
android:backgroundTint="#3867AC"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/xml_color"
android:orientation="vertical"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:background="@color/mTbhost_coloe"
android:orientation="vertical"
android:layout_height="45sp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18sp"
android:layout_marginTop="10sp"
android:background="@color/mTbhost_coloe"
android:gravity="center"
android:text="消息通知"
android:textColor="#323232"
android:textSize="22sp"
android:textStyle="bold" />
<ImageButton
android:layout_width="22sp"
android:layout_height="22sp"
android:layout_alignParentEnd="true"
android:layout_marginTop="15dp"
android:layout_marginEnd="45sp"
android:background="@color/mTbhost_coloe"
android:scaleType="fitCenter"
android:src="@drawable/cleaner"
android:layout_alignParentRight="true"
android:layout_marginRight="45sp" />
</RelativeLayout>
<TextView
android:layout_marginTop="25sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="暂无通知"
android:textColor="#CACACA"
android:gravity="center"
android:textSize="30sp"/>
</LinearLayout>

@ -0,0 +1,15 @@
<?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="vertical">
<TextView
android:id="@+id/txt_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@color/blue"
android:textSize="20sp" />
</LinearLayout>

@ -0,0 +1,13 @@
<?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="@color/white"
android:orientation="horizontal">
<ListView
android:id="@+id/list_news"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

@ -0,0 +1,27 @@
<RelativeLayout 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=".MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToOutline="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color" />
</LinearLayout>
</ScrollView>
</RelativeLayout>

@ -0,0 +1,17 @@
<?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="@color/white"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:id="@+id/tv_community"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@color/tab_text_normal"
android:textSize="20sp" />
</LinearLayout>

@ -0,0 +1,20 @@
<?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="@color/white"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:id="@+id/tv_find"
android:layout_width="393dp"
android:layout_height="166dp"
android:gravity="bottom|left"
android:textColor="@color/tab_text_normal"
android:textSize="20sp"
/>
</LinearLayout>

@ -0,0 +1,27 @@
<?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="@color/white"
android:orientation="vertical"
android:padding="10dp" >
<!--<GridView android:verticalSpacing="2dp"
android:numColumns="3"
android:horizontalSpacing="2dp"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/gridView" xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"/>
-->
<TextView
android:id="@+id/tv_home"
android:layout_width="393dp"
android:layout_height="166dp"
android:gravity="bottom|left"
android:textColor="@color/tab_text_normal"
android:textSize="20sp"
/>
</LinearLayout>

@ -0,0 +1,17 @@
<?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="@color/white"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:id="@+id/tv_me"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom|center"
android:textColor="@color/tab_text_normal"
android:textSize="20sp" />
</LinearLayout>

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<LinearLayout android:padding="5dp"
android:background="#eeeeee"
android:gravity="center_horizontal"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<!--<ImageView android:layout_height="40dp"
android:layout_width="40dp"
android:layout_marginBottom="10dp"
android:id="@+id/img"/>
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginBottom="5dp"
android:id="@+id/name"
android:textSize="12sp"/>-->
</LinearLayout>

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="@color/xml_color"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginLeft="25sp"
android:layout_marginTop="10sp"
android:layout_marginRight="25sp"
android:background="@drawable/searchyuanjiao"
android:iconifiedByDefault="false"
android:queryBackground="@null"
android:queryHint="请输入搜索内容" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10sp"
android:layout_marginLeft="10sp"
android:layout_marginTop="8sp"
android:orientation="horizontal">
<com.youth.banner.Banner
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="240dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/searchyuanjiao"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/xml_color"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/jingdian" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:gravity="center"
android:text="红色景点"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<!--
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/guozhi" />- -->
<ImageButton
android:id="@+id/imb_queding"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerInParent="true"
android:src="@drawable/guozhi"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:gravity="center"
android:text="特色景点"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/xml_color"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/ditu" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:background="@color/xml_color"
android:gravity="center"
android:text="公共空间"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/tuji" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:gravity="center"
android:text="图集"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/searchyuanjiao"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/gonglve" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:gravity="center"
android:text="攻略"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="1"
android:background="@color/xml_color"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="@color/xml_color"
android:src="@drawable/youji" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/xml_color"
android:gravity="center"
android:text="游记"
android:textColor="@color/textcolorhint"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:src="@drawable/fj1" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/icon"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_marginTop="25dp"
android:textSize="20sp" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_item_tabbar"
style="@style/TabLable"/>
</LinearLayout>

@ -0,0 +1,16 @@
<?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="vertical">
<TextView
android:id="@+id/txt_item_title"
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center_vertical"
android:text="呵呵"
android:textColor="#000000"
android:textSize="20sp" />
</LinearLayout>

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:orientation="horizontal"
tools:context=".MainActivity"
android:background="@drawable/back">
<TextView
android:id="@+id/tiaoguo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="269dp"
android:layout_marginLeft="269dp"
android:layout_marginTop="35sp"
android:layout_marginRight="30sp"
android:text="下次再说>>>"
android:textColor="#2398FF"
android:textSize="20sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35sp"
android:gravity="center"
android:text="账号:"
android:textColor="@color/textcolorhint"
android:textSize="@dimen/txtsize" />
<EditText
android:id="@+id/main_zhanghao"
android:layout_width="230sp"
android:layout_height="match_parent"
android:background="@color/editcolor"
android:gravity="center"
android:hint="请输入账号"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35sp"
android:gravity="center"
android:text="密码:"
android:textColor="@color/textcolorhint"
android:textSize="@dimen/txtsize" />
<EditText
android:id="@+id/main_mima"
android:layout_width="230sp"
android:layout_height="match_parent"
android:background="@color/editcolor"
android:gravity="center"
android:hint="请输入密码"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30sp"
android:orientation="horizontal"
android:layout_marginTop="5sp"
android:gravity="center">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/CheckBoxColor"
android:id="@+id/Check_Box1"
android:text="记住密码"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10sp"
android:textColor="@color/CheckBoxColor"
android:id="@+id/Check_Box2"
android:text="自动登录"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="100sp"
android:layout_height="wrap_content"
android:id="@+id/main_zhuce"
android:text="注册"
android:backgroundTint="#3867AC"/>
<Button
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_marginLeft="30sp"
android:id="@+id/main_denglu"
android:text="登录"
android:backgroundTint="#3867AC"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save