Month: November 2014

  • How to fix touchpad scrolling in the Lenovo IdeaPad Z510 under Ubuntu 14.04 LTS

    How to fix touchpad scrolling in the Lenovo IdeaPad Z510 under Ubuntu 14.04 LTS

    When I’ve updated Ubuntu to 14.04 in Lenovo IdeaPad Z510 laptop then touchpad section disabled from “Mouse and Touchpad” settings (screen below)

    Screenshot from 2014-12-02 14:54:29

    To fix it you need install a lot of software. I try it but it not works for me.

    The most fast and simple solution is upgrade linux kernel to 3.14.1.

    The workflow is next:

    32-Bit Systems

    Download the .deb packages.

    $ wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401_3.14.1-031401.201404141220_all.deb
    
    $ wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401-generic_3.14.1-031401.201404141220_i386.deb
    
    $ wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-image-3.14.1-031401-generic_3.14.1-031401.201404141220_i386.deb

    Install packages.

    sudo dpkg -i linux-headers-3.14.1-*.deb linux-image-3.14.1-*.deb

    Reboot your system.

    sudo reboot

    64-Bit Systems

    Download the .deb packages.

    $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401_3.14.1-031401.201404141220_all.deb
    
    $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401-generic_3.14.1-031401.201404141220_amd64.deb
    
    $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-image-3.14.1-031401-generic_3.14.1-031401.201404141220_amd64.deb

    Install packages.

    sudo dpkg -i linux-headers-3.14.1-*.deb linux-image-3.14.1-*.deb

    Reboot your system.

    sudo reboot

    After reboot your “Mouse & Touchpad” settings will be the next:

    Screenshot from 2014-11-22 16:58:23

  • How to create custom style for fast scroll scrollbar in Android

    How to create custom style for fast scroll scrollbar in Android

    Here is sample for fastScroll ListView functionality.

    To apply this style you need add the following lines into your app’s style:

    <item name="android:fastScrollThumbDrawable">@drawable/fastscroll_drawable</item>
            <item name="android:fastScrollOverlayPosition">atThumb</item>
            <item name="android:fastScrollTrackDrawable">@drawable/track_fastscroll</item>

    Also if you need handle click action on your scrollbar you need create the next drawable:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android" >
        <item android:state_pressed="true" android:drawable="@drawable/thumb_fastscroll_selected"/>
        <item android:drawable="@drawable/thumb_fastscroll"></item>
    </selector>

    Also you need apply this style in the AndroidManifest.xml or in another way.

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.hrupin.sample.custonui.fastscroll"
        android:versionCode="1"
        android:versionName="1.0" >
    
        <uses-sdk android:minSdkVersion="11" />
    
        <application
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name" 
            android:theme="@style/AppTheme">
            <activity
                android:name="com.hrupin.sample.custonui.fastscroll.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>

    Here is screenshots of app:

    2014-11-11 18.06.14

    2014-11-11 18.06.25

    Full source code you can get from github:

    Download it from github