This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog alertDialog = new AlertDialog.Builder(this).create(); | |
alertDialog.setTitle("Reset..."); | |
alertDialog.setMessage("Are you sure?"); | |
alertDialog.setButton("OK", new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
// here you can add functions | |
} | |
}); | |
alertDialog.setIcon(R.drawable.icon); | |
alertDialog.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.os.Bundle; | |
public class actSpecial extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.layout_); | |
registerEvents(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(FirstActivity.this, OrderScreen.class); | |
startActivity(intent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundle bundle = this.getIntent().getExtras(); | |
if (bundle!=null && bundle.containsKey("input")) | |
{ | |
String txt=bundle.getString("input"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("plain/text"); | |
intent.putExtra(Intent.EXTRA_EMAIL,new String[] { "[email protected]" }); | |
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of the mail"); | |
intent.putExtra(Intent.EXTRA_TEXT, "body of the mail"); | |
startActivity(Intent.createChooser(intent, "Title of the chooser dialog")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String[] ss = getResources().getStringArray(R.array.authors_array); | |
final String[] items = { ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[8],ss[0] }; | |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setTitle("نتيجه جستجو"); | |
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, | |
R.layout.row_for_spinner, R.id.lblText, items); | |
builder.setAdapter(adapter, new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application android:theme="@android:style/Theme.NoTitleBar"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
. | |
. | |
new DownloadFilesTask().execute(url1, url2, url3); | |
. | |
. | |
. | |
private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"BackgroundPattern.png"]]; |
OlderNewer