Skip to content

Commit

Permalink
Hides button and deselects config when creating new config. Fixes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett committed Aug 5, 2015
1 parent 7348c1c commit 29dd4da
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
26 changes: 25 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Fwknop2.iml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
8 changes: 5 additions & 3 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<afterSyncTasks>
<task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
Expand All @@ -24,7 +26,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class ConfigListFragment extends ListFragment {
ArrayList array_list = new ArrayList();
DBHelper mydb;
SendSPA OurSender;
Button button;

/**
* The serialization (saved instance state) Bundle key representing the
Expand Down Expand Up @@ -113,7 +114,7 @@ public void onCreate(Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_list, container, false);
Button button = (Button)rootView.findViewById(R.id.btn_send);
button = (Button)rootView.findViewById(R.id.btn_send);
button.setOnClickListener(
new View.OnClickListener() {
public void onClick(View v) {
Expand Down Expand Up @@ -163,8 +164,13 @@ public boolean onOptionsItemSelected(MenuItem item) {
ConfigListActivity myactivity = (ConfigListActivity) activity;
if (myactivity.mTwoPane){
mCallbacks.onItemSelected("");
getListView().setItemChecked(mActivatedPosition, false);
//this.getListView().setItemChecked(mActivatedPosition, false);
button.setVisibility(View.INVISIBLE);
getListView().clearChoices();
customAdapter.notifyDataSetChanged();

} else {
button.setVisibility(View.INVISIBLE);
Intent detailIntent = new Intent(getActivity(), ConfigDetailActivity.class);
detailIntent.putExtra(ConfigDetailFragment.ARG_ITEM_ID, "");
startActivity(detailIntent);
Expand Down

0 comments on commit 29dd4da

Please sign in to comment.