Android Metro Style Launcher writes a

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox

Preface: From Graduation to now has been more than three years, recall this three years basically did not write a blog, always feel busy, no time to write, also think that blogging is no big use. But see a lot of Daniel are writing blogs, share their own things, so in line to Daniel, share the first, record The second purpose to start writing a series of articles, I will take me to do a project of the detailed process of sharing to everyone for reference and exchange. All right, storytelling!

Maybe you do Android set-top box or Android TV development less, this kind of development is basically based on the development of the source code, we have a git version of the library, we have developed a version of the compiler to burn the board to run, to compile must compile the environment and so on, Google recommends setting up a development and compilation environment on the Ubuntu system.

the first thing to do is to build the environment:
  1. You can install Ubuntu on Windows with a dual system or with Oracle VM VirtualBox. Install dual system I will not say here, we can go online to check, here is a link you can refer to: Click to open the link.
  2. To install Ubuntu in a Windows environment via Oracle VM VirtualBox, please refer to: Click the Open link.
    Let me just say the following:
    (1). Must be Windows7, if it is Windows8 may appear unexpected things, in short, do not want to encounter trouble with Windows7.
    (2). Allocate virtual disk space at least to allocate 30G, because you want to download ANDROID-SDK will use more than 10 g, if you download the source code then you have at least 60G space.
    (3). After installing the system must install the enhanced plug-in, otherwise the window can not be full screen, installation methods such as:

    Click the red arrow position, and then enter the user password in the pop-up box to confirm the installation, the installation is complete restart can be full screen.
  3. To configure the development environment:
    (1). Configure ADB:
    Go to the official website to download Android-sdk-linux, is: Http://dl.google.com/android/+ different versions of the SDK
    Example: Download R20 version
    Linux version of R20: http://dl.google.com/android/android-sdk_r20-linux.tgz
    R20 version of Windows: Http://dl.google.com/android/android-sdk_r20-windows.zip
    Mac version of R20: Http://dl.google.com/android/android-sdk_r20-macosx.zip
    Unzip the downloaded SDK to a directory, such as the ~/software/directory,
    terminal execution: sudo gedit ~/.BASHRC
    at the end, add the following:
    #set path for Android SDK tools
    Exportpath= $PATH:/home/leo/software/ Android-sdk-linux/tools
    Export path= $PATH:/home/wuhao/software/android-sdk-linux/platform-tools/
    (2). Configure the Java environment:
    Go to the official website: Click the open link to download the corresponding version of the JDK, mine is 64-bit system, so download: jdk-7u75-linux-x64.tar.gz
    sudo mkdir  /usr/lib/jvm/
    cd/usr/lib/jvm/
    CP  ~/software/jdk-7u75-linux-x64.tar.gz  ./     
    sudo tar-vxzf  jdk-7u75-linux-x64.tar.gz
    Configures environment variables in the user directory. bashrc file is the best option, added in BASHRC:
    sudo gedit ~/. BASHRC
    #set Java environment
    #JAVA_HOME =/usr/lib/jvm/jdk1.7.0_75
    Export jre_home=/usr/lib/jvm/jdk1.7.0_ 75/JRE
    Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
    Export path= $JAVA _home/bin: $JRE _home/bin : $PATH
    Restart is in effect or source. BASHRC Effective
    (3). The rest of the IDE is downloaded and configured, and you can choose either Eclipse or Android Studio.
Launcher designin the TV or set-top box to do UI development, first of all to consider the size of the TV is relatively large, your UI display to be able to look at the TV screen size appropriate, show the simple and comfortable, do not like the native launcher so many small icons look dense, The second is to facilitate the operation of the remote control, focus navigation display is correct, because you can not give the set-top box external mouse imitation touch operation, that is too inconvenient. So everyone would think of a style like Windows 8. The design is probably like the following diagram:

Product Requirements: (1) in the display of the first screen when the second screen to the right side of the screen is displayed, and is zoomed out, in page two when the page is displayed on the left side to reduce the display part, Page Three parts display, the page between the smooth switch, the icon zooms out smoothly. (2) in the focus of each icon to enlarge the display, the icon is surrounded by a shadow or the focus of the highlighted frame, such as highlighting, drop the focus of the time to revert to normal display. (3) the icon corresponding to the app link can be configured in the XML file. (4) page number can be configured, you can remove a page by simply modifying the parameters. what would you do to get the product requirements above? I would like to consider the following: (1) The first demand I think of Viewpager,Viewflipper, these two can do the page between the smooth switch. (2) Each icon is abstracted out to make a view, zoom in and out with the property animation can do, the corresponding view XML file can be customized properties to complete the application link configuration. (3) Flexible Add, delete page need to think about the code implementation.
Alas, very tired, a few hours in Saturday, so the past, the " box Diary " inside the box often said a word "what a meaningful day!" ”。 The above is my Launcher Metro style implementation of the first blog post, a brief description of the environment configuration and design ideas, write some shortcomings also please forgive and exchange, specific code implementation I will be in my next blog to explain, please pay more attention!

reproduced Please specify the source: http://blog.csdn.net/cwuhao/article/details/44514191, thank you for your cooperation!








Android Metro Style Launcher writes a

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.