Sometimes some layout files can contain too many views making it difficult to manage the layout file later. To overcome this, Android has an <include> tag that allows the inclusion of other layout files into the main layout file (in below illustration, the activity_main.xml file). <include android:id="@+id/b_layout" layout="@layout/activity_main_part_b" /> The above include statement will add … Continue reading How to include other layout xml files in a layout file in Android
Tag: xml
Replace FindViewByID with ViewBinding in Java on Android
In the gradle.build file for the module, add following code and Sync: buildFeatures { viewBinding true } Above automatically generates binding objects for every layout when the plugin is synced. For activity_main.xml, it will generate ActivityMainBinding class. In MainActivity.java, use inflate method on ActivityMainBinding in onCreate method as shown below: ActivityMainBinding bindMain; bindMain = ActivityMainBinding.inflate(getLayoutInflater()); … Continue reading Replace FindViewByID with ViewBinding in Java on Android
Generate sitemap.xml to enable Google to crawl wordpress site using Google XML sitemaps plugin
Install Google XML Sitemaps generator plugin by Arne Brachhold to generate the sitemap.xml file that Google uses to scan your WordPress site for posts to publish onto Google Search pages. I installed this as a result of the search results from my latest posts literally dwindling as I had last used some other tools to … Continue reading Generate sitemap.xml to enable Google to crawl wordpress site using Google XML sitemaps plugin
Convert India Income Tax Return XML file to CSV for use with spreadsheets
The Indian Income Tax department has been very friendly and proactive and provided income tax payers in India to file electronic returns. The returns can be filed using the respective excel spreadsheet files from https://incometaxindiaefiling.gov.in/portal/index.jsp. The ITR returns files are like actually xls spreadsheets that you need to open and fill in your tax figures. … Continue reading Convert India Income Tax Return XML file to CSV for use with spreadsheets