Last Updated: December 27, 2017

Tips & tricks android developer should know - part 4

Description: In this post I'm gonna show you some interesting tools from android studio we developers use.

Also check out Part 1,Part 2  and  Part 3.


So let's get started.


1. Layout Inspector: Layout Inspector is an interesting tool to help track view and their respective properties. It contains-

    •    View Tree - contains the hierarchy of the android widgets displaying the full nesting of views.
    •    Properties Table - contains the properties attached to respective view. e.g:layouts/methods/padding and many more.
 a) How to enable it?
        Goto Tools -> Android -> Layout Inspector fig.1 
     
fig.1 Layout Inspector
 Note: Make sure you have android process running for your app and you have active window present to take the screenshot.

 b) How to understand it?(fig.2)

    Left
       - 'View Tree' showing full hierarchy of the screen.
   Center
     - Screenshot of the active window       
   Right
      - 'Properties Table' for each view.
  View Click
    - Properties of the widgets get updated on the right pane i.e 'Properties Table.' and get high Lighted  on the screenshot screen.


fig.2 Layout Inspector

fig.3 Layout Inspector with Properties

RecyclerView:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".MainActivity">
    <android.support.v7.widget.RecyclerView
        android:id="@+id/percentList"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</RelativeLayout>
RecyclerView Item:

<android.support.percent.PercentRelativeLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:id="@+id/fifty_huntv"
        android:background="#ff7acfff"
        android:text="20% - 50%"
        android:textColor="@android:color/white"
        style="@style/STYLE_PERCENT_TV"
        app:layout_heightPercent="20%"
        app:layout_widthPercent="50%" />
    <TextView
        android:layout_toRightOf="@id/fifty_huntv"
        android:background="#ffff5566"
        android:text="80%-50%"
        style="@style/STYLE_PERCENT_TV"
        app:layout_heightPercent="80%"
        app:layout_widthPercent="50%" />


</android.support.percent.PercentRelativeLayout>


Its an amazing tool to analyse the screen UI for the developers with all the information available on single click. Simply great.



2. How to change DPI of Phone using ADB?

Many times in our development phase we want to check the look of android UI on low/high end devices. Changing the DPI could come handy in such cases.

So let get started.

Steps 1: Find out your phones dpi using below command of adb shell. Search for 'mBaseDisplayInfo='. And then search for density within it.Save it for future to revert our dpi
adb shell dumpsys display

Steps 2: Search for 'mBaseDisplayInfo' and 'density' as show in fig.4


fig.4 Display Density
Step 3: Finally enter below adb command to change the dpi. (fig.5) with 200dpi,420dpi and 600dpi respectively

adb shell wm density 150



 


Note: If the changes do not reflect you can also try:
adb shell wm density 150 && adb reboot

Thats it, the screen will be reloaded and icons sizes will change to withstand with the density specified in the command.


For more updates follow us on -  
Twitter

