真·最终版
This commit is contained in:
parent
09eed4f584
commit
40d60ce473
|
@ -39,30 +39,6 @@ public class MineFragment extends Fragment {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ImageView imageView = view.findViewById(R.id.imageView47);
|
|
||||||
imageView.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
PictureSelector.create(MineFragment.this)
|
|
||||||
.openGallery(SelectMimeType.ofImage())
|
|
||||||
.setImageEngine(GlideEngine.createGlideEngine())
|
|
||||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
|
||||||
@Override
|
|
||||||
public void onResult(ArrayList<LocalMedia> result) {
|
|
||||||
//result.get(0).getRealPath();
|
|
||||||
Glide.with(MineFragment.this)
|
|
||||||
.load(Uri.fromFile(new File(result.get(0).getRealPath())))
|
|
||||||
.into(imageView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCancel() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
imageView.setImageResource(R.drawable.circle_shape);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -77,7 +77,7 @@ public class WeatherFragment extends Fragment {
|
||||||
TextView textView1,textView2,textView3;
|
TextView textView1,textView2,textView3;
|
||||||
textView1 = view.findViewById(R.id.textView107);
|
textView1 = view.findViewById(R.id.textView107);
|
||||||
textView2 = view.findViewById(R.id.textView108);
|
textView2 = view.findViewById(R.id.textView108);
|
||||||
textView3 = view.findViewById(R.id.textView110);
|
// textView3 = view.findViewById(R.id.textView110);
|
||||||
textView1.setText(response.body().showapi_res_body.f1.day_weather);
|
textView1.setText(response.body().showapi_res_body.f1.day_weather);
|
||||||
textView2.setText(response.body().showapi_res_body.f1.night_air_temperature+"/"+response.body().showapi_res_body.f1.day_air_temperature);
|
textView2.setText(response.body().showapi_res_body.f1.night_air_temperature+"/"+response.body().showapi_res_body.f1.day_air_temperature);
|
||||||
Glide.with(getContext())
|
Glide.with(getContext())
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
android:id="@+id/textView11"
|
android:id="@+id/textView11"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="48dp"
|
||||||
android:text="您的称呼是:"
|
android:text="您的称呼是:"
|
||||||
android:textSize="20dp"
|
android:textSize="20dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
android:id="@+id/et_nickname"
|
android:id="@+id/et_nickname"
|
||||||
android:layout_width="240dp"
|
android:layout_width="240dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="420dp"
|
android:layout_marginTop="440dp"
|
||||||
android:background="@drawable/edittext_rounded_background"
|
android:background="@drawable/edittext_rounded_background"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:hint="请输入您的昵称"
|
android:hint="请输入您的昵称"
|
||||||
|
|
|
@ -513,14 +513,6 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView45"
|
|
||||||
android:layout_width="44dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginEnd="-24dp"
|
|
||||||
android:src="@drawable/img_31"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/imageView47"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/imageView47" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/rounded_button"
|
android:id="@+id/rounded_button"
|
||||||
|
@ -536,14 +528,4 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout4" />
|
app:layout_constraintTop_toBottomOf="@+id/linearLayout4" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView47"
|
|
||||||
android:layout_width="82dp"
|
|
||||||
android:layout_height="86dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:background="@drawable/circle_shape"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:src="@drawable/img_32" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue