Posts

Manual - TCP / UDP Client

1. Privacy policy: **Privacy Policy** Digit Mund built the TCP/UDP Client app as an Ad Supported app. This SERVICE is provided by Digit Mund at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at TCP/UDP Client unless otherwise defined in this Privacy Policy. **Information Collection and Use** For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information...

Manual - Modbus TCP Client

1. Privacy policy: **Privacy Policy** Digit Mund built the Modbus TCP Client app as an Ad Supported app. This SERVICE is provided by Digit Mund at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Modbus TCP Client unless otherwise defined in this Privacy Policy. **Information Collection and Use** For a better experience, while using our Service, I may require you to provide us with certain personally identifiable infor...

Android - Optimize and Publish Apps

Before developers publish apps, the following things should be done to prevent the Google Play Console from annoying us. 1. Change the package name com.example.<Name of project> to com.<Name of organization>.<Name of project> in the build.gradle file. 2. Check and adjust versionCode and versionName in the build.gradle file properly. 3. Reduce your app size by using android { // Other settings buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } in the build.gradle file. 4. Convert images to WebP by right clicking on an image file or an image folder, and then click convert to WebP. 5. Prepare and upload one 512 x 512 32-bits PNG icon file and one 1024 x 500 24-bits PNG feature graphic file. References: https://developer.android.com/topic/performance/...

Android - Clipboard and Keyboard

1. Copy text to the clipboard. In Activity, use val clipboard = getSystemService(ClipboardManager::class.java) val clipData = ClipData.newPlainText("The first copied text.", "Hello World!") clipboard.setPrimaryClip(clipData) In Fragment, use val clipboard = requireActivity().getSystemService(ClipboardManager::class.java) val clipData = ClipData.newPlainText("The first copied text.", "Hello World!") clipboard.setPrimaryClip(clipData) 2. Close the keyboard and the cursor. In Activity, use getSystemService(InputMethodManager::class.java) .hideSoftInputFromWindow(<The View object of scope>.windowToken, 0) currentFocus?.clearFocus() In Fragment, use requireActivity().getSystemService(InputMethodManager::class.java) .hideSoftInputFromWindow(<The View object of scope>.windowToken, 0) requireActivity().currentFocus?.clearFocus()

Android - Scrollable TextView in ViewPager2

1. Check the scrollbars in the attributes of TextView. 2. Use textView.movementMethod = ScrollingMovementMethod() 3. Use textView.setOnTouchListener { _, _ -> textView.parent.requestDisallowInterceptTouchEvent(true) false // It must return false to make TextView scrollable in ViewPager2. } Reference: https://stackoverflow.com/questions/29471842/allow-scrolling-edittext-and-swiping-viewpager

Android - ViewPager2, TabLayout, and Fragment

1. Prerequisites: Before using ViewPager2 and TabLayout, append implementation 'com.google.android.material:material:$material_version' to the build.gradle file. 2. Usage: a. Use ViewPager2 and TabLayout in the activity_main layout. b. Create Fragment classes and their layout files. Warning: All subclasses of Fragment must include a public no-argument constructor. class FragmentA: Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_a, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) // Change UI and use listeners here. } } c. Connect Fragment to TabLayout in MainActivity. viewPager.adapter = object : FragmentStateAdapter(this) { override fun getItemCount(): Int { ...

Blogger - Troubleshoot Issues of Blogger

1. Fail to create tables with horizontal scrollbars. Simply, customize the HTML of Blogger theme and change the following content body{ overflow-wrap:break-word; word-break:break-all; word-wrap:break-word } to body{ overflow-wrap:break-word; word-break:keep-all; word-wrap:break-word } 2. Fail to insert tab keys. Instead of using &#09; , use &Tab; References: https://dev.w3.org/html5/html-author/charref