This file contains hidden or 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
| //How to Create an Interface listener. | |
| . | |
| . | |
| //Our main class | |
| public class ActProfile extends AppCompatActivity implements InterProfileUpdate { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.profile_info); |
This file contains hidden or 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
| buildscript { | |
| repositories { | |
| maven { url 'https://maven.fabric.io/public' } | |
| } | |
| dependencies { | |
| classpath 'io.fabric.tools:gradle:1.+' | |
| } | |
| } | |
| apply plugin: 'com.android.application' |
This file contains hidden or 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.content.Context; | |
| import android.net.ConnectivityManager; | |
| import android.net.NetworkInfo; | |
| import android.telephony.TelephonyManager; | |
| /** | |
| * Check device's network connectivity and speed | |
| * @author emil http://stackoverflow.com/users/220710/emil | |
| * | |
| */ |
This file contains hidden or 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
| The VCS client of Android Studio | |
| The powerful Android Studio | |
| Avoiding cold starts on Android | |
| Mastering the Coordinator Layout | |
| Squeezing your Gradle builds | |
| When Iron Man becomes reactive, RxJava | |
| When the Avengers meet Dagger2, RxJava and Retrofit in a clean way | |
| A useful stack on android #3, compatibility | |
| A useful stack on android #2, user interface | |
| A useful stack on android #1, architecture |
This file contains hidden or 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
| //We need picasso for this | |
| Picasso.with(this) | |
| .load("http://i.imgur.com/DvpvklR.png") | |
| .transform(new RoundedTransformation(50, 4)) | |
| .resize(100, 100) | |
| .centerCrop().into(imageView1); | |
| //////////////////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:local="http://schemas.android.com/apk/res-auto" | |
| android:orientation="vertical" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent"> | |
| <EditText | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:textSize="40dp" |
This file contains hidden or 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
| namespace Stella.Core.ViewModels | |
| { | |
| public class FirstViewModel | |
| : MvxViewModel | |
| { | |
| public FirstViewModel() | |
| { | |
| HomeClick = new MvxCommand<string>(param =>{ | |
| ShowViewModel<HomeViewModel>(); |
This file contains hidden or 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
| RestService.cs | |
| namespace Stella.Core.Services | |
| { | |
| public class RestService : IntIRestService | |
| { | |
| public async Task<StellaData> GetSalesPeopleAsync() | |
| { | |
| try | |
| { |
This file contains hidden or 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
| TYPE-1 | |
| ------------------------------------------------------------------------------------------------------------------------ | |
| //Declare a Http client | |
| var client = new HttpClient(); | |
| //Add a Base URl | |
| //client.BaseAddress = new Uri(Constants.MUrl); | |
| //Add the response type | |
| client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(Constants.ResponseType)); | |
| //Add the API | |
| var response =await client.GetStringAsync(new Uri(Constants.mUrl)); |