forked from ACM-JUIT/Dcryptor-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ACM-JUIT#2 from CH1NRU5T/main
final first draft
- Loading branch information
Showing
63 changed files
with
998 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/anshagrawal/dcmlkit/Activities/CameraActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.anshagrawal.dcmlkit.Activities; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.anshagrawal.dcmlkit.R; | ||
|
||
public class CameraActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
getSupportActionBar().hide(); | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_camera); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/anshagrawal/dcmlkit/Activities/DashboardActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.anshagrawal.dcmlkit.Activities; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.lifecycle.ViewModelProviders; | ||
import androidx.recyclerview.widget.LinearLayoutManager; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import com.anshagrawal.dcmlkit.Adapters.CypherAdapter; | ||
import com.anshagrawal.dcmlkit.R; | ||
import com.anshagrawal.dcmlkit.ViewModel.CypherViewModel; | ||
import com.anshagrawal.dcmlkit.databinding.ActivityDashboardBinding; | ||
import com.google.android.material.floatingactionbutton.FloatingActionButton; | ||
|
||
public class DashboardActivity extends AppCompatActivity { | ||
|
||
ActivityDashboardBinding binding; | ||
CypherViewModel cypherViewModel; | ||
CypherAdapter adapter; | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
binding = ActivityDashboardBinding.inflate(getLayoutInflater()); | ||
setContentView(binding.getRoot()); | ||
|
||
cypherViewModel = ViewModelProviders.of(this).get(CypherViewModel.class); | ||
binding.addCypherBtn.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
startActivity(new Intent(DashboardActivity.this, MainActivity.class)); | ||
} | ||
}); | ||
|
||
cypherViewModel.getallCyphers.observe(this, dcryptors -> { | ||
binding.cypherRecycler.setLayoutManager(new LinearLayoutManager(this)); | ||
adapter = new CypherAdapter(DashboardActivity.this, dcryptors); | ||
binding.cypherRecycler.setAdapter(adapter); | ||
|
||
}); | ||
} | ||
|
||
|
||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/anshagrawal/dcmlkit/Activities/DecodeActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.anshagrawal.dcmlkit.Activities; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.ClipData; | ||
import android.content.ClipboardManager; | ||
import android.os.Bundle; | ||
import android.text.method.ScrollingMovementMethod; | ||
import android.util.Log; | ||
import android.view.View; | ||
import android.widget.AdapterView; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.Button; | ||
import android.widget.ImageView; | ||
import android.widget.ListView; | ||
import android.widget.TextView; | ||
import android.widget.Toast; | ||
|
||
import com.anshagrawal.dcmlkit.R; | ||
import com.anshagrawal.dcmlkit.VolleyResponseHandler; | ||
import com.anshagrawal.dcmlkit.databinding.ActivityDecodeBinding; | ||
|
||
import org.json.JSONException; | ||
import org.w3c.dom.Text; | ||
|
||
import java.util.ArrayList; | ||
|
||
import static android.content.ContentValues.TAG; | ||
|
||
public class DecodeActivity extends AppCompatActivity { | ||
ActivityDecodeBinding binding; | ||
ArrayList<String> decodes; | ||
ArrayAdapter<String> arrayAdapter; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
binding = ActivityDecodeBinding.inflate(getLayoutInflater()); | ||
setContentView(binding.getRoot()); | ||
decodes = new ArrayList<>(); | ||
|
||
Bundle bundle = getIntent().getExtras(); | ||
String[] decodedStringArray = bundle.getStringArray("decodedTextStringArray"); | ||
arrayAdapter = new ArrayAdapter<String>(DecodeActivity.this, R.layout.activity_listview, decodedStringArray); | ||
binding.myListView.setAdapter(arrayAdapter); | ||
// VolleyResponseHandler volleyResponseHandler = new VolleyResponseHandler(); | ||
|
||
decodes = new ArrayList<>(); | ||
|
||
|
||
// binding.myListView.setBackgroundResource(R.drawable.edittext_listview); | ||
// binding.myListView.setClipToOutline(true); | ||
} | ||
} |
Oops, something went wrong.