SO Close Vote Reviewers

This room is for support and discussion about reviewing and co...
Dec 12, 2019 10:28
@Adriaan thank you for the information.
Dec 12, 2019 10:21
Apr 17, 2019 07:48
Feb 28, 2019 07:56
@BhargavRao i found duplicate target for that question can u please mark that question as duplicate with stackoverflow.com/questions/13941093/…
Feb 28, 2019 07:51
@BhargavRao thanks searching for the duplicate
Feb 28, 2019 07:49
 
Jul 27, 2019 12:02
@HasanAYousef Glad to have been of help! Feel free to accept my answer if you feel it was useful to you. :-)
Jul 27, 2019 11:52
Jul 27, 2019 11:44
if you are using toolbar then add this in your activity setSupportActionBar(toolbar)
Jul 27, 2019 11:43
Just use simple linear layout
Jul 27, 2019 11:35
@HasanAYousef make sure you have added ` compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
` iin your build.gradle file
Jul 27, 2019 11:33
@HasanAYousef check out above codes
Jul 27, 2019 11:33
package com.nilu.demoapplication


import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup



/**
* A simple [Fragment] subclass.
*
*/
import android.content.Context
import android.net.Uri


class SettingsFragment : Fragment() {
private var listener: OnFragmentInteractionListener? = null

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
Jul 27, 2019 11:33
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
Jul 27, 2019 11:33
Gradle file

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.nilu.demoapplication"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Jul 27, 2019 11:33
layout code
Jul 27, 2019 11:32
******************
Jul 27, 2019 11:32
Fragment code
*********************
Jul 27, 2019 11:32
adapter code

package com.nilu.demoapplication

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter


class AppViewPagerAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle) :
FragmentStateAdapter(fragmentManager, lifecycle) {
override fun createFragment(position: Int): Fragment {
return when (position) {
0 -> SettingsFragment.newInstance()
1 -> SettingsFragment.newInstance()
Jul 27, 2019 11:32
activity code

package com.nilu.demoapplication

import android.annotation.SuppressLint
import android.graphics.Color
import android.net.Uri
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.core.content.ContextCompat
import kotlinx.android.synthetic.main.activity_main.*
import com.google.android.material.tabs.TabLayoutMediator

import com.google.android.material.tabs.TabLayout
import com.google.android.material.badge.BadgeUtils
import com.google.android.material.badge.BadgeDrawable
Jul 27, 2019 11:32
@HasanAYousef for me you code is working fine
Jul 27, 2019 11:14
@HasanAYousef can u share your code as github ripo so i can reproduce same error
Jul 27, 2019 11:02
share your current code
Jul 27, 2019 10:59
@HasanAYousef use this dependencies `implementation 'com.google.android.material:material:1.1.0-alpha08'
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta02'`
Jul 27, 2019 10:55
@HasanAYousef hello
Jul 27, 2019 10:42
@HasanAYousef i'm asking again what you want to achieve
Jul 27, 2019 10:42
@HasanAYousef you want to display fragment name instead of tab.text = "Tab $position"
Jul 27, 2019 10:42
@HasanAYousef didn't get you can you explore more
 

 SOCVR Request Graveyard

This room is ONLY to receive action requests (cv-pls, etc.) fr...
Mar 28, 2019 09:39
20K del please the problem is not reproducable and also issue is from google play store Publishing an apk on google play store is stuck at processing
Mar 15, 2019 04:20
Too broad (upvoted answer and question) Load two images in single view android
 
Feb 28, 2019 16:07
@JohnJoe hey buddy
Feb 20, 2019 08:32
may be because i don't know why you have added that conditions
Feb 20, 2019 08:31
i don't why don't u check that
Feb 20, 2019 08:28
now try
Feb 20, 2019 08:28
holder.mAppButton.setOnClickListener {
var dialog = Util().callDialog(context)
mValues.get(position).selected=true
notifyDataSetChanged()
}
Feb 20, 2019 08:28
if(!mValues.get(position).selected){
/// display button A
}else{
/// make button A visibilty gone
}
Feb 20, 2019 08:28
simple reverse the condition my friend
Feb 20, 2019 08:26
adding*
Feb 20, 2019 08:26
where you are adiing data in your list
Feb 20, 2019 08:23
for all item
Feb 20, 2019 08:23
@JohnJoe make sure when u set adapter your selected is true
Feb 20, 2019 08:18
share your adpter code
Feb 20, 2019 07:54
but you can change the logic as per your requirement
Feb 20, 2019 07:53
its `mValues.get(position).selected=false` because we have used below condition

f(mValues.get(position).selected){
/// if true display button A
}else{
/// if false make hide the button button A visibilty gone
}
Feb 20, 2019 07:48
holder.mAppButton.setOnClickListener {
var dialog = Util().callDialog(context)
mValues.get(position).selected=false
notifyDataSetChanged()
}
Feb 20, 2019 07:46
if(mValues.get(position).selected){
/// display button A
}else{
/// make button A visibilty gone
}
Feb 20, 2019 07:44
yes
Feb 20, 2019 07:43
when user click on button A make boolean varble false and use notifyDataSetChanged()