首次提交

This commit is contained in:
DelLevin-Home
2026-02-08 22:31:32 +08:00
commit 7dc79172fa
54 changed files with 1403 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
package top.iletter.lvnote;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
public class FragmentProfile extends Fragment {
// ⚠️ 必须有无参构造函数!
public FragmentProfile() {
// Required empty public constructor
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_profile, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// 安全地操作 View
TextView movieCount = view.findViewById(R.id.tv_movie_count);
TextView bookCount = view.findViewById(R.id.tv_book_count);
if (movieCount != null) movieCount.setText("24");
if (bookCount != null) bookCount.setText("18");
}
}