66 comments :

  1. I think choosing a time to look for an apartment is less priority. From this post, I Know that we have to focus on the time to look for the new apartment.

    Flats for sale in Vadapalani
    Builders in Chennai
    Properties in Chennai

    ReplyDelete
  2. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Thank you a lot! and if you need App development company then contact us!

    ReplyDelete
  3. I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. app cloner pro apk

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Besides, Google Play store also faces an enormous volume of guests for downloading different apps for various purposes. Hence, is a key explanation behind Android apps to have important reach than the different apps.
    https://appcloner.app
    https://appcloner.net

    ReplyDelete
  6. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. via app cloner

    ReplyDelete
  7. i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. hoverwatch price

    ReplyDelete
  8. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! watch face

    ReplyDelete
  9. Flutter Programming is one of the most popular in the cross platforms industry. We build excellent flutter mobile app and also learn how to overcome performance issues. is the best choice for all startups to discuss and get their project quotation. Flutter Development Company We also enable many startups to do Proof of concept and help them to learn about business decisions.

    ReplyDelete
  10. Thanks for sharing such a great information. Flutter framework is mostly used nowadays, as every business is building apps for both Android and iOS. It is the best known cross platform framework for app development in Austin.

    ReplyDelete
  11. Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing. Mobile Price in Bangladesh 2020

    ReplyDelete
  12. Smart Outsourcing Solutions is the leading web development, ecommerce solution, offshore outsourcing development and freelancing training company in Dhaka Bangladesh please
    visit us: seo service company in bangladesh
    seo service in bangladesh

    ReplyDelete
  13. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. XE88

    ReplyDelete
  14. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. XE88

    ReplyDelete
  15. Are you a web developer? Then give a helping hand to your young ones. Let's grow the world knowledge. Head over to Thinkle Developers and help a seeker please.

    ReplyDelete
  16. Financial sector has undergone drastic technological shifts in a comparatively short span of time. The shifts have been incorporated because of Growing Technology, Customer Demands, etc. Take a glance over some of the legacy Cross-platform App Development Company. These are so dynamic and efficient that it will cost you less time, more functionality, good output returns.

    ReplyDelete
  17. A blog must be connected to the person in need. It is really important to understand the actual feel of such necessity and the essence of objective behind it. Author must give proper time to understand every topic before writing it. Itel A62 price in bangladesh

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work. TubeMate PC Download Latest Version Plus Installation Guide

    ReplyDelete
  20. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work. TubeMate PC Download Latest Version Plus Installation Guide

    ReplyDelete
  21. I read that Post and got it fine and informative. Clipping path

    ReplyDelete
  22. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you! Tubidy APK 2020 Latest Update Download Free

    ReplyDelete
  23. This feature is pretty cool that will not only let you reply quickly but also save time while you are up with something important. Smart reply feature will give reply suggestions according to the message received and you can select the correct one to send Android 10

    ReplyDelete
  24. At the point when we talk about telephone then immediately Android come in our psyche, and we realize that Android stage is developing at a rushed rate around the world. Bulk SMS Service Provider in Sharjah UAE

    ReplyDelete
  25. Flutter is one of the top cross-platform framework for app development and allows us to build Android and iOS apps together. The overall development cost is reduced by using Flutter app development and it also provide ease to developers to develop cross-platform apps. Flutter is Google’s new open source technology for creating native Android and iOS apps with a single codebase. Unlike other popular solutions, Flutter is not a framework; it’s a complete SDK – software development kit – which already contains everything you will need to build cross-platform applications.

    ReplyDelete
  26. The Professional Certification in Business Analytics is a foundation course for students and professionals who want to develop niche data skills for their chosen industry domain or function area. Become a Business Intelligence and Data Visualisation expert and surge ahead in your career. The nine-day Business Analytics certification course covers all the essential Analytical and Statistical techniques for effective business decision making. This programme introduces the student to the basic concepts of Python language.business analytics courses

    ReplyDelete
  27. I appreciate your time and efforts on making things simple and easily understandable.

    Mobile App Ideas
    Web Development
    Dating App Development Company

    ReplyDelete
  28. Awesome blog thank you for sharing valuable information. You describe really effective tips. Do you need android application development services. Visit us!

    ReplyDelete
  29. The UI of an app should be intuitive and easy to learn. An application will not be successful if it does not impress users and give them an enriching experience.Top 10 Mobile App development Companies in UK

    ReplyDelete
  30. Wonderful article with great piece of information. Thanks for sharing this with us. I'll take reference from your blog. Do share more such informative articles.
    remote android developer jobs

    ReplyDelete
  31. Finally you have to submit your application for review. Here you have many free layouts/templates to customize and easily edit your Android application of your choice.Smart AudioBook Player Download

    ReplyDelete
  32. This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works mod apk

    ReplyDelete
  33. Disintegration on Android makes it complicated to turn out fixes so many campaigns stay susceptible. It's firm to keep clientele glad and keep conviction while sanctuary problem lingo is unchanging speedily.get redirected here

    ReplyDelete
  34. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details. lulubox apk

    ReplyDelete
  35. Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. android app maker

    ReplyDelete
  36. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work... academy guns

    ReplyDelete
  37. Most free applications that are accessible openly can be upheld up into an APK document.itools crack

    ReplyDelete
  38. I enjoy it for creating the details, keep up the truly amazing perform continuing meditation cushion

    ReplyDelete
  39. If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries Auto Detailing in San Francisco area

    ReplyDelete
  40. You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog. St. Louis photographer

    ReplyDelete
  41. I think about it is most required for making more on this get engaged Alcohol delivery London

    ReplyDelete
  42. It should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it. xshn

    ReplyDelete
  43. I want to say thanks to you. I have bookmark your site for future updates. עו"ד תאונת עבודה

    ReplyDelete
  44. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Avenue South Residence

    ReplyDelete
  45. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. The Avenir

    ReplyDelete
  46. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. midtown modern condo

    ReplyDelete
  47. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Clavon Condo

    ReplyDelete
  48. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. myra condo

    ReplyDelete
  49. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. One Pearl Bank

    ReplyDelete
  50. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Hyll On Holland

    ReplyDelete
  51. A backlink is a link created when one website links to another. Backlinks are important to SEO & impact for higher ranking. In my 7+ years seo Career i see, without backlinks a website doesn't rank higher on google SERP.

    Get Your 300+ High Quality DoFollow Backlinks Here!

    Order Now with Full Confidence & 100% satisfaction.

    ReplyDelete
  52. It's very useful blog post with inforamtive and insightful content and i had good experience with this information.I have gone through CRS Info Solutions Home which really nice. Learn more details About Us of CRS info solutions. Here you can see the Courses CRS Info Solutions full list. Find Student Registration page and register now.Find this real time DevOps Training and great teaching. Join now on Selenium Training online course. Upskill career with Tableau training by crs info solutions. Latest trending course is Salesforce Lightning training with excellent jobs.

    ReplyDelete
  53. Phoenix Residences (Former Phoenix Heights) by OKP Holdings Limited. Hotline 61009266. Get Discounts, Direct Developer Price, Brochure, Floor Plan, Price List & More. Phoenix Residences

    ReplyDelete
  54. With Brandsoo, it’s never been easier or more convenient to buy a brand name shop high quality domain names and professional logos that’ll instantly give your brand a leg up and resonate with your audience! With many different domain sellers all competing for your business, you need to know where your business and brand will see.

    ReplyDelete
  55. You completed a few fine points there. I did a search on the subject and found nearly all persons will go along with with your blog. best instagram followers app for ios

    ReplyDelete
  56. There are many iPhones and Android Smartphones in the market, giving rise to confusion over which one can be chosen. There have been lots of debates, discussions about whether Android or an iPhone is the best buy. Apk Door

    ReplyDelete

  57. Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks PMP Certification
    PMP Course
    PMP Course in Malaysia
    PMP Training in Malaysia
    PMP Training

    ReplyDelete
  58. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  59. I am really very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post. data science training in aurangabad

    ReplyDelete
  60. I would like to say that this blog really convinced me to do it! Thanks, very good post.data science course

    ReplyDelete

Your comments are valuable for us !!!