Get language from Android or iOS device or web browser using React Native

Get language from Android or iOS device or web browser using React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute To obtain the device language using React Native, we need to use the following method: First, we import the Platform and NativeModules methods from react-native. import { Platform, NativeModules } from ‘react-native’; And with the following method, we obtain the language: function getLanguage() { try { const deviceLanguage = Platform.OS … Read more

Adding icons in Tab Navigator in React Native.

Adding icons in Tab Navigator in React Native.

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute When we create a Tab Navigator by default, it appears without icons: Based on this code: <NavigationContainer> <Tab.Navigator initialRouteName=”Home”> <Tab.Screen name=”Home” component={Home} /> <Tab.Screen name=”Buscar” component={MisCursos} /> <Tab.Screen name=”Perfil” component={Perfil} /> </Tab.Navigator> </NavigationContainer> If we want to add icons, we can do the following. We will use a library that … Read more

Add Top Tab Navigation using React Native

Add Top Tab Navigation using React Native

Tiempo de lectura: 2 minutos Reading time: < 1 minutes If you want to add a Top Tab Navigation using React Native to achieve the result shown in this image: First, you need to install the necessary dependency (remember to install React Navigation first): npm install npm install @react-navigation/material-top-tabs react-native-tab-view --save Once installed, it is used in the same way ... Read more

Open a Popup Window in IntelliJ from a Button

Open a Popup Window in IntelliJ from a Button

Tiempo de lectura: 2 minutos To do this, we will first design one of the windows where we create a button that, when pressed, will open an alert window of the selected type: information, caution, etc. Each window or class in IntelliJ must have its corresponding FXML, which is shown below: In this case, our main window will be devcodelight.fxml, … Read more

Convert Android XML Vector to SVG

Convert Android XML Vector to SVG

Tiempo de lectura: 2 minutos Reading time: 2 minutes We can convert an Android XML vector to SVG for use on the web. We have the following XML taken from the SVG repository with CC0 license: <vector android:height=”50dp” android:viewportHeight=”512″ android:viewportWidth=”512″ android:width=”50dp” xmlns:android=”http://schemas.android.com/apk/res/android”> <path android:fillColor=”#5D9BEB” android:pathData=”M0,256.006C0,397.402 114.606,512.004 255.996,512C397.394,512.004 512,397.402 512,256.006C512.009,114.61 397.394,0 255.996,0C114.606,0 0,114.614 0,256.006z”/> <path android:fillColor=”#4988DB” android:pathData=”M507.859,301.669l-0.604,-0.554c-0.114,-0.118 -0.163,-0.283 -0.286,-0.395c0,0 -147.972,-147.983 -148.095,-148.095l-97.389,-89.274c-2.378,-2.163 … Read more

Open another window in IntelliJ using JavaFX

Open another window in IntelliJ using JavaFX

Tiempo de lectura: 2 minutos Reading time: 2 minutes To do this, we will first design one of the windows where we create a button that, when pressed, will open another window with a different design. Each window or class in IntelliJ must have its corresponding FXML, as shown below: In this case, our main window will be “devcodelight.fxml”, where … Read more

Load Object Data into a TableView in IntelliJ using JavaFX

Load Object Data into a TableView in IntelliJ using JavaFX

Tiempo de lectura: 2 minutos Reading time: 3 minutes We begin by creating the design of the application window, where we need to add a TableView element. We give this element its own ID, in this case, I’ll call it “tablaAplicaciones”, resulting in the window looking like this: Next, in order to display the data in the table, we are … Read more

How to pass parameters between two Activitis on Android

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute In today’s article, I’m going to show you how to pass parameters between two Activities in Android using Java. We can pass all types of variables from one Activity to another, including objects. The first thing we need to do is create the intent to open a new Activity as … Read more

Load data from an ArrayList to a ListView in IntelliJ using JavaFX

Load data from an ArrayList to a ListView in IntelliJ using JavaFX

Tiempo de lectura: 2 minutos Reading time: 2 minutes First, we need to have a designed FXML FILE where we add a ListView element with its id. In this case, we call it “listaAplicaciones”. In the corresponding Java Class, we reference the created ListView and create an ArrayList with the data we want to display as follows: In order to … Read more