Skip to content
Merged
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
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.example.androidtechies.majorproject.MainActivity">
<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListPage" />
<activity android:name=".HomeScreen" />
<activity android:name=".DescriptionActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.example.androidtechies.majorproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class DescriptionActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.description);

Intent intent = getIntent();
InformationModel model = intent.getParcelableExtra("Information");

Log.d("description", model.getTitleOfProject());

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.example.androidtechies.majorproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class HomeScreen extends AppCompatActivity {
public static final String HomeScreenTag = "HomeScreen";
public static final Integer cseValue = 0;
public static final Integer it = 0;
public static final Integer ece = 0;
public static final Integer eee = 0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_screen);
final Button cse = (Button) findViewById(R.id.cseTag);
Button ece = (Button) findViewById(R.id.eceTag);
Button it = (Button) findViewById(R.id.itTag);
Button eee = (Button) findViewById(R.id.eeeTag);
cse.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent cseIntent = new Intent(HomeScreen.this, ListPage.class);
cseIntent.putExtra(HomeScreenTag, cseValue);
startActivity(cseIntent);

}
});
// ece.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent ece = new Intent(HomeScreen.this, ECEHomeScreen.class);
// startActivity(ece);
//
// }
// });
// it.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent it = new Intent(HomeScreen.this, ITHomeScreen.class);
// startActivity(it);
//
// }
// });
// eee.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent eee = new Intent(HomeScreen.this, EEEHomeScreen.class);
// startActivity(eee);
//
// }
// });
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package com.example.androidtechies.majorproject;

import android.os.Parcel;
import android.os.Parcelable;

/**
* Created by TANSU on 22/03/2018.
*/

public class InformationModel implements Parcelable {
String titleOfProject;
String introProject;
String technologyUsed;

public InformationModel(String titleOfProject, String introProject, String technologyUsed) {
this.titleOfProject = titleOfProject;
this.introProject = introProject;
this.technologyUsed = technologyUsed;
}

public String getTitleOfProject() {
return titleOfProject;
}

public void setTitleOfProject(String titleOfProject) {
this.titleOfProject = titleOfProject;
}

public String getIntroProject() {
return introProject;
}

public void setIntroProject(String introProject) {
this.introProject = introProject;
}

public String getTechnologyUsed() {
return technologyUsed;
}

public void setTechnologyUsed(String technologyUsed) {
this.technologyUsed = technologyUsed;
}

@Override
public int describeContents() {
return 0;
}

@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(titleOfProject);
parcel.writeString(introProject);
parcel.writeString(technologyUsed);
}

protected InformationModel(Parcel in) {
titleOfProject = in.readString();
introProject = in.readString();
technologyUsed = in.readString();
}

public static final Creator<InformationModel> CREATOR = new Creator<InformationModel>() {
@Override
public InformationModel createFromParcel(Parcel in) {
return new InformationModel(in);
}

@Override
public InformationModel[] newArray(int size) {
return new InformationModel[size];
}
};

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.example.androidtechies.majorproject;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.ArrayList;

/**
* Created by TANSU on 22/03/2018.
*/

public class ListAdapter extends RecyclerView.Adapter<ListAdapter.MyViewHolder> {

ArrayList<InformationModel> informationList;
Context context;
ClickListener listener;


public ListAdapter(ArrayList<InformationModel> informationList , Context context, ClickListener listener) {
this.informationList = informationList;
this.context = context;
this.listener = listener;
}

@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context)
.inflate(R.layout.activity_project_item, parent , false);
final MyViewHolder holder = new MyViewHolder(view);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listener.onItemClick(v, holder.getAdapterPosition());
}
});
return holder;
}

@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
holder.projectTitle.setText(informationList.get(position).getTitleOfProject());
holder.technologyUsed.setText(informationList.get(position).getTechnologyUsed());
}

@Override
public int getItemCount() {
return informationList.size();
}

public class MyViewHolder extends RecyclerView.ViewHolder {
TextView projectTitle;
TextView technologyUsed;
public MyViewHolder(View itemView) {
super(itemView);
projectTitle = itemView.findViewById(R.id.list_item_heading);
technologyUsed = itemView.findViewById(R.id.list_item_tech);
}
}

public interface ClickListener {
void onItemClick(View v, int position);

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package com.example.androidtechies.majorproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import java.util.ArrayList;

public class ListPage extends AppCompatActivity {
ArrayList<InformationModel> informationModelArrayList;
RecyclerView recyclerView;
ListAdapter listAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_page);
Intent intent = getIntent();
Integer value = intent.getIntExtra(HomeScreen.HomeScreenTag,0);
informationModelArrayList = new ArrayList<>();
informationModelArrayList = createFakeData(value);


recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
// listAdapter = new ListAdapter(informationModelArrayList, this);

listAdapter = new ListAdapter(informationModelArrayList, this, new ListAdapter.ClickListener() {
@Override
public void onItemClick(View v, int position) {
Intent intent = new Intent(ListPage.this, DescriptionActivity.class);
intent.putExtra("Information",informationModelArrayList.get(position));
startActivity(intent);

}
});

RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setAdapter(listAdapter);
}

// Todo check value and apply switch case

private ArrayList<InformationModel> createFakeData(int value) {
ArrayList<InformationModel> arrayList = new ArrayList<>();
int length = getResources().getStringArray(R.array.project_title_it).length;
InformationModel model;
for(int i=0 ; i<length; i++) {
model = new InformationModel(
getResources().getStringArray(R.array.project_title_it)[i],
getResources().getStringArray(R.array.project_introduction_it)[i],
getResources().getStringArray(R.array.project_technology_used_it)[i]
);
arrayList.add(model);
}
return arrayList;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.example.androidtechies.majorproject;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.*;

public class SplashScreen extends AppCompatActivity {
private TextView textView;
private ImageView imageView;
@SuppressLint("RestrictedApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView=(TextView) findViewById(R.id.projectName);
imageView=(ImageView) findViewById(R.id.splashIcon);
Animation myanim = AnimationUtils.loadAnimation(this,R.anim.mytransition);
textView.startAnimation(myanim);
imageView.startAnimation(myanim);
final Intent branch = new Intent(this,HomeScreen.class);
Thread timer = new Thread(){
public void run(){
try {
sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
finally {
startActivity(branch);
finish();
}
}
};
timer.start();
}

}
6 changes: 6 additions & 0 deletions app/src/main/res/anim/mytransition.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration='1000'/>
Binary file added app/src/main/res/drawable/csef.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ecef.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/eeef.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/itf.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/projecticon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading