aQute.bnd.osgi.Builder.show()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中aQute.bnd.osgi.Builder.show()方法的一些代码示例,展示了Builder.show()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Builder.show()方法的具体详情如下:
包路径:aQute.bnd.osgi.Builder
类名称:Builder
方法名:show

Builder.show介绍

[英]Show the diff recursively
[中]递归地显示差异

代码示例

代码示例来源:origin: stackoverflow.com

Builder alert = new AlertDialog.Builder(screen4.this);
alert.setTitle("Doctor");
alert.setMessage("message");
alert.setPositiveButton("OK",null);
alert.show();

代码示例来源:origin: stackoverflow.com

Builder myCustomDialog = new AlertDialog.Builder(yourContext);
   LayoutInflater factory = LayoutInflater.from(context);
 final View yourInflatedView = factory.inflate(R.layout.your_xml_layout, null);
 //Here you get your imageView (or TextView, EditText,...)
 ImageView img1 = (ImageView) yourInflatedView.findViewById(R.id.img1);
 // Do stuff with your imageview...
 myCustomDialog.setView(yourInflatedView);
 myCustomDialog.show();

代码示例来源:origin: stackoverflow.com

Builder builder = new AlertDialog.Builder(context);
  builder.setTitle("");
...
  builder.show();

代码示例来源:origin: stackoverflow.com

final EditText text = (EditText)findViewById(R.id.eTb);
final Builder vars = new AlertDialog.Builder(this);

Button savedvars = (Button) findViewById(R.id.showButton);
  savedvars.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
      String convtext = text.getText().toString();
      vars.setTitle("Saved Information");
      vars.setMessage("Entered Text: " + convtext);
      vars.show();
    }
  });

代码示例来源:origin: stackoverflow.com

protected void onListItemClick(ListView l, View v, int position, long id) {
  super.onListItemClick(l, v, position, id);
  Builder builder = new AlertDialog.Builder(this);
  builder.setMessage(item[position] + " is clicked.");
  builder.setPositiveButton("OK", null);
  builder.show();
}

代码示例来源:origin: stackoverflow.com

Resources res = getResources();
InputStream in_s = res.openRawResource(R.raw.eula);
BufferedReader reader = new BufferedReader(new InputStreamReader(in_s));

String key1 = preference.getKey();
//if the user click on the Legal Notices preference, display the license
if (key1.equalsIgnoreCase("prefEULA")){
String eulaContent = "";
try {

  while ((reader.readLine()) != null)
  {
     eulaContent += reader.readLine();

}
}   catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
}
Builder eulaDialog = new AlertDialog.Builder(this);
eulaDialog.setTitle("End-User Licence Agreement");
if (eulaContent!=null){
eulaDialog.setMessage(eulaContent);
eulaDialog.show();                

}            

}

代码示例来源:origin: stackoverflow.com

Resources res = getResources();  
InputStream in_s = res.openRawResource(R.raw.eula);  
BufferedReader reader = new BufferedReader(new InputStreamReader(in_s));  
   String key = preference.getKey();  
   //if the user click on the Legal Notices preference, display the license  
   if (key.equalsIgnoreCase("prefEULA")){  
   String eulaContent = "";  
   try {  
     String line = null;  
     while ((line = reader.readLine()) != null) {  
     eulaContent += line + "\n";
   }  
   }   catch (IOException e) {  
     // TODO Auto-generated catch block  
     e.printStackTrace();  
   }  
   Builder eulaDialog = new AlertDialog.Builder(this);  
   eulaDialog.setTitle("End User License Agreement");  
   if (eulaContent!=null){  
   eulaDialog.setMessage(eulaContent);  
   eulaDialog.show();                  
   }              
   }

代码示例来源:origin: stackoverflow.com

TextView tv = new TextView(this);
 tv.setText("Holo every where");
 Builder builder=   new org.holoeverywhere.app.AlertDialog.Builder(this);
 builder.setTheme(AlertDialog.THEME_HOLO_LIGHT);
 builder.setView(tv)
 .setPositiveButton("OK", new OnClickListener() {
   @Override
   public void onClick(DialogInterface dialog, int which) {
     // tasks
   }
 }).setNegativeButton("Cancel", null).setTitle("title");
 builder.show();

代码示例来源:origin: stackoverflow.com

Builder alert = new AlertDialog.Builder(ActivityName.this);
alert.setTitle("Doctor");
alert.setMessage("message");
alert.setPositiveButton("OK",null);
alert.show();

代码示例来源:origin: stackoverflow.com

public void showDialog(String title,String message)
 {
   Builder builder = new Builder(global_context);
   builder.setCancelable(true);
   builder.setTitle(title);
   builder.setMessage(message);
   builder.show();
 }
//this is not custom dialog // intead of this method you can put your custom Dialog code

代码示例来源:origin: stackoverflow.com

if(audioFile.exists())
{
 intent.setDataAndType(Uri.fromFile(audioFile), "audio/mp3");
 startActivity(intent);
}
else
{
  Builder alert = new AlertDialog.Builder(activity_name.this);
          alert.setTitle("Alert");
          alert.setMessage("File does not exist");
          alert.setPositiveButton("OK", null);
          alert.show();
}

