• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

No view found for id viewpager ( ScaleFragment )

Hello i have a seettings popup in my project and this popup has a view pager i tried a lot of thing but always give this error

java.lang.IllegalArgumentException: No view found for id 0x7f0a013c (com.intek.posseal:id/settingsViewPager) for fragment ScaleFragment{1d3a04f (060fd7e7-c91b-4c15-876b-b19c5c26cec1) id=0x7f0a013c}

my view pager adapter here is

import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentStatePagerAdapter import com.intek.posseal.Activities.Settings.ScaleFragment  class SettingPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {      override fun getItem(i: Int): Fragment {         return ScaleFragment()     }      override fun getCount(): Int  = 1 } 

and here is my popup code

fun configurePopup(context: PosActivity) {         val myDialog = Dialog(context)         myDialog.requestWindowFeature(Window.FEATURE_NO_TITLE)         myDialog.setContentView(R.layout.popup_settings)         myDialog.setCancelable(false)         myDialog.setCanceledOnTouchOutside(false)         myDialog.window!!.attributes.windowAnimations = R.style.DialogAnimation         myDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))          val btnLogOut = myDialog.findViewById(R.id.popupLogOut)         val imgSave = myDialog.findViewById(R.id.imgSave)         val gvMenus = myDialog.findViewById(R.id.gvMenus)         pager = myDialog.findViewById(R.id.settingsViewPager)         pager!!.adapter = SettingPagerAdapter(context.supportFragmentManager)         myDialog.show()         } 

and my fragment

import android.app.Dialog import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.Window import android.widget.AdapterView import android.widget.ArrayAdapter import android.widget.Spinner import androidx.fragment.app.Fragment import com.intek.posseal.Data.Models.BaudRates import com.intek.posseal.Data.Models.DataSize import com.intek.posseal.Data.Models.Parity import com.intek.posseal.Data.Models.Scales import com.intek.posseal.Data.Repositories.SettingRepository import com.intek.posseal.Helpers.PortHelper import com.intek.posseal.Popups.SettingsPopup.Companion.settings import com.intek.posseal.R import kotlinx.android.synthetic.main.fragment_scale.*  class ScaleFragment : Fragment() {     private var _settingRepository = SettingRepository()     private var ports = ArrayList()      override fun onCreateView(         inflater: LayoutInflater, container: ViewGroup?,         savedInstanceState: Bundle?     ): View? {         return inflater.inflate(R.layout.fragment_scale, container, false)     } } 

how can i solve this issue what you offer ?

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]