Skip to content

Commit

Permalink
Merge pull request ACM-JUIT#2 from CH1NRU5T/main
Browse files Browse the repository at this point in the history
final first draft
  • Loading branch information
devptyagi authored Jul 7, 2021
2 parents fea847c + 059d714 commit 9d81ec9
Show file tree
Hide file tree
Showing 63 changed files with 998 additions and 146 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
.env
23 changes: 17 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
plugins {
id 'com.android.application'
id 'com.google.secrets_gradle_plugin' version '0.6'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
viewBinding{
enabled=true
}
viewBinding {
enabled = true

}
defaultConfig {
applicationId "com.anshagrawal.dcmlkit"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -36,6 +35,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand All @@ -56,4 +56,15 @@ dependencies {
//expandedView library
compile 'com.github.iammert:ExpandableLayout:1.3'

}
//Room Database
implementation "androidx.room:room-runtime:2.3.0"
annotationProcessor "androidx.room:room-compiler:2.3.0"

// Android Architecture Components
def lifecycle_version = "2.3.1"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "android.arch.lifecycle:extensions:1.1.1"


}
14 changes: 9 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Dcmlkit">
<activity android:name=".SplashActivity">
<activity android:name=".Activities.DecodeActivity"></activity>
<activity android:name=".Activities.DashboardActivity" />
<activity android:name=".Activities.CameraActivity" />
<activity android:name=".Activities.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"
android:windowSoftInputMode="adjustPan">

</activity>
<activity
android:name=".Activities.MainActivity"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" /> <!-- File Provider -->
Expand All @@ -37,6 +40,7 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>

<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
Expand Down
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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);
}
}
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);

});
}


}
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);
}
}
Loading

0 comments on commit 9d81ec9

Please sign in to comment.