Tutorials & Examples

Android development starts here. Please do not post questions in this sub-forum.

ToggleButton on MenuItem

Hi,

Is it possible to use a kind of ToggleButton as a MenuItem?

I tried to us a bitmap variable and changed it after the menuclick, but the image is not refreshed, so this won't work...
 

Creating a linked list using Type keyword

The Type keyword is used to create your own types or structures. You can use such types to create simple structures that group some values.
However you can also use it to create more complex...
 

Attachments

  • LinkedList.zip
    4.9 KB · Views: 1,211

List of application intents

Is there a way to get a list of all installed applications with their intents?

Cheers,
 

Rearrange ListView lines

I have a ListView that I want to allow the user to rearrange the lines in it.

For example, my ListView is showing 6 lines

Apple
Orange
Rabbit
Toad
Umbrella
Zebra

I want the user to...
 

How to write a sudoku solver

As the sudoku solving contest winner I will now explain the solution I created. I must say that my solution is highly based on a solution I found in a blog post from a canadian student on the...
 

Attachments

  • Sudoku.apk
    90.3 KB · Views: 802
  • Sudoku_lib.zip
    7.5 KB · Views: 885
  • SudokuSolver_Library.zip
    5.8 KB · Views: 897

Style guide for Android interface design

Sliding (Toolbox) panel?

Hi!

I was wondering if creating a panel(toolbox) with, let's say 6 buttons on it, a panel larger than activity.width ("with 2 buttons " :) ) is possible...
User is suppose to...
 
Last edited:

Working with Samsung Galaxy Tab

The Samsung Galaxy Tab is a neat Tablet running Android 2.2.

The following steps are required in order to connect it to the IDE.
- When the device is not connected, go to Settings -...
 

Listview Divider Line Color

How can i define the Color of the horizontal Lines between Listview Items?
 

Nice utity for wireless file transfers

SwiFTP Server
This utility allows you to transfer files or applications to a device that is not connected by cable to your computer.
You can find it by searching the Android market. When it...
 

File Path |Dir|Folder

I have filename.csv file contained two fields?
What folder do I have to copy my filename.csv file so I can access the csv file using loadcsv. eg.
Dim su As StringUtils
Dim Table As List
Table...
 

display and save select item or data to another view and panel tutorial

Hi all,

For those who wants to implement this handling/behaviour to his/her
app, take the example zip underneath.

Special thanks to Klaus, who made a nice solution for this.:sign0098...
 

Attachments

  • TwoActivitiesDisplayResultsViews1.zip
    8 KB · Views: 634

Voice Recognition and activity lifecycle

This might be obvious to some but it caused me some grief so hopefully I can spare someone else some grief.
When using Voice Recognition I have found that it defies the activity lifecycle. What...
 

Imageview related with sdcard getting images examples

Hi,

There are 2 versions to do that:

1. a combination of a button and an imageview.

2. touching the imageview(s) only.

Both ways, after touching the imageview or button, you first have...
 

Attachments

  • imageview_and_buttonclick_to_a_sdcard_example.zip
    5.6 KB · Views: 702
  • imageview_click_to_a_sdcard_example.zip
    5.6 KB · Views: 646

OAuth - How to roll your own (easy).

Hello,

I have seen a few unanswered OAuth questions here and since making an app for an existing site almost always needs OAuth, I decided to check out what was available.

Whilst the...
 

Splash screen

This is the code:
B4X:
'Activity module
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules...
 

Press button makes a spinner (in)visible examples

Hi,

For those who wants this activity to implement in their own project,
there are two versions of examples available to choose from.
One from Kickaha (many thanks) and one by me.

So...
 

Attachments

  • SpinnerVisibility by Asmoro.zip
    20.5 KB · Views: 820
  • SpinnerVisibility by Kickaha.zip
    20.7 KB · Views: 696

Can you continue a program line across editor lines?

in some langauges you can do something like

B4X:
a=1000 _
  + 50

So _ means "continues on the next line"

Is there something similar in b4a?
 

Help library reference

I'm trying to make a app with "phone events",
ex. get the number of incoming call into a textbox
ex. is phone ringing ?
iex. is phone idle ?
etc, etc

I'm missing some kind of library for...
 

Pong - a game

Hi,

I have attached a little game. It's the old Pong.
At this time I still have no Android device. (Christmas will be soon :sign0060:)

Could someone be so nice to test it on a device and...
 

Attachments

  • pong.zip
    46.6 KB · Views: 922
Top