I have been playing around with Android app development, particularly on how to retain UI values after configuration changes and minimizing the app to launch a different one. To retain values after configuration changes, I use ViewModels. And to retain values after minimizing the app, the following is supposed to do the trick: But in […]
coding
DataBinderMapperImpl Error: cannot find symbol (DataBinding) //Android Kotlin Dev Diary
Today I encountered the following error as I was building an Android app: Turns out, there’s an error in the related XML file, activity_main.xml! 😂 For other possible solutions, this StackOverflower answer may help: android: data binding error: cannot find symbol class
Get “order” object/details from Thank You page of WooCommerce (WordPress)
It’s been a long while since I last posted anything related to coding. I haven’t really stopped, but from Android app development, I switched back to PHP. Life has become occupied with other things, but when I do code, it’s in WordPress with WooCommerce. It’s for my online shop. In my opinion, WordPress is not […]
Android app dev: Missing import org.apache.commons.lang3.text.WordUtils;
I use a few instances of WordUtils.capitalizeFully() on an Android app that I’ve been working on. And there are times when the import org.apache.commons.lang3.text.WordUtils; breaks, sometimes after merging with some of my git branches. To fix this, what I do is open app/build.gradle and add the following line under dependencies:
1 |
compile 'org.apache.commons:commons-lang3:3.4' |
Hope this saves somebody […]
Something to avoid when using Android RecyclerView
When using Android’s RecyclerView, don’t use the same inflated XML layout file for items you intend to shuffle on the fly! Their contents will overlap. -CK
Setup/update Ruby on OS X El Capitan 10.11.5
I need to learn Ruby on Rails for my new job. I’m a little thrilled about this chance to learn a new language, and I’m trying to get started with it on my Macbook which runs OS X El Capitan 10.11.5. I already have Ruby here, I don’t remember if pre-installed though. It’s out of […]
Add “options menu” to an AppCompatActivity (Android App Development)
Adding an “options menu” to an Android app’s Activity is quite simple. This is an example of what an Android options menu looks like. Look at the icon that looks like 3 dots vertically stacked. My dev environment status as of writing this Android Studio version: v. 2.1 OS: Mac OS X El Capitan v. […]
Prevent direct access to directories of subdomains
From my hosting platform (e.g. cPanel), I created two subdomains for web apps. The web apps reside in the following directories: /foo/bar/app_one/ /foo/bar/app_two/ And the subdomains I created are accessed through these URLs: http://app_one.bar.domain.com (pointing to /foo/bar/app_one/ directory) http://app_two.bar.domain.com (pointing to /foo/bar/app_two/ directory) For security purpose, I don’t want anyone to access the web app […]
Laravel 5: activate API token guard and print “Unauthorized” instead of login redirect
In Laravel 5, I wrap my API routes in a route group like this:
1 2 3 |
Route::group(['middleware' => ['auth:api','throttle']], function() { // API routes here }); |
Notice that I use auth:api and throttle on my middleware array. auth:api turns on the auth middleware with API token as guard, while throttle activates rate limiter for APIs. To get started with API token authentication, you may read https://gistlog.co/JacobBennett/090369fbab0b31130b51. […]
Android app dev: ShareActionProvider in Activity & Fragment
I’ve been taking the Developing Android Apps course on Udacity, and yesterday I encountered a difficulty in solving the Quiz: Share Intent. One of the course’s goal is to build the Sunshine App – an Android app with weather forecast. In that quiz I had to implement ShareActionProvider on my DetailsFragment so that a share […]