Friday, August 15, 2014

Android scrollview hiding top content in layout

Based on the screen layout in your Android application, some of the text in a TextView widget may not be visible i.e looks like its hidden/scrolled off at the top of the screen.

In the definition of the TextView in your layout xml, check to see if the below tag is present. This layout_gravity attribute is the problem why some of the text is not visible. Removing it from the TextView definition will display all data in the TextView widget.

android:layout_gravity="center_horizontal|center_vertical"

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1.04"
        android:fillViewport="true"
        android:keepScreenOn="true"
        android:scrollbarStyle="insideInset"
        android:scrollbars="vertical"
        android:visibility="visible" >

        <TextView
            android:id="@+id/detailsText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            <!--android:layout_gravity="center_horizontal|center_vertical" -->      android:layout_marginTop="30dip" />
    </ScrollView>

Replace end of line (CR/LF carriage return/new line) characters in a file or string using java

Replace end of line (CR/LF) characters in string with another character 'A'

desc = desc.replaceAll("\\r?\\n", "A");
where desc is a String variable.

Wednesday, July 23, 2014

Bangalore Open Air 2014 - metal concert

Bangalore Open Air takes place on September 13th, 2014 at CounterCulture, Bengaluru.

Three international headline acts
  • Destruction - German thrash metallers
  • Rotting Christ - Greek extreme metal band
  • Cadaver Mutilator - Italian brutal death metal band

Three Indian metal bands,
  • Threinody
  • The Down Troddence
  • Armament


Entry: 
Rs 2,000 (early bird)
Rs 2,500 on the day of the event.

Event location:
CounterCulture
2D2, 4th Cross, Dyavasandra Industrial Area,
ITPL Main Road, Whitefield, Bangalore

Event details
http://bangaloreopenair.com/

Saturday, June 21, 2014

Adding/integrating Google play services with Android app project

When adding the below element tag to AndroidManifest.xml file

<meta-data  android:name="com.google.android.gms.version"
 android:value="@integer/google_play_services_version" />
 

If you see the below error message then it means that Google play services library is not present for the current Android project.
The error is:
   No resources found that match the given name (at 'value' with value '@integer/google_play_services_version').


 To add Google play services lib, follow the below steps
1)      Select File -> Import
2)      browse to the folder where ‘Google play services library’ is present
3)      Note: ‘Google play services library’ is located in \sdk\extras\google\google_play_services
4)      select ‘Google play services library’ and ‘copy project into workspace’
Note: “copy project into workspace” must be selected so that the lib does not get modified
5)      right on your project -> properties -> android -> library and select the Google play services lib
6)      Rebuild your project which will clear the error







.

Saturday, May 3, 2014

How to play music play music from microphone input

If you have forgotten your headphone/earphones and still need to listen to music on the go and have a laptop and your favourite audio device then you can follow the steps below to listen to music.

You will need to have
1) windows 7 installed
2) 3.5mm male to male audio stereo cable
3) your favourite music player ipod, mp3 player, etc

Steps:
1) click on 'control panel' and navigate to your 'sound settings'
2) click on the 'microphone' then 'properties'
3) Tick mark 'Listen to this device'
4) make sure that 'playback through this device" is set to "default playback device"
5) click "apply" then "ok"
6) connect the 3.5mm cable from your music player to the microphone input of your laptop/desktop
7) start playing music and adjust the volume from your laptop/desktop as necessary.





3.5mm male to male audio cable.
3.5mm male to male audio cable.
3.5mm male to male audio cable.

Wednesday, April 30, 2014

Adding external/third party jars to Android project in libs folder


  1. Download the jar files to your computer.
  2. Create a new folder, libs, in your Eclipse/Android project (if it does not exist)
  3. Right-click libs and choose Import -> General -> File System, then Next, Browse in the filesystem to find the parent directory where the jar(s) were downloaded.
  4. Click OK, then click the directory name (not the checkbox) in the left pane, then check the relevant JAR in the right pane. This puts the library into your project.
  5. Right-click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then Add JARs..., navigate to your new JAR in the libs directory and add it.This step is when the new jar gets converted to a Dalvik-converted JAR that can be used with the Android project.

Saturday, April 26, 2014

Microsoft outlook folders not syncing with blackberry

By default, only messages in the Inbox and Sent Items folders of Microsoft Outlook are redirected to a BlackBerry device.

If you have setup rules to forward incoming emails to specific folders in Microsoft Outlook then these emails will not be sent to your BlackBerry device.

To get these emails on the BlackBerry device, you need to
1) disable all rules in Microsoft Outlook
2) Close Microsoft Outlook
3) on the BlackBerry device, select 'messages' -> reconcile now
Note: Any emails received in Microsoft Outlook prior to this setting will not be delivered to BlackBerry device.
4) you should be able to see all new emails on the BlackBerry device.

Once this has been done, you should re-enable all rules in Microsoft Outlook.

For more details, please refer below links