Google Advertisement

 

Homebrew
And
Technology


 Software + Development + Blogging




Tech Blogging

  • Android, Troubleshooting "W/View: couldn't find view with id" It is not easy to troubleshoot this error without knowing why it happens! Eyeballing above message also does not help much! ;)To cut a long story short, in layout xml file we declare widgets like bellow:<EditText android:id="@+id/editText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_marginStart="32dp" android:layout_marginTop="23dp" android:ems="10" android:inputType="textPersonName" android:text="Name" /><Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignEnd="@+id/editText" android:layout_below="@+id/editText" android:layout_marginTop="16dp" android:text="Button" />Id of EditText is set using "@+id/editText"It is used again ...
    Posted Sep 5, 2017, 5:31 AM by Haris Hashim
  • RecycleVew Adapter Show Wrong Data When Scrolling IntroductionThis is also a good code sample for RecyclerView within another RecyclerView. Get the code in GitHub!When developing Android app using RecyclerView, common problem is to have wrong data displayed after scrolling. The reason is because RecyclerView reuse previous RecyclerView widget to show next data after scrolling. Quick FixThis problem can be quite hard to debug. So a quick and dirty solution is to disable the reuse or recycling function. Of course, this is a temporary solution or a workaround until real issue is discovered and fixed.How to do that? Just set the ViewHolder setIsRecyclable to false in onBindViewHolder. As per bellow code snippet:@Overridepublic void onBindViewHolder(ViewHolder holder, final int position) { final ContentItem content ...
    Posted Sep 3, 2017, 6:09 AM by Haris Hashim
  • Android and Dagger 2 in 5 minutes! IntroductionDagger 2 for Android can be unnecessarily complicated. Here is a tutorial for simplified usage of Dagger 2 as well as adding "quickstart" code as Android Studio Live Template.StepsUse Android Studio to create a new project.Just click next and accept all the default option. Just make sure that it targets phone and tablet and MainActivity class is created by the wizard.Add Dagger 2 dependency to gradle app module.Add the following code as per above picture. These codes might not bee needed so feel free to try without it. configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9' }And the needed dependency as per bellow picture.  Use bellow codes to copy paste ...
    Posted Aug 12, 2017, 1:27 AM by Haris Hashim
  • All com.android.support Libraries Must Use the Exact Same Version Recently I have encountered this warning in Android Studio build.gradle. "All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes)."The next line in the error give some hints."Found versions 25.3.1, 23.1.1. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:recyclerview-v7:23.1.1"It is not a show stopper since the project build just fine and did not crash. But after few project having same error, it annoys me enough to investigate and fix.TroubleshootingOpen cmd shell, change directory to project root folder and execute bellow gradle command.gradlew -q dependencies app:dependencies --configuration compile ...
    Posted Jul 31, 2017, 8:16 PM by Haris Hashim
Showing posts 1 - 4 of 14. View more »
 

























Live Blogging

  • An Open Blog to DBKL (or is it MPS)  The Story Begins ...About a month ago I noticed an overpowering garbage stench just outside the house. A quick check does not reveal anything. For example, I would expect to see a garbage truck to smell that kind of stench. But non can be seen nearby.So that day I just file it in my brain as "Unsolved Case of Smelly Smell"The Mystery Unfold ...It so happen about 2 weeks back (30th Jan). I came back home around 11.00 am after doing some errant. Lo and behold, there is a garbage truck parked in the vicinity. That alone should just put a dot on the mystery and close this case. A garbage truck is smelly, logically speaking may ...
    Posted Mar 21, 2015, 9:51 PM by Haris Hashim
  • Maxis Broadband Self Care Portal Tips GreetingsDear Frustrated User, RamblingsAre you from  Maxis.com website, redirected to Maxis.net.my for self care portal registration?Or worst, for some reason being redirected to Mylaunchpad.com.my which then have the url shorten to mlp.my and upon clicking "Create an account" redirected to Maxis.net.my?Confused yet? Well a confused user is a good user. More so when that blue icon that pretty much say "Login using Facebook" is there. To bring confused user into their comfort zone. Why fill up so many information when taking the blue pills is so damn easy?Here is my theory. Can be true can be totally untrue. That MLP page is honey pot for FB user ...
    Posted Jan 28, 2013, 9:57 AM by Haris Hashim
  • Conference-A-Licious IntroductionPardon the"food-a-licious" driven title. I start this "Life Blogging" section with Lobsterlicious. Then it cross over to "Tech blogging" in the form of Flowchart-a-Licious. Now another life experience following the same trend.It says that life is delicious. More so when going through new experience. In this case, a life experience that demonstrate this idea very accurately. Hence, worth the "delicous" moniker.Photo-a-liciousBefore we proceed further, here is some pictures of the conference. Credit goes to Muhd Syazwan as the photographer.Credit goes to Mohd Naim Ibrahim as the photographer. Organizer with Redhuan D. Oon - elected advisor of the new NGO Haris Fazillah Jamel - OSDC.my pro-term chairmanRaja Iskandar ...
    Posted Apr 12, 2012, 3:54 AM by Haris Hashim
  • Monday - Nasi Goreng Teratai Introduction The starting of this writing occur completely in my head on Monday,5 days ago, While stuck in a traffic jam and through all the short cuts that taken. However, only today (that is Thursday) got the time to sit down and write things. So please bear with me. Rambling Just before noon, I am out to the town of Tawau. Initially to buy printer supplies. But with additional requirement of buying pineapple. So a trip to Pasar Tanjung Tawau is required, The pasar itself have 2 part. The wet market is mentioned in my previous writeup that is Lobsterlicios. The other part is Pasar Sayur, where 'sayur' means vegetable. Which actually have lot of stuff, and not just ...
    Posted Mar 17, 2012, 10:06 PM by Haris Hashim
  • Mostly Ramblings Introduction This begins as part of previous article, which is Lobsterlicious. But it takes too much time as well as deserve its own space. Which is another way to say too long! Ramblings The previous rambling touch on how thing started with a side hook into western food. It glance through the chocolate shop and restaurant very fast! Allow me more ramblings and I will try to make thing more interesting! Let's see a picture of the two shop (which was created using Google Sketch Up by you-know-who ;).  The Chocolate Shop The chocolate shop provide patron with home made chocolate. It is very popular as gift when bought together with gift boxes. There is option for chocolate ...
    Posted Mar 18, 2012, 2:19 AM by Haris Hashim
  • Lobsterlicious IntroductionTawau, where I am at. Is a secrete enclave for seafood lover. It is very much a secrete since I think I am the only one who knew about it ;). Anyway, we are going to have a sneak peak into Mr. Lobster today. Hopefully will have enough time to attend #iDempiere meeting tonight.(Update: Attended in silent over lobster meat, watching all those superdeveloped people talking about stuff that I don't really understand ... yet!)RamblingsAbout few years back, wifey and me decide to open up a chocolate shop in her home town in Tawau. With help from lots of people we manage to setup a shop in Eastern Plaza. At that moment, Eastern Plaza is the only ...
    Posted Mar 16, 2012, 10:02 AM by Haris Hashim
Showing posts 1 - 6 of 6. View more »