Skip to content
Open
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android:
components:
- platform-tools
- tools
- build-tools-26.0.2
- android-26
- build-tools-27.0.3
- android-27
- extra-android-m2repository
before_script:
- chmod +x gradlew
Expand Down
6 changes: 5 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'


//Room dependencies
implementation 'android.arch.persistence.room:runtime:1.0.0'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
// butter knife
compile 'com.jakewharton:butterknife:8.8.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
15 changes: 9 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/atlogo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".SplashScreen">
android:theme="@style/AppTheme"

>
<activity android:name=".SplashScreen" android:noHistory="true" android:screenOrientation="portrait">
<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>
<activity android:name=".ListPage" android:screenOrientation="portrait"/>
<activity android:name=".HomeScreen" android:screenOrientation="portrait"/>
<activity android:name=".DescriptionActivity" android:screenOrientation="portrait"></activity>
</application>

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

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.widget.TextView;

Expand All @@ -18,21 +20,31 @@ public class DescriptionActivity extends AppCompatActivity {
TextView techDescription;
@BindView(R.id.collapsingtoolbar)
CollapsingToolbarLayout cToolBar;
@BindView(R.id.projectModule)
TextView modulein;


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

ButterKnife.bind(this);

Intent intent = getIntent();
InformationModel model = intent.getParcelableExtra("Information");
String title = model.getTitleOfProject();
String intro = model.getIntroProject();
String tech = model.getTechnologyUsed();
String module = model.getModulein();
Log.d("Information", title+ " 2 "+intro+ " 3 "+tech);
introDescription.setText(intro);
introDescription.setTextSize(20f);
techDescription.setText(tech);
techDescription.setTextSize(20f);
modulein.setText(module);
modulein.setTextSize(20f);
cToolBar.setTitle(title);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,39 @@
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;

import com.example.androidtechies.majorproject.RoomSample.AppDatabase;
import com.example.androidtechies.majorproject.RoomSample.DatabaseInitializer;

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;
public static final Integer cseValue = 1;
public static final Integer itValue = 0;
// public static final Integer eceValue = 2;
// public static final Integer eeeValue = 3;
AppDatabase appDatabase;
Toolbar homeToolbar;


@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);

homeToolbar = findViewById(R.id.hometToolbar);
homeToolbar.setTitle("Select Branch");

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);
// 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);
Expand All @@ -33,27 +45,42 @@ public void onClick(View view) {
// ece.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent ece = new Intent(HomeScreen.this, ECEHomeScreen.class);
// startActivity(ece);
// Intent eceIntent = new Intent(HomeScreen.this, ListPage.class);
// eceIntent.putExtra(HomeScreenTag, eceValue);
// startActivity(eceIntent);
//
// }
// });
// it.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent it = new Intent(HomeScreen.this, ITHomeScreen.class);
// startActivity(it);
//
// }
// });
it.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

Intent itIntent = new Intent(HomeScreen.this, ListPage.class);

itIntent.putExtra(HomeScreenTag, itValue);
startActivity(itIntent);


}
});
// eee.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent eee = new Intent(HomeScreen.this, EEEHomeScreen.class);
// startActivity(eee);
//
// Intent eeeIntent = new Intent(HomeScreen.this, ListPage.class);
// eeeIntent.putExtra(HomeScreenTag,eeeValue);
// startActivity(eeeIntent);
//
//
// }
// });
}


private void populateDatabase() {
DatabaseInitializer.populateAsync(AppDatabase.getAppDatabase(this));
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ public class InformationModel implements Parcelable {
String titleOfProject;
String introProject;
String technologyUsed;
String modulein;

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

}

public String getTitleOfProject() {
Expand All @@ -42,33 +45,52 @@ public void setTechnologyUsed(String technologyUsed) {
this.technologyUsed = technologyUsed;
}

public String getModulein() {
return modulein;
}

public void setModulein(String modulein) {
this.modulein = modulein;
}



@Override
public int describeContents() {
return hashCode();

}

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

parcel.writeString(modulein);

}

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


public static final Parcelable.Creator<InformationModel> CREATOR = new Parcelable.Creator<InformationModel>() {

@Override
public InformationModel createFromParcel(Parcel in) {
return new InformationModel(in);
}

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

return new InformationModel[size];

}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public MyViewHolder(View itemView) {
}
}


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

Expand Down
Loading