PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Home Key
Home Key
Débuté par adrianoboller, 06 déc. 2014 00:44 - 2 réponses
Membre enregistré
3 655 messages
Popularité : +175 (223 votes)
Posté le 06 décembre 2014 - 00:44
//Simula o click na Tecla Home do Android

import android.app.Activity;
import android.content.Intent;
import java.lang.*;
import android.util.*;
import java.lang.Exception;
import android.util.Log;

PUBLIC static void KeyHome()
{
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getActiviteEnCours().startActivity(startMain);
}
Posté le 06 décembre 2014 - 12:02
adriano thank you for this code
But when you provided a java code it is best to choose insert html xml instead WLanguage
it avoids errors in java copy / paste
I wrote here pubic lowercase within 2 insertions
and you notice that is capitalized in WLanguage and remains tiny xml
Thank you in advance.

[code: wl]
public
[/ code]

[code: xml]
public
[/ code]

adriano merci de ce code
Mais quand tu fourni un code java il est préférable de choisir l'insertion en xml html plutôt que WLangage
cela évite les erreurs java lors de copier / coller
ici j'ai écrit pubic en minuscule dans les 2 insertions
et tu remarque qu'il est mis en majuscule en WLangage et reste minuscule en xml
Merci d'avance.
Membre enregistré
3 655 messages
Popularité : +175 (223 votes)
Posté le 06 décembre 2014 - 19:04
Je ne savais pas

Vous pouvez aussi mettre un bouton sur l'écran en position négative la gauche et chauffez la clé avec le clic avec le bouton droit de la souris et de définir raccourci clavier: ACCUEIL

// Exécute le code, cliquez sur le bouton ==> init Open Window
ExécuteTraitement (BTN_Save, trtClick)

==

I did not know

You can also put a button on the screen to the left negative position and heat the key with the click with the right mouse button and define keyboard shortcut: HOME

// Execute the code, click on the button ==> init Open Window
ExecuteProcess (BTN_Save, trtClick)