ボタンに仮のリスナーを追加

This commit is contained in:
r-ca 2024-01-28 15:13:20 +09:00
parent fa9b86e909
commit 289f70c6cb
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -9,6 +9,7 @@ import androidx.viewpager2.widget.ViewPager2;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
@ -137,6 +138,11 @@ public class ViewerContainerFragment extends Fragment {
TextView textView = customView.findViewById(R.id.tab_title);
textView.setText(viewerViewPagerAdapter.getTabTitle(position));
ImageButton imageButton = customView.findViewById(R.id.tab_modify);
imageButton.setOnClickListener(v -> {
Toast.makeText(getContext(), "Working!, Index:" + position, Toast.LENGTH_SHORT).show();
});
tab.setCustomView(customView);
}).attach();
}