From ddbae28c34f7ace0817d1c825b4e0de784db2560 Mon Sep 17 00:00:00 2001 From: Brian Mwadime Date: Sat, 2 Jul 2016 11:40:22 +0300 Subject: [PATCH] Updates for activity inheritance, file size reduction. --- app/src/main/AndroidManifest.xml | 6 --- .../kiboko/activities/DetailsActivity.java | 43 ------------------- .../kiboko/activities/FindIconsActivity.java | 4 +- .../kiboko/activities/QuizActivity.java | 14 +++--- .../kiboko/activities/TopicListActivity.java | 1 + .../activities/TutorialSlideActivity.java | 2 +- .../kiboko/fragments/TopicsFragment.java | 10 +---- 7 files changed, 10 insertions(+), 70 deletions(-) delete mode 100644 app/src/main/java/com/mozilla/hackathon/kiboko/activities/DetailsActivity.java diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4e716fa..ba6ab31 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -79,12 +79,6 @@ android:name="android.support.PARENT_ACTIVITY" android:value=".activities.DashboardActivity" /> - - - quesList; int score=0; int qid=0; @@ -51,7 +53,7 @@ public class QuizActivity extends AppCompatActivity { public void onClick(View v) { RadioGroup grp=(RadioGroup)findViewById(R.id.radioGroup1); RadioButton answer=(RadioButton)findViewById(grp.getCheckedRadioButtonId()); - Log.d("yourans", currentQ.getANSWER()+" "+answer.getText()); + LOGD("yourans", currentQ.getANSWER()+" "+answer.getText()); if(currentQ.getANSWER().equals(answer.getText())) { score++; @@ -103,12 +105,6 @@ public class QuizActivity extends AppCompatActivity { onBackPressed(); } }); - dialog.setNegativeButton("Cancel", - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - } - }); dialog.create().show(); } diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TopicListActivity.java b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TopicListActivity.java index 49a6497..ef8f838 100644 --- a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TopicListActivity.java +++ b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TopicListActivity.java @@ -11,6 +11,7 @@ import com.mozilla.hackathon.kiboko.R; * Created by Brian Mwadime on 06/06/2016. */ public class TopicListActivity extends DSOActivity { + private String TAG = TopicListActivity.class.getSimpleName(); @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java index 49daf30..eed774c 100644 --- a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java +++ b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java @@ -51,7 +51,7 @@ public class TutorialSlideActivity extends DSOActivity implements LoaderManager. private static final int LOADER_ID = 0x01; private List jsonSteps = new ArrayList(); /** - * The number of pages (wizard steps) to show in this demo. + * The number of pages (wizard steps) to show. */ private static final int NUM_PAGES = 5; diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java index 43a5c85..1694331 100644 --- a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java +++ b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java @@ -60,7 +60,7 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe list.add(get("data", "Using your data wisely", R.drawable.circular_money)); list.add(get("playstore", "Find new apps!", R.drawable.circular_googleplay)); list.add(get("storage", "Free up memory for new apps", R.drawable.circular_sdcard)); - list.add(get("broken", "Fix broken images and videos", R.drawable.circular_badimage)); + // list.add(get("broken", "Fix broken images and videos", R.drawable.circular_badimage)); list.add(get("icons", "What is that icon?", R.drawable.circular_help)); list.add(get("airplane_mode", "Using Airplane Mode", R.drawable.circular_airplane)); list.add(get("accounts_passwords", "Strengthen your Passwords!", R.drawable.circular_account)); @@ -109,7 +109,6 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe requestPermission(OVERLAY_PERMISSION_REQ_CODE_CHATHEAD); } } - } break; @@ -128,12 +127,6 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe requestPermission(requestCode); } }); - builder.setNegativeButton("Cancel", new android.content.DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - - } - }); builder.setCancelable(false); builder.show(); } @@ -168,7 +161,6 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe }else{ startOverlayService(); } - } } }