package com.cscodetech.moverslorry.ui;

import android.os.Build;
import android.os.Bundle;
import android.text.Html;

import com.cscodetech.moverslorry.databinding.ActivityHelpDetailsBinding;

public class HelpDetailsActivity extends BaseActivity {

    private ActivityHelpDetailsBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityHelpDetailsBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        
        binding.imgBack.setOnClickListener(v -> finish());
        
        binding.txtTitle.setText(""+getIntent().getExtras().getString("title"));

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            binding.txtDesc.setText(Html.fromHtml(getIntent().getExtras().getString("desc"), Html.FROM_HTML_MODE_COMPACT));
        } else {
            binding.txtDesc.setText(Html.fromHtml(getIntent().getExtras().getString("desc")));
        }
    }
}
