Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:fullBackupContent="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
Expand All @@ -17,9 +17,13 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"
android:theme="@style/AppTheme"/>
<activity android:name=".FlamesActivity" />
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme" />
<activity
android:name=".FlamesActivity"
android:parentActivityName=".MainActivity"
android:theme="@style/AppTheme2" />
</application>

</manifest>
15 changes: 9 additions & 6 deletions app/src/main/java/com/adpth/flamesapp/FlamesActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class FlamesActivity extends AppCompatActivity {
ImageView output_img;
Button back;


String yourName, yourNameDisplay, partnerName, partnerNameDisplay, completeName;
String[] arr_yourName, arr_partnerName, arr_completeName;

Expand All @@ -30,7 +31,9 @@ protected void onCreate(Bundle savedInstanceState) {

Intent intent = getIntent();
yourNameDisplay = intent.getStringExtra("your_name");
partnerNameDisplay =intent.getStringExtra("your_partner");
partnerNameDisplay = intent.getStringExtra("your_partner");

getSupportActionBar().setDisplayHomeAsUpEnabled(true);

output_img = findViewById(R.id.output_img);
back = findViewById(R.id.back);
Expand All @@ -50,18 +53,18 @@ public void onClick(View v) {

public void processName() {
yourNameDisplay =
yourName = yourNameDisplay.toLowerCase().replaceAll("\\s+", "");
yourName = yourNameDisplay.toLowerCase().replaceAll("\\s+", "");
arr_yourName = yourName.split("");

partnerNameDisplay =
partnerName = partnerNameDisplay.toLowerCase().replaceAll("\\s+", "");
partnerName = partnerNameDisplay.toLowerCase().replaceAll("\\s+", "");
arr_partnerName = partnerName.split("");
}

public void eliminateCommonLetters() {
for (String i : arr_yourName) {
for (String j : arr_partnerName) {
if ( i.equals(j) ) {
if (i.equals(j)) {
arr_yourName = ArrayUtils.removeElement(arr_yourName, i);
arr_partnerName = ArrayUtils.removeElement(arr_partnerName, j);
break;
Expand Down Expand Up @@ -127,9 +130,9 @@ public void onBackPressed() {
}

private void updateUi() {
Intent intent1 = new Intent(FlamesActivity.this,MainActivity.class);
Intent intent1 = new Intent(FlamesActivity.this, MainActivity.class);
startActivity(intent1);
overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_right);
overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
finish();
}
}
6 changes: 6 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme2" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>