Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Urgent , Aide code java android

Featured Replies

Posté(e)
package com.android.activate;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;

import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
public class ActivateApplicationActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
// action id
private static final int ID_UP = 1;
private static final int ID_DOWN = 2;
private static final int ID_SEARCH = 3;
QuickAction quickAction;
private ImageButton b;
private ImageButton a;
@Override
public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 //setContentView(R.layout.main1);
 b = (ImageButton) this.findViewById(R.id.stop);
 b.setOnClickListener(this);
 a = (ImageButton) this.findViewById(R.id.start);


ActionItem appel = new ActionItem(ID_DOWN, "Appeler", getResources()
.getDrawable(R.drawable.call));
 ActionItem sms = new ActionItem(ID_UP, "Envoyer message",
getResources().getDrawable(R.drawable.sms));
 ActionItem fermer = new ActionItem(ID_SEARCH, "Arreter application",
getResources().getDrawable(R.drawable.ferme));
 final QuickAction quickAction = new QuickAction(this,QuickAction.VERTICAL);
 // add action items into QuickAction
 quickAction.addActionItem(appel);
 quickAction.addActionItem(sms);
 quickAction.addActionItem(fermer);


 /*b.setOnClickListener(new View.OnClickListener() {
 @Override
  public void onClick(View v) {
  quickAction.show(v);
 }
  });*/

 }

 /*


/*a.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View v) {
  // TODO Auto-generated method stub
  quickAction.show(v);
 }
 });*/

/*a.setOnClickListener(new View.OnClickListener() {
 @Override
  public void onClick(View v) {
  quickAction.show(v);
 }
  });*/

@Override
public void onClick(final View v) {


  // TODO Auto-generated method stub
  AlertDialog.Builder builder = new AlertDialog.Builder(this);
  builder.setMessage("Voulez vous activer Offolowme")
  .setCancelable(false)
  .setPositiveButton("oui",
 new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
 setContentView(R.layout.main1);



}
  })
  .setNegativeButton("Non",
 new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
 dialog.cancel();
}
  });
  // AlertDialog dialog = builder.create();
  builder.show();
 }

public void clicker(View v) {
 //Log.i("message","message");

 quickAction.show(v);
/* a.setOnClickListener(new View.OnClickListener() {
@Override
 public void onClick(View v) {
 quickAction.show(v);
}
 });*/}
}

action.

Modifié par tuto

Posté(e)

C'est pas la bonne section,

On ne met pas "svp aidé [color=red]mwa[/color] c urjent" dans son titre

C'est illisible.

De rien

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.