Archive for 'Java File'

Android, Hide ScrollBar in ScrollView

By default android comes with a scroll bar for scrolling across up and down , but in some specific application we may need to hide the scroll bar and still we should be able to scroll down. So far that kind of application here is the trick to hide the seek bar.

 

Java File

public class HideScrollBarExample extends Activity {

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);

 

ScrollView sView = (ScrollView)findViewById(R.id.ScrollView01);
// Hide the Scollbar
sView.setVerticalScrollBarEnabled(false);
sView.setHorizontalScrollBarEnabled(false);
}
}

Incoming search terms:

  • disable scrollbar inside scrollview in java android
  • adobe air scroller hide scrollbar
  • how to disable horizontalscrollview android
  • How to always show scrollbar in scrollview android
  • gridlayout hide scrollbar android
  • android scrollview hide scroll line
  • android scrollview auto hide scrollbar
  • android scroll bar visible
  • android horizontalscrollview scrollbar visible
  • android horizontalscrollview remove scrollbar

Using custom fonts in android

You can use custom fonts in android. For this you have to copy the font file (.ttf ) to the assets folder. Assume your font name is “font1.TTF”. The .ttf will work with all android versions.

Then you have to add a TextView in the main.xml or copy the following text and paste it in your main.xml:

Then, copy following code and paste it in the .java file just below the setContentView(R.layout.main) :

 

That’s it

 

Incoming search terms:

  • phonegap android use custom font java

VideoView in Android

main.xml

Java File