| | |
| | | package com.shsening.autouploadvideos |
| | | |
| | | import android.content.ClipData |
| | | import android.content.ClipboardManager |
| | | import android.content.Context |
| | | import android.os.Bundle |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.webkit.WebView |
| | | import android.widget.ImageView |
| | | import android.widget.TextView |
| | | import android.widget.Toast |
| | | import androidx.fragment.app.Fragment |
| | | |
| | | |
| | | class HelpFragment : Fragment() { |
| | | |
| | |
| | | savedInstanceState: Bundle? |
| | | ): View? { |
| | | val view = inflater.inflate(R.layout.fragment_help, container, false) |
| | | |
| | | val textView = view.findViewById<TextView>(R.id.androidIdText); |
| | | textView.text = "Android ID: ${AppConfig.CLIENT_ANDROID_ID }" |
| | | textView.setOnClickListener { |
| | | val clipboard = requireContext().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager |
| | | val clip = ClipData.newPlainText("label", textView.text) |
| | | clipboard.setPrimaryClip(clip) |
| | | Toast.makeText(requireContext(), AppConfig.MSG_MY_TAB_COPY_TO_CLIPBOARD, Toast.LENGTH_SHORT).show() |
| | | } |
| | | |
| | | // 加载图片 |
| | | val imageView = view.findViewById<ImageView>(R.id.imageView) |
| | | imageView.setImageResource(R.drawable.qrcode) // 请替换为你的图片 |
| | | |
| | | // 设置简介 |
| | | view.findViewById<TextView>(R.id.descriptionText).text = AppConfig.MSG_MY_TAB_ADD_WECHAT |
| | | |
| | | webView = view.findViewById(R.id.webView) |
| | | webView.loadUrl("file:///android_asset/help/help.html") |
| | | |
| | | return view |
| | | } |
| | | } |