This commit is contained in:
2024-02-14 18:15:11 -06:00
parent a8f146d4fa
commit c2e9789ee9
50 changed files with 846 additions and 23 deletions

View File

@@ -3,20 +3,7 @@
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="29261FDH3008Z2" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-02-14T16:21:50.875064421Z" />
</State>
<State />
</entry>
</value>
</component>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View File

@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="gradleHome" value="/usr/share/java/gradle" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

View File

@@ -1,6 +1,8 @@
package com.calebfontenot.crimeactivity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import android.os.Bundle;
@@ -10,5 +12,15 @@ public class CrimeActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FragmentManager fm = getSupportFragmentManager();
Fragment fragment = fm.findFragmentById(R.id.fragment_container);
if (fragment == null) {
fragment = new CrimeFragment();
fm.beginTransaction()
.add(R.id.fragment_container,
fragment).commit();
}
}
}

View File

@@ -1,5 +1,7 @@
package com.calebfontenot.crimeactivity;
import static android.widget.CompoundButton.*;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
@@ -31,11 +33,12 @@ public class CrimeFragment extends Fragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_crime, container, false);
View v = inflater.inflate(R.layout.activity_main, container, false);
mSolvedCheckBox = (CheckBox) v.findViewById(R.id.crime_solved);
mTitleField = (EditText) v.findViewById(R.id.crime_title);
mDateButton = (Button) v.findViewById(R.id.crime_date);
mSolvedCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
mSolvedCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mCrime.setmSolved(isChecked);
@@ -58,6 +61,9 @@ public class CrimeFragment extends Fragment {
}
});
return v; //super.onCreateView(inflater, container, savedInstanceState);
mDateButton = (Button) v.findViewById(R.id.crime_date);
mDateButton.setText(mCrime.getmDate().toString());
mDateButton.setEnabled(false);
return super.onCreateView(inflater, container, savedInstanceState);
}
}

View File

@@ -5,9 +5,9 @@
android:layout_height="match_parent"
android:layout_margin="16dp"
android:orientation="vertical">
<!--style="?android:listSeperatorTextViewStyle"-->
<TextView
style="?android:listSeperatorTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/crime_title_label"/>
@@ -18,8 +18,9 @@
android:layout_height="wrap_content"
android:hint="@string/crime_title_hint" />
<!--style="?android:listSeperatorTextViewStyle"-->
<TextView
style="?android:listSeperatorTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/crime_details_label"