Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sosfragment, trackmefraent, fakecallfragment added #81

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
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
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:design:27.1.1"
implementation"com.android.support:design:27.1.1"
implementation"com.android.support:support-v4:27.1.1"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.mindorks:placeholderview:0.2.7'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
android:xlargeScreens="true"/>

<application
android:allowBackup="false"
Expand All @@ -20,14 +20,14 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".SplashActivity">
<activity android:name=".HomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HomeActivity">
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package in.paperwrk.safetycollabproject;

import android.widget.ImageView;
import android.widget.TextView;

import com.mindorks.placeholderview.annotations.Layout;
import com.mindorks.placeholderview.annotations.NonReusable;
import com.mindorks.placeholderview.annotations.Resolve;
import com.mindorks.placeholderview.annotations.View;

import in.paperwrk.safetycollabproject.R;

/**
* Created by NITISH KUMAR on 08-05-2018.
*/
@NonReusable
@Layout(R.layout.drawer_header)
public class DrawerHeader {

@View(R.id.profileImageView)
private ImageView profileImage;

@View(R.id.nameText)
private TextView nameText;

@Resolve
private void onResolved() {
nameText.setText("NIRBHEEK");
}
}
117 changes: 117 additions & 0 deletions app/src/main/java/in/paperwrk/safetycollabproject/DrawerMenuItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package in.paperwrk.safetycollabproject;

import android.content.Context;
import android.support.v7.widget.AppCompatImageView;
import android.support.v7.widget.AppCompatImageView;
import android.widget.ImageView;
import android.support.v7.widget.AppCompatImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.mindorks.placeholderview.annotations.Click;
import com.mindorks.placeholderview.annotations.Layout;
import com.mindorks.placeholderview.annotations.Resolve;
import com.mindorks.placeholderview.annotations.View;

import in.paperwrk.safetycollabproject.R;

/**
* Created by NITISH KUMAR on 08-05-2018.
*/
@Layout(R.layout.drawer_item)
public class DrawerMenuItem {
public static final int TRUSTED_CONTACTS = 1;
public static final int EXPLORE = 2;
public static final int SETTINGS = 3;
public static final int HELP = 4;
public static final int SEND_FEEDBACK = 5;

private int mMenuPosition;
private Context mContext;
private DrawerCallBack mCallBack;

@View(R.id.itemNameTxt)
private TextView itemNameTxt;

@View(R.id.itemIcon)
private ImageView itemIcon;

public DrawerMenuItem(Context context, int menuPosition) {
mContext = context;
mMenuPosition = menuPosition;
}

@Resolve
public void onResolved() {
switch (mMenuPosition) {
case TRUSTED_CONTACTS:
itemNameTxt.setText("Trusted Contacts");
break;

case EXPLORE:
itemNameTxt.setText("Explore");
break;

case SETTINGS:
itemNameTxt.setText("Settings");
break;

case HELP:
itemIcon.setVisibility(android.view.View.GONE);
itemNameTxt.setText("Help");
break;

case SEND_FEEDBACK:
itemIcon.setVisibility(android.view.View.GONE);
itemNameTxt.setText("Feedback");
break;
}
}

@Click(R.id.mainView)
public void onMenuItemClick() {
switch (mMenuPosition) {
case TRUSTED_CONTACTS:
Toast.makeText(mContext, "Trusted Contacts", Toast.LENGTH_SHORT).show();
if (mCallBack != null) mCallBack.onTrustedContactSelected();
break;

case EXPLORE:
Toast.makeText(mContext, "Explore", Toast.LENGTH_SHORT).show();
if (mCallBack != null) mCallBack.onExploreSelected();
break;

case SETTINGS:
Toast.makeText(mContext, "Setting", Toast.LENGTH_SHORT).show();
if (mCallBack != null) mCallBack.onSettingSelected();
break;

case HELP:
Toast.makeText(mContext, "Help", Toast.LENGTH_SHORT).show();
if (mCallBack != null) mCallBack.onHelpSelected();
break;

case SEND_FEEDBACK:
Toast.makeText(mContext, "Send Feedback", Toast.LENGTH_SHORT).show();
if (mCallBack != null) mCallBack.onSendFeedbackSelected();
break;
}
}

public void setDrawerCallBack(DrawerCallBack callBack) {
mCallBack = callBack;
}

public interface DrawerCallBack {
void onTrustedContactSelected();

void onExploreSelected();

void onSettingSelected();

void onHelpSelected();

void onSendFeedbackSelected();
}

}
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
package in.paperwrk.safetycollabproject;


import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;


/**
* A simple {@link Fragment} subclass.
*/
public class FakeCallFragment extends Fragment {
import com.skyfishjy.library.RippleBackground;


public FakeCallFragment() {
// Required empty public constructor
}
public class FakeCallFragment extends Fragment {

private RippleBackground rippleBackground;
private ImageView call_image;
private View view;

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_fake_call, container, false);
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_fake_call, container, false);
rippleBackground = (RippleBackground) view.findViewById(R.id.content);
rippleBackground.startRippleAnimation();
call_image = (ImageView) view.findViewById(R.id.fake_call_button);
call_image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getActivity(), "Fake call initiated!!!", Toast.LENGTH_SHORT).show();
}
});
return view;
}

}
Loading