Add following Paths to the PATH-Enviromentvariable
[Path to CMake]\bin
[Path to Git]\bin
[Path to SDK]\tools
[Path to SDK]\platform-tools
[Path to NDK]
[Path to ANT]\bin
[Path to MinGW]\bin
[Path to MinGW]\msys\1.0\bin
[Path to Java jre]\bin
[Path to Java jdk]\bin
Make sure you use ba...
Clone the SFML Repository from Github.
Enter following comands in a cmd window:
git clone https://github.com/SFML/SFML.git SFML
If you already downloaded SFML before you can just use the existing one.
Create some folders for the build-files
cd SFML
mkdir build && cd build
mkdir ar...
You can find the Android Sample in [SFML_ROOT]\examples\android
You can copy it to leave the SFML repository in it's original state. Open cmd.exe in the sample location.
To get a list of all available Android build targets:
android list target
Run Update Project for the Sample:
android upda...
You can disable compiler warnings using #pragma warning disable and restore them using #pragma warning restore:
#pragma warning disable CS0168
// Will not generate the "unused variable" compiler warning since it was disabled
var x = 5;
#pragma warning restore CS0168
// Will gene...
We shall create a simple Alert Dialog in Xamarin.Android
Now considering you have gone through the getting started guide from the documentation.
You must be having the project structure like this:
Your Main Activity must be looking like this:
public class MainActivity : Activity
{
...
Individual elements can be accessed through indexes. Python arrays are zero-indexed. Here is an example :
my_array = array('i', [1,2,3,4,5])
print(my_array[1])
# 2
print(my_array[2])
# 3
print(my_array[0])
# 1
my_array = array('i', [1,2,3,4,5])
my_array.append(6)
# array('i', [1, 2, 3, 4, 5, 6])
Note that the value 6 was appended to the existing array values.
We can use the insert() method to insert a value at any index of the array. Here is an example :
my_array = array('i', [1,2,3,4,5])
my_array.insert(0,0)
#array('i', [0, 1, 2, 3, 4, 5])
In the above example, the value 0 was inserted at index 0. Note that the first argument is the index while se...
Here is an example:
my_array = array('i', [1,2,3,4,5])
c=[11,12,13]
my_array.fromlist(c)
# array('i', [1, 2, 3, 4, 5, 11, 12, 13])
So we see that the values 11,12 and 13 were added from list c to my_array.
Here is an example :
my_array = array('i', [1,2,3,4,5])
my_array.remove(4)
# array('i', [1, 2, 3, 5])
We see that the element 4 was removed from the array.
pop removes the last element from the array. Here is an example :
my_array = array('i', [1,2,3,4,5])
my_array.pop()
# array('i', [1, 2, 3, 4])
So we see that the last element (5) was popped out of array.
index() returns first index of the matching value. Remember that arrays are zero-indexed.
my_array = array('i', [1,2,3,4,5])
print(my_array.index(5))
# 5
my_array = array('i', [1,2,3,3,5])
print(my_array.index(3))
# 3
Note in that second example that only one index was returned, even though...
count() will return the number of times and element appears in an array. In the following example we see that the value 3 occurs twice.
my_array = array('i', [1,2,3,3,5])
my_array.count(3)
# 2
When you need a Python list object, you can utilize the tolist() method to convert your array to a list.
my_array = array('i', [1,2,3,4,5])
c = my_array.tolist()
# [1, 2, 3, 4, 5]
Sometimes, if an action should be bind to a collection view's cell selection, you have to implement the UICollectionViewDelegate protocol.
Let's say the collection view is inside a UIViewController MyViewController.
Objective-C
In your MyViewController.h declares that it implements the UICollecti...
Provided that barButtonItem has a non-null image property (e.g. set in the Interface Builder).
Objective-C
barButtonItem.image = [barButtonItem.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
An alert box can be popped-up on a Xamarin.Forms Page by the method, DisplayAlert. We can provide a Title, Body (Text to be alerted) and one/two Action Buttons. Page offers two overrides of DisplayAlert method.
public Task DisplayAlert (String title, String message, String cancel)
This overri...