Skip to main content

Posts

Showing posts with the label language-xml

Theme error in 2010s Android App after AppCompat Migration

I plan on releasing a lot of my old work as GPL open source, but most of it has aged to the point that it no longer functions, or if it does work it’s running in compatibility mode. Basically it’s no longer best practices. Not a good way to start off any new public GPL projects, in my opinion. The current project I’m working on is an Android app that calculates star trails meant to help photographers get or avoid that in their night time photos. For now I’m going to skip some of the import process because I didn’t document it exactly. It’s been mostly trial and error as I poke around Android Studio post import. The Android Studio import process… Removing Admob Google Play code before the project would run at all. After removing dependencies, it kind of worked, but when running it in the emulator it shows a pop-up message saying that the app was developed for an old version of Android. Going through the process of updating code to match current best practices… I had the IDE convert the ...

Android SDK: String Arrays and Controls like Spinners

Due to how the Android SDK and Java are setup it isn’t really a simple task to link up an array with a spinner control. I’ll go over some basics I just learned of the process. In this example I setup a setting control that will allow the user to select from a list of values. The spinner control will be initialized by the global setting value (from a black box object in this example), and a control listener will be defined that allows the user to change the global setting. To define a list of string values that can be loaded into android controls you would do something like this. You can add an arrays.xml file to your project (in the /res/values directory): <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="settinglist01"> <item>1</item> <item>2</item> <item>3</item> <item>4</item> <item>5</item> </string-a...

Working With the XML DOM

I’ve been working with server side scripts that rely on xml files to define the structure of the site.  It seems quite fast compared to using a database and also makes direct changes to the structure easy.  My post here is about how to use the DOM in VBSCRIPT/ASP.  Some aspects of how the DOM works are a bit “wiggy” in my opinion, but I’ve figured out a lot of it so far. Here is a quick example on how to parse a file (VBSCRIPT/ASP): function parseXmlFile(filename, byRef emptyVarToFillWithXmlObj)     dim completeFilePath, functionSuccess, filePointer          completeFilePath = getFullPath() & filename          ' Convert the xml file into an xmldoc object     ' First check to see that the file exists     set filePointer = server.createObject("Scripting.FileSystemObject")     if filePointer.fileExists(completeFilePath) then         ' Initialize the xml object ...

Using blogger.com as a website instead of a blog

Thanks to the new functionality I am able to use the free blogger.com blogs as a website. It’s all thinks to functionally they added after Google acquired them. For example I created a custom template for my sister’s graphic/fashion/photography design website. In this post I’ll go over the basics that allow this to work. Google allows custom domain names. This means the whole website can have a professional look and feel because all links connected to the site will look like www.nameofsite.com/revrefvrv/dfvdfvd… etc. The use of labels, conditional statements, and the database data that blogger allows to be accessed through the template system. To make a standard website I started with the simplest of the pre-created templates modifying it to suit my needs. I removed a lot of the functionality like comments, backlinks, and whatever else. For a basic website you first need some links to blocks of site content. I generally hard code them into the template. Now if you’ve used the ne...