Compare commits

..

No commits in common. '019bd2e7cae760fea2fec76fe40bed8644d5bf0f' and 'c93fe778f5e97c6b546088cf485c81775b597cd4' have entirely different histories.

@ -69,10 +69,10 @@ public class MainActivity extends AppCompatActivity {
FragmentManager fm = getSupportFragmentManager();
Bundle bundle = new Bundle();
if(i==1){
bundle.putString("jumpPage", "trace");
bundle.putString("jumpPage", "route");
mFragments.get(i).setArguments(bundle);
}else if(i==2){
bundle.putString("jumpPage", "location");
bundle.putString("jumpPage", "position");
mFragments.get(i).setArguments(bundle);
}
FragmentTransaction trans = fm.beginTransaction();

@ -3,14 +3,12 @@ package com.example.myapplication.fragment;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.myapplication.R;
import com.example.myapplication.databinding.FragmentDeviseBinding;
public class DeviseFragment extends Fragment {
@ -38,19 +36,6 @@ public class DeviseFragment extends Fragment {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
binding = FragmentDeviseBinding.inflate(inflater, container, false);
binding.cardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.i("devise", "onClick: 我点击了");
if (jumpPage.equals("location")) {
LocationFragment fragment = new LocationFragment();
getFragmentManager().beginTransaction().replace(R.id.frag_layout, fragment).commit();
} else if (jumpPage.equals("trace")) {
TraceFragment fragment = new TraceFragment();
getFragmentManager().beginTransaction().replace(R.id.frag_layout, fragment).commit();
}
}
});
return binding.getRoot();
}
}

@ -15,69 +15,22 @@
android:padding="@dimen/spacing_16"
android:text="已授权设备" />
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginTop="10dp"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginBottom="6dp"
app:cardBackgroundColor="@color/xui_config_color_white"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="true"
app:contentPaddingBottom="10dp"
app:contentPaddingLeft="@dimen/activity_horizontal_margin"
app:contentPaddingRight="@dimen/activity_horizontal_margin"
app:contentPaddingTop="5dp">
<!-- <include layout="@layout/layout_devise_card_item" />-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.xuexiang.xui.widget.imageview.RadiusImageView
android:id="@+id/iv_image"
android:layout_width="100dp"
android:layout_height="80dp"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
android:src="@drawable/normal_photo"
app:riv_border_width="0dp"
app:riv_corner_radius="5dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="20dp"
android:text="设备-1"
android:textColor="@color/black"
android:textSize="@dimen/mine_ques_top" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- <include layout="@layout/devise_cardview"/>-->
<!-- <com.xuexiang.xui.widget.layout.linkage.LinkageScrollLayout-->
<!-- android:id="@+id/lsl_container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:scrollbars="vertical">-->
<!--&lt;!&ndash; <com.xuexiang.xui.widget.layout.linkage.view.LinkageRecyclerView&ndash;&gt;-->
<!--&lt;!&ndash; android:id="@+id/recyclerView"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_width="match_parent"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_height="match_parent"&ndash;&gt;-->
<!--&lt;!&ndash; android:overScrollMode="never"&ndash;&gt;-->
<!--&lt;!&ndash; tools:listitem="@layout/devise_cardview" />&ndash;&gt;-->
<!-- </com.xuexiang.xui.widget.layout.linkage.LinkageScrollLayout>-->
<include layout="@layout/devise_cardview"/>
<!-- <com.xuexiang.xui.widget.layout.linkage.LinkageScrollLayout-->
<!-- android:id="@+id/lsl_container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:scrollbars="vertical">-->
<!--&lt;!&ndash; <com.xuexiang.xui.widget.layout.linkage.view.LinkageRecyclerView&ndash;&gt;-->
<!--&lt;!&ndash; android:id="@+id/recyclerView"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_width="match_parent"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_height="match_parent"&ndash;&gt;-->
<!--&lt;!&ndash; android:overScrollMode="never"&ndash;&gt;-->
<!--&lt;!&ndash; tools:listitem="@layout/devise_cardview" />&ndash;&gt;-->
<!-- </com.xuexiang.xui.widget.layout.linkage.LinkageScrollLayout>-->
</LinearLayout>

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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"
android:background="@color/bg_gray"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.LocationFragment"
android:orientation="vertical">
tools:context=".fragment.LocationFragment">
<com.xuexiang.xui.widget.actionbar.TitleBar
android:id="@+id/titlebar"
@ -19,12 +18,6 @@
android:background="@drawable/shape_gradient_titlebar_background"
android:layout_marginTop="5dp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/map" />
</LinearLayout>
</FrameLayout>
Loading…
Cancel
Save