Commit afc99f77 authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Organize


Signed-off-by: Bruno Freitas Tissei's avatarBruno Freitas Tissei <bft15@inf.ufpr.br>
parent b3e4db19
......@@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -25,6 +25,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
......
......@@ -91,9 +91,7 @@ public class LoginActivity extends AppCompatActivity implements LoginView {
private class EditTextChangeListener implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
......@@ -101,8 +99,6 @@ public class LoginActivity extends AppCompatActivity implements LoginView {
}
@Override
public void afterTextChanged(Editable s) {
}
public void afterTextChanged(Editable s) {}
}
}
......@@ -13,12 +13,12 @@ public class MainActivity extends AppCompatActivity implements MainView {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
presenter = new MainPresenter();
} else {
presenter = PresenterManager.getInstance().restorePresenter(savedInstanceState);
}
setContentView(R.layout.activity_main);
}
......
......@@ -34,6 +34,7 @@ public class PresenterManager {
if (instance == null) {
instance = new PresenterManager(10, 30, TimeUnit.SECONDS);
}
return instance;
}
......@@ -41,6 +42,7 @@ public class PresenterManager {
Long presenterId = savedInstanceState.getLong(SIS_KEY_PRESENTER_ID);
P presenter = (P) presenters.getIfPresent(presenterId);
presenters.invalidate(presenterId);
return presenter;
}
......
package br.ufpr.c3sl.agendador.agendador.models;
/**
* Created by Bruno Freitas Tissei on 2/3/17.
*/
public class User {
}
......@@ -20,6 +20,7 @@ public abstract class ApiUtils {
public static ApiEndpoints request(final Map<String, String> header) {
OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
httpClient.addInterceptor(new Interceptor() {
@Override
public okhttp3.Response intercept(Chain chain) throws IOException {
Request original = chain.request();
......
......@@ -61,6 +61,7 @@ public class LoginPresenter extends BasePresenter<LoginView> {
Call<UserOutput> listCall = service.signIn(account);
listCall.enqueue(new Callback<UserOutput>() {
@Override
public void onResponse(Call<UserOutput> call, Response<UserOutput> response) {
Headers headers = response.headers();
......
......@@ -34,6 +34,7 @@ public class MainPresenter extends BasePresenter<MainView>{
}
private class LoadDataTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
SystemClock.sleep(1500);
......
......@@ -8,4 +8,4 @@
<include layout="@layout/toolbar"/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment