Loading app/src/main/AndroidManifest.xml +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ android:exported="false" /> <activity android:name=".ChalkActivity" android:exported="false" /> android:exported="false" android:screenOrientation="landscape"/> <activity android:name=".MainActivity" android:exported="true" Loading app/src/main/java/com/example/game2d/ChalkActivity.java +36 −0 Original line number Diff line number Diff line Loading @@ -5,8 +5,13 @@ import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.PopupWindow; import android.widget.RelativeLayout; import android.widget.TextView; public class ChalkActivity extends AppCompatActivity implements View.OnClickListener{ Loading @@ -22,11 +27,17 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList int currentQuestionIndex = 0; String selectedAnswer = ""; //for pop up intro RelativeLayout layout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk); //for pop up intro layout = findViewById(R.id.chalkActivity); // relative is the id of the layout of the page CreatepopUpwindow(); /*totalQuestionsTextView = findViewById(R.id.total_question);*/ questionTextView = findViewById(R.id.question); ansA = findViewById(R.id.ans_A); Loading @@ -49,6 +60,31 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList } //for pop up intro private void CreatepopUpwindow() { LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View popUpView=inflater.inflate(R.layout.mainpopup,null); int width = ViewGroup.LayoutParams.MATCH_PARENT; int height= ViewGroup.LayoutParams.MATCH_PARENT; boolean focusable = true; PopupWindow popupWindow = new PopupWindow(popUpView, width,height,focusable); layout.post(new Runnable() { @Override public void run() { popupWindow.showAtLocation(layout, Gravity.BOTTOM,0,0); } }); TextView Continue; Continue = popUpView.findViewById(R.id.Continue); Continue.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { popupWindow.dismiss(); } }); } @Override public void onClick(View view) { Loading app/src/main/res/font/abeezee.xml 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:app="http://schemas.android.com/apk/res-auto" app:fontProviderAuthority="com.google.android.gms.fonts" app:fontProviderPackage="com.google.android.gms" app:fontProviderQuery="ABeeZee" app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> </font-family> app/src/main/res/font/alfa_slab_one.xml 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:app="http://schemas.android.com/apk/res-auto" app:fontProviderAuthority="com.google.android.gms.fonts" app:fontProviderPackage="com.google.android.gms" app:fontProviderQuery="Alfa Slab One" app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> </font-family> app/src/main/res/layout/activity_chalk.xml +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ android:orientation="horizontal" android:padding="24dp" android:screenOrientation="landscape" android:id="@+id/chalkActivity" tools:context=".MainActivity"> Loading Loading
app/src/main/AndroidManifest.xml +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ android:exported="false" /> <activity android:name=".ChalkActivity" android:exported="false" /> android:exported="false" android:screenOrientation="landscape"/> <activity android:name=".MainActivity" android:exported="true" Loading
app/src/main/java/com/example/game2d/ChalkActivity.java +36 −0 Original line number Diff line number Diff line Loading @@ -5,8 +5,13 @@ import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.PopupWindow; import android.widget.RelativeLayout; import android.widget.TextView; public class ChalkActivity extends AppCompatActivity implements View.OnClickListener{ Loading @@ -22,11 +27,17 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList int currentQuestionIndex = 0; String selectedAnswer = ""; //for pop up intro RelativeLayout layout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk); //for pop up intro layout = findViewById(R.id.chalkActivity); // relative is the id of the layout of the page CreatepopUpwindow(); /*totalQuestionsTextView = findViewById(R.id.total_question);*/ questionTextView = findViewById(R.id.question); ansA = findViewById(R.id.ans_A); Loading @@ -49,6 +60,31 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList } //for pop up intro private void CreatepopUpwindow() { LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View popUpView=inflater.inflate(R.layout.mainpopup,null); int width = ViewGroup.LayoutParams.MATCH_PARENT; int height= ViewGroup.LayoutParams.MATCH_PARENT; boolean focusable = true; PopupWindow popupWindow = new PopupWindow(popUpView, width,height,focusable); layout.post(new Runnable() { @Override public void run() { popupWindow.showAtLocation(layout, Gravity.BOTTOM,0,0); } }); TextView Continue; Continue = popUpView.findViewById(R.id.Continue); Continue.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { popupWindow.dismiss(); } }); } @Override public void onClick(View view) { Loading
app/src/main/res/font/abeezee.xml 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:app="http://schemas.android.com/apk/res-auto" app:fontProviderAuthority="com.google.android.gms.fonts" app:fontProviderPackage="com.google.android.gms" app:fontProviderQuery="ABeeZee" app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> </font-family>
app/src/main/res/font/alfa_slab_one.xml 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:app="http://schemas.android.com/apk/res-auto" app:fontProviderAuthority="com.google.android.gms.fonts" app:fontProviderPackage="com.google.android.gms" app:fontProviderQuery="Alfa Slab One" app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> </font-family>
app/src/main/res/layout/activity_chalk.xml +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ android:orientation="horizontal" android:padding="24dp" android:screenOrientation="landscape" android:id="@+id/chalkActivity" tools:context=".MainActivity"> Loading