代码示例来源:origin: stackoverflow.com

dialogb.show();
return false;

代码示例来源:origin: stackoverflow.com

@Override
public void remove(int which) {
  Builder builder = new AlertDialog.Builder(context);
  builder.setPositiveButton(R.string.your_button_title, new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
      // do some custom delete code (e.g delete datamodel)
    }
  });
  builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
     // call notifyDataSetChanged() on your adapter otherwise it will be gone!
   }
 });
 builder.setTitle(R.string.your_title);
 builder.setMessage(context.getString(R.string.your_message));
 builder.show();
}

代码示例来源:origin: stackoverflow.com

Location location = new Helper().getGPSLocation(context);
if(location != null) {
  latitude = (int) (location.getLatitude() * 1E6);
  longitude = (int) (location.getLongitude() * 1E6);
} else {
  Builder alert = new Builder(context);
  alert.setTitle(R.string.app_name);
  alert.setMessage(context.getString(R.string.enable_use_wireless_network));
  alert.setPositiveButton(R.string.button_ok, new DialogInterface.OnClickListener() 
  {
    @Override
    public void onClick(DialogInterface dialog, int which)
    {
      dialog.dismiss();
      context.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
    }
  });
  alert.show();
}

代码示例来源:origin: stackoverflow.com

@Override
     public void onClick(View arg0) {
                   LoadData task = new LoadData();
                   task.execute();
           construction
           AlertDialog.Builder builder = new AlertDialog.Builder(Destination.this);
           builder.setMessage("Press 'Ok' ")
               .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog, int id) {
                                       AlertDialog alertDialog = new AlertDialog.Builder(Destination.this).create();
                 alertDialog.setTitle("Attention!");
                 alertDialog.setMessage(" Pay attention");
                  alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialog, int which) {
                     }
                   });
                   alertDialog.show();
                 }
               })
               .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog, int id) {
                   // do nothing
                 }
               });
           builder.create();
           builder.show();

代码示例来源:origin: stackoverflow.com

private boolean delete_confirm() {
   boolean confirm = false;
   // confirm delete
   Builder confirmation = new AlertDialog.Builder(this);
       // set message, title
   confirmation.setTitle("Delete");
   confirmation.setMessage("Do you want to Delete");
   confirmation.setPositiveButton("Delete",
       new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface dialog,
             int whichButton) {
           dialog.dismiss();
           confirm = true;
         }
        });
   confirmation.setNegativeButton("cancel",
       new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface dialog, int which) {
           dialog.dismiss();
           confirm = false;
         }
       });
   confirmation.create();
   confirmation.show();
   return confirm;

代码示例来源:origin: biz.aQute/bndlib

/**
 * Show the diff recursively
 * 
 * @param p
 * @param i
 */
private void show(Diff p, String indent, boolean warning) {
  Delta d = p.getDelta();
  if (d == Delta.UNCHANGED)
    return;
  if (warning)
    warning("%s%s", indent, p);
  else
    error("%s%s", indent, p);
  indent = indent + " ";
  switch (d) {
    case CHANGED :
    case MAJOR :
    case MINOR :
    case MICRO :
      break;
    default :
      return;
  }
  for (Diff c : p.getChildren())
    show(c, indent, warning);
}

代码示例来源:origin: biz.aQute.bnd/bndlib

/**
 * Show the diff recursively
 *
 * @param p
 * @param i
 */
private void show(Diff p, String indent, boolean warning) {
  Delta d = p.getDelta();
  if (d == Delta.UNCHANGED)
    return;
  if (warning)
    warning("%s%s", indent, p);
  else
    error("%s%s", indent, p);
  indent = indent + " ";
  switch (d) {
    case CHANGED :
    case MAJOR :
    case MINOR :
    case MICRO :
      break;
    default :
      return;
  }
  for (Diff c : p.getChildren())
    show(c, indent, warning);
}

代码示例来源:origin: biz.aQute.bnd/bnd

/**
 * Show the diff recursively
 *
 * @param p
 * @param i
 */
private void show(Diff p, String indent, boolean warning) {
  Delta d = p.getDelta();
  if (d == Delta.UNCHANGED)
    return;
  if (warning)
    warning("%s%s", indent, p);
  else
    error("%s%s", indent, p);
  indent = indent + " ";
  switch (d) {
    case CHANGED :
    case MAJOR :
    case MINOR :
    case MICRO :
      break;
    default :
      return;
  }
  for (Diff c : p.getChildren())
    show(c, indent, warning);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Show the diff recursively
 * 
 * @param p
 * @param i
 */
private void show(Diff p, String indent, boolean warning) {
  Delta d = p.getDelta();
  if (d == Delta.UNCHANGED)
    return;
  if (warning)
    warning("%s%s", indent, p).header("-diff");
  else
    error("%s%s", indent, p).header("-diff");
  indent = indent + " ";
  switch (d) {
    case CHANGED :
    case MAJOR :
    case MINOR :
    case MICRO :
      break;
    default :
      return;
  }
  for (Diff c : p.getChildren())
    show(c, indent, warning);
}

相关文章

Builder类方法