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

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

本文整理了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

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

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

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

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

  1. Builder builder = new AlertDialog.Builder(context);
  2. builder.setTitle("");
  3. ...
  4. builder.show();

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

  1. final EditText text = (EditText)findViewById(R.id.eTb);
  2. final Builder vars = new AlertDialog.Builder(this);
  3. Button savedvars = (Button) findViewById(R.id.showButton);
  4. savedvars.setOnClickListener(new OnClickListener() {
  5. public void onClick(View v) {
  6. String convtext = text.getText().toString();
  7. vars.setTitle("Saved Information");
  8. vars.setMessage("Entered Text: " + convtext);
  9. vars.show();
  10. }
  11. });

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

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

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

  1. Resources res = getResources();
  2. InputStream in_s = res.openRawResource(R.raw.eula);
  3. BufferedReader reader = new BufferedReader(new InputStreamReader(in_s));
  4. String key1 = preference.getKey();
  5. //if the user click on the Legal Notices preference, display the license
  6. if (key1.equalsIgnoreCase("prefEULA")){
  7. String eulaContent = "";
  8. try {
  9. while ((reader.readLine()) != null)
  10. {
  11. eulaContent += reader.readLine();
  12. }
  13. } catch (IOException e) {
  14. // TODO Auto-generated catch block
  15. e.printStackTrace();
  16. }
  17. Builder eulaDialog = new AlertDialog.Builder(this);
  18. eulaDialog.setTitle("End-User Licence Agreement");
  19. if (eulaContent!=null){
  20. eulaDialog.setMessage(eulaContent);
  21. eulaDialog.show();
  22. }
  23. }

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

  1. Resources res = getResources();
  2. InputStream in_s = res.openRawResource(R.raw.eula);
  3. BufferedReader reader = new BufferedReader(new InputStreamReader(in_s));
  4. String key = preference.getKey();
  5. //if the user click on the Legal Notices preference, display the license
  6. if (key.equalsIgnoreCase("prefEULA")){
  7. String eulaContent = "";
  8. try {
  9. String line = null;
  10. while ((line = reader.readLine()) != null) {
  11. eulaContent += line + "\n";
  12. }
  13. } catch (IOException e) {
  14. // TODO Auto-generated catch block
  15. e.printStackTrace();
  16. }
  17. Builder eulaDialog = new AlertDialog.Builder(this);
  18. eulaDialog.setTitle("End User License Agreement");
  19. if (eulaContent!=null){
  20. eulaDialog.setMessage(eulaContent);
  21. eulaDialog.show();
  22. }
  23. }

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

  1. TextView tv = new TextView(this);
  2. tv.setText("Holo every where");
  3. Builder builder= new org.holoeverywhere.app.AlertDialog.Builder(this);
  4. builder.setTheme(AlertDialog.THEME_HOLO_LIGHT);
  5. builder.setView(tv)
  6. .setPositiveButton("OK", new OnClickListener() {
  7. @Override
  8. public void onClick(DialogInterface dialog, int which) {
  9. // tasks
  10. }
  11. }).setNegativeButton("Cancel", null).setTitle("title");
  12. builder.show();

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

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

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

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

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

  1. if(audioFile.exists())
  2. {
  3. intent.setDataAndType(Uri.fromFile(audioFile), "audio/mp3");
  4. startActivity(intent);
  5. }
  6. else
  7. {
  8. Builder alert = new AlertDialog.Builder(activity_name.this);
  9. alert.setTitle("Alert");
  10. alert.setMessage("File does not exist");
  11. alert.setPositiveButton("OK", null);
  12. alert.show();
  13. }

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

  1. dialogb.show();
  2. return false;

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

  1. @Override
  2. public void remove(int which) {
  3. Builder builder = new AlertDialog.Builder(context);
  4. builder.setPositiveButton(R.string.your_button_title, new DialogInterface.OnClickListener() {
  5. @Override
  6. public void onClick(DialogInterface dialog, int which) {
  7. // do some custom delete code (e.g delete datamodel)
  8. }
  9. });
  10. builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
  11. public void onClick(DialogInterface dialog, int which) {
  12. // call notifyDataSetChanged() on your adapter otherwise it will be gone!
  13. }
  14. });
  15. builder.setTitle(R.string.your_title);
  16. builder.setMessage(context.getString(R.string.your_message));
  17. builder.show();
  18. }

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

  1. Location location = new Helper().getGPSLocation(context);
  2. if(location != null) {
  3. latitude = (int) (location.getLatitude() * 1E6);
  4. longitude = (int) (location.getLongitude() * 1E6);
  5. } else {
  6. Builder alert = new Builder(context);
  7. alert.setTitle(R.string.app_name);
  8. alert.setMessage(context.getString(R.string.enable_use_wireless_network));
  9. alert.setPositiveButton(R.string.button_ok, new DialogInterface.OnClickListener()
  10. {
  11. @Override
  12. public void onClick(DialogInterface dialog, int which)
  13. {
  14. dialog.dismiss();
  15. context.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
  16. }
  17. });
  18. alert.show();
  19. }

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

  1. @Override
  2. public void onClick(View arg0) {
  3. LoadData task = new LoadData();
  4. task.execute();
  5. construction
  6. AlertDialog.Builder builder = new AlertDialog.Builder(Destination.this);
  7. builder.setMessage("Press 'Ok' ")
  8. .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
  9. public void onClick(DialogInterface dialog, int id) {
  10. AlertDialog alertDialog = new AlertDialog.Builder(Destination.this).create();
  11. alertDialog.setTitle("Attention!");
  12. alertDialog.setMessage(" Pay attention");
  13. alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
  14. public void onClick(DialogInterface dialog, int which) {
  15. }
  16. });
  17. alertDialog.show();
  18. }
  19. })
  20. .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
  21. public void onClick(DialogInterface dialog, int id) {
  22. // do nothing
  23. }
  24. });
  25. builder.create();
  26. builder.show();

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

  1. private boolean delete_confirm() {
  2. boolean confirm = false;
  3. // confirm delete
  4. Builder confirmation = new AlertDialog.Builder(this);
  5. // set message, title
  6. confirmation.setTitle("Delete");
  7. confirmation.setMessage("Do you want to Delete");
  8. confirmation.setPositiveButton("Delete",
  9. new DialogInterface.OnClickListener() {
  10. public void onClick(DialogInterface dialog,
  11. int whichButton) {
  12. dialog.dismiss();
  13. confirm = true;
  14. }
  15. });
  16. confirmation.setNegativeButton("cancel",
  17. new DialogInterface.OnClickListener() {
  18. public void onClick(DialogInterface dialog, int which) {
  19. dialog.dismiss();
  20. confirm = false;
  21. }
  22. });
  23. confirmation.create();
  24. confirmation.show();
  25. return confirm;

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

  1. /**
  2. * Show the diff recursively
  3. *
  4. * @param p
  5. * @param i
  6. */
  7. private void show(Diff p, String indent, boolean warning) {
  8. Delta d = p.getDelta();
  9. if (d == Delta.UNCHANGED)
  10. return;
  11. if (warning)
  12. warning("%s%s", indent, p);
  13. else
  14. error("%s%s", indent, p);
  15. indent = indent + " ";
  16. switch (d) {
  17. case CHANGED :
  18. case MAJOR :
  19. case MINOR :
  20. case MICRO :
  21. break;
  22. default :
  23. return;
  24. }
  25. for (Diff c : p.getChildren())
  26. show(c, indent, warning);
  27. }

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

  1. /**
  2. * Show the diff recursively
  3. *
  4. * @param p
  5. * @param i
  6. */
  7. private void show(Diff p, String indent, boolean warning) {
  8. Delta d = p.getDelta();
  9. if (d == Delta.UNCHANGED)
  10. return;
  11. if (warning)
  12. warning("%s%s", indent, p);
  13. else
  14. error("%s%s", indent, p);
  15. indent = indent + " ";
  16. switch (d) {
  17. case CHANGED :
  18. case MAJOR :
  19. case MINOR :
  20. case MICRO :
  21. break;
  22. default :
  23. return;
  24. }
  25. for (Diff c : p.getChildren())
  26. show(c, indent, warning);
  27. }

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

  1. /**
  2. * Show the diff recursively
  3. *
  4. * @param p
  5. * @param i
  6. */
  7. private void show(Diff p, String indent, boolean warning) {
  8. Delta d = p.getDelta();
  9. if (d == Delta.UNCHANGED)
  10. return;
  11. if (warning)
  12. warning("%s%s", indent, p);
  13. else
  14. error("%s%s", indent, p);
  15. indent = indent + " ";
  16. switch (d) {
  17. case CHANGED :
  18. case MAJOR :
  19. case MINOR :
  20. case MICRO :
  21. break;
  22. default :
  23. return;
  24. }
  25. for (Diff c : p.getChildren())
  26. show(c, indent, warning);
  27. }

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

  1. /**
  2. * Show the diff recursively
  3. *
  4. * @param p
  5. * @param i
  6. */
  7. private void show(Diff p, String indent, boolean warning) {
  8. Delta d = p.getDelta();
  9. if (d == Delta.UNCHANGED)
  10. return;
  11. if (warning)
  12. warning("%s%s", indent, p).header("-diff");
  13. else
  14. error("%s%s", indent, p).header("-diff");
  15. indent = indent + " ";
  16. switch (d) {
  17. case CHANGED :
  18. case MAJOR :
  19. case MINOR :
  20. case MICRO :
  21. break;
  22. default :
  23. return;
  24. }
  25. for (Diff c : p.getChildren())
  26. show(c, indent, warning);
  27. }

相关文章

Builder类方法