One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create(); | |
alertDialog.setTitle("Alert"); | |
alertDialog.setMessage("Alert message to be shown"); | |
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK", | |
new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
dialog.dismiss(); | |
} | |
}); | |
alertDialog.show(); |
public static class KeyBoardView extends Fragment { | |
//Hide Keyboard | |
public static void hideKeyboard(Context context) { | |
try { | |
((Activity) context).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); | |
if ((((Activity) context).getCurrentFocus() != null) && (((Activity) context).getCurrentFocus().getWindowToken() != null)) { | |
((InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(((Activity) context).getCurrentFocus().getWindowToken(), 0); | |
} | |
} catch (Exception e) { | |
e.printStackTrace(); |
@Override | |
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { | |
inflater.inflate(R.menu.main_search, menu); | |
SearchView sv = (SearchView) menu.findItem(R.id.action_search).getActionView(); | |
sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() { | |
@Override | |
public boolean onQueryTextSubmit(String query) { | |
//Do something here | |
searchData(query, false); | |
return false; |
import java.util.regex.Pattern | |
def versionMajor = 1 | |
def versionMinor = 0 | |
def versionPatch = 0 | |
buildscript { | |
repositories { | |
mavenCentral() | |
} |
import 'dart:math' as math; | |
import 'package:meta/meta.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(new MaterialApp( | |
theme: new ThemeData( | |
canvasColor: Colors.deepPurple, | |
iconTheme: new IconThemeData(color: Colors.white), | |
accentColor: Colors.pinkAccent, |
import "package:flutter/material.dart"; | |
void main() { | |
runApp(new ControlleApp()); | |
} | |
class ControlleApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( |
import 'package:camera/camera.dart'; | |
import 'dart:io'; | |
import 'package:path_provider/path_provider.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'dart:async'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
/* | |
//Needed in Main.dart |
import 'dart:async'; | |
import 'package:async/async.dart'; | |
import 'dart:io'; | |
import 'package:path/path.dart'; | |
import 'dart:convert'; | |
import 'package:http/http.dart' as http; | |
import 'package:flutter/material.dart'; | |
// Usage |