Set base for adding login.
This commit is contained in:
parent
a02d372b90
commit
9fb10281cb
14 changed files with 172 additions and 16 deletions
|
@ -2,6 +2,7 @@ package com.codigoparallevar.minicards;
|
|||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
@ -9,6 +10,7 @@ import android.support.v7.widget.Toolbar;
|
|||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
@ -18,11 +20,18 @@ import java.io.IOException;
|
|||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import com.programaker.api.ProgramakerApi;
|
||||
|
||||
public class DeckPreviewActivity extends ReloadableAppCompatActivity {
|
||||
|
||||
public static final String INTENT = "com.codigoparallevar.minicards.DECK";
|
||||
private ListView listView;
|
||||
private CardPreviewArrayAdapter cardArrayAdapter;
|
||||
private ProgramakerApi ProgramakerApi = new ProgramakerApi();
|
||||
|
||||
protected void openLoginForm(View view) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -39,7 +48,26 @@ public class DeckPreviewActivity extends ReloadableAppCompatActivity {
|
|||
}
|
||||
});
|
||||
|
||||
Button loginButton = (Button) findViewById(R.id.login_in_programaker_button);
|
||||
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DeckPreviewActivity.this.openLoginForm(v);
|
||||
}
|
||||
});
|
||||
|
||||
listView = (ListView) findViewById(R.id.card_deck_list);
|
||||
|
||||
|
||||
new AsyncTask<ProgramakerApi, Void, Boolean>() {
|
||||
protected Boolean doInBackground(ProgramakerApi... api) {
|
||||
return api[0].Check();
|
||||
}
|
||||
|
||||
protected void onPostExecute(Boolean result) {
|
||||
Log.d("MiniCards", "check result: " + result);
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, this.ProgramakerApi);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue