mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
ボタンに仮のリスナーを追加
This commit is contained in:
parent
fa9b86e909
commit
289f70c6cb
|
@ -9,6 +9,7 @@ import androidx.viewpager2.widget.ViewPager2;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -137,6 +138,11 @@ public class ViewerContainerFragment extends Fragment {
|
||||||
TextView textView = customView.findViewById(R.id.tab_title);
|
TextView textView = customView.findViewById(R.id.tab_title);
|
||||||
textView.setText(viewerViewPagerAdapter.getTabTitle(position));
|
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);
|
tab.setCustomView(customView);
|
||||||
}).attach();
|
}).attach();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user