skip to Main Content

Android Studio – Kotlin issue while sum 2 variables

val btnAdd = findViewById<Button>(R.id.btnAdd) val btnSub = findViewById<Button>(R.id.btnSub) btnAdd.setOnClickListener { val tx1 = findViewById<TextInputEditText>(R.id.tx1).toString().toInt() val tx2 = findViewById<TextInputEditText>(R.id.tx2).toString().toInt() var result = findViewById<TextView>(R.id.result) result.text = (tx1 + tx2).toString() } I want to sum tx1 and tx2 but i get this message…

VIEW QUESTION

Android Studio – I want to integrate Vimeo Api in to my android application to show my users the private videos in my Vimeo Account

I want to integrate Vimeo Api in to my android application and the problem is after i add the dependency like implementation "com.github.vimeo.vimeo-networking-java:vimeo-networking:3.12.0" implementation "com.github.vimeo.vimeo-networking-java:models:3.12.0" But after syncing with my project when i try to run the project or build…

VIEW QUESTION

Icons.remove_red_eye Hide Show – Flutter

I would like it to show and hide when eyes are clicked TextFormField( keyboardType: TextInputType.visiblePassword, obscureText: true, decoration: const InputDecoration( labelText: "Entrez votre mot de passe", border: OutlineInputBorder(), prefixIcon: Icon(Icons.lock), suffixIcon: Icon(Icons.remove_red_eye), ), ) I would like it to show…

VIEW QUESTION

Android Studio – broadcast receiver for ACTION_HEADSET_PLUG not getting called

i'm having a broadcast reciever: private final BroadcastReceiver mediaReceiver = new MediaChangeReceiver(this); and i'm adding filters to it IntentFilter filter = new IntentFilter(); filter.addAction(AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED); filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); filter.addAction(Intent.ACTION_HEADSET_PLUG); context.registerReceiver(mediaReceiver, filter); and I have listener to listen for that calls @Override public void…

VIEW QUESTION

Android Studio – java.lang.NullPointerException: findViewById(R.id.addtoUserFriendList) must not be null

Hello i am getting such an error i couldn't find the solution for the error ; java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.chatapp/com.example.chatapp.MainActivity}: java.lang.NullPointerException: findViewById(R.id.addtoUserFriendList) must not be null My Code is: private lateinit var userRecyclerView: RecyclerView private lateinit var userList:…

VIEW QUESTION
Back To Top
Search