-
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.
- Loading branch information
Showing
26 changed files
with
745 additions
and
127 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package app.com.ieeedtu; | ||
|
||
import android.content.DialogInterface; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.support.design.widget.FloatingActionButton; | ||
import android.support.v7.app.AlertDialog; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.support.v7.widget.Toolbar; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
public class DetailsActivity extends AppCompatActivity { | ||
|
||
String topic, date, month, time, loc, desc, coordiName, coordiCont; | ||
TextView tvLoc, tvTime, tvDesc; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_scrolling); | ||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); | ||
setSupportActionBar(toolbar); | ||
|
||
topic = getIntent().getStringExtra("Topic"); | ||
date = getIntent().getStringExtra("Date"); | ||
month = getIntent().getStringExtra("Month"); | ||
time = getIntent().getStringExtra("Time"); | ||
loc = getIntent().getStringExtra("Loc"); | ||
desc = getIntent().getStringExtra("Desc"); | ||
coordiName = getIntent().getStringExtra("CoordiName"); | ||
coordiCont = getIntent().getStringExtra("CoordiCon"); | ||
setTitle(topic); | ||
|
||
tvLoc = (TextView) findViewById(R.id.tv_loc); | ||
tvDesc = (TextView) findViewById(R.id.tv_desc); | ||
tvTime = (TextView) findViewById(R.id.tv_time); | ||
tvLoc.setText(loc); | ||
tvDesc.setText(desc); | ||
|
||
if (time != null && !time.isEmpty()) { | ||
tvTime.setText("Date : " + date + "/" + month + " " + "Time : " + time); | ||
} | ||
else { | ||
tvTime.setText("Date : " + date + "/" + month); | ||
} | ||
|
||
|
||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); | ||
fab.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
|
||
String message = "Contact coordinator " + coordiName; | ||
AlertDialog dial = new AlertDialog.Builder(DetailsActivity.this).setTitle("Contact").setMessage(message) | ||
.setPositiveButton("Call", new DialogInterface.OnClickListener() { | ||
@Override | ||
public void onClick(DialogInterface dialogInterface, int i) { | ||
dialPhoneNumber(coordiCont); | ||
|
||
} | ||
}).setNegativeButton("Cancel", new DialogInterface.OnClickListener() { | ||
@Override | ||
public void onClick(DialogInterface dialogInterface, int i) { | ||
dialogInterface.dismiss(); | ||
} | ||
}).create(); | ||
|
||
dial.show(); | ||
|
||
} | ||
}); | ||
} | ||
|
||
public void dialPhoneNumber(String phoneNumber) { | ||
Intent intent = new Intent(Intent.ACTION_DIAL); | ||
intent.setData(Uri.parse("tel:" + phoneNumber)); | ||
if (intent.resolveActivity(getPackageManager()) != null) { | ||
startActivity(intent); | ||
} | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
app/src/main/java/app/com/ieeedtu/EventDetailActivity.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.