Posts

Showing posts from December, 2020

View paper only one minute

Image
ယခုပြောပြမှာကတော့view paperပါ ပထမဦးစွာlinearတစ်ခုထည့်ပါမယ် on createမှာadd source directly ဖြင့်ယခုcodeအားထည့်ပေးပါ //Copied From Universal SketchCode Premium(6.1). final androidx.viewpager.widget.ViewPager viewPager = new androidx.viewpager.widget.ViewPager(this); viewPager.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); viewPager.setBackgroundColor(Color.WHITE); MyPagerAdapter adapter = new MyPagerAdapter(); viewPager.setAdapter(adapter); viewPager.setCurrentItem(0); linear1.addView(viewPager); viewPager.addOnPageChangeListener(new androidx.viewpager.widget.ViewPager.OnPageChangeListener() { public void onPageSelected(int position) {  if (position == 0) { } if (position == 1) { } if (position == 2) { } if (position == 3) { }  } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageScrollStateChanged(int s...