Skip to content

Commit a1947c1

Browse files
committed
ready to start debugging sn channels - still working.
1 parent ef2ddf0 commit a1947c1

6 files changed

Lines changed: 38 additions & 24 deletions

File tree

app/src/main/java/net/sharksystem/asap/sharknet/android/SNChannelAddMessageActivity.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ protected void onCreate(Bundle savedInstanceState) {
4444

4545
Log.d(this.getLogStart(), "created with name: " + this.name + " / " + this.uri);
4646

47-
TextView topicTextView = (TextView) findViewById(R.id.makanName);
47+
TextView topicTextView = (TextView) findViewById(R.id.snChannelName);
4848
topicTextView.setText(this.name);
4949
}
5050

5151
public void onAddClick(View view) {
5252
// get new message
53-
EditText messageTextView = (EditText) findViewById(R.id.makanMessage);
53+
EditText messageTextView = (EditText) findViewById(R.id.snMessage);
5454

5555
String messageText = messageTextView.getText().toString();
5656

@@ -60,17 +60,16 @@ public void onAddClick(View view) {
6060
try {
6161

6262
// let's sort things out.
63-
CharSequence topic = this.uri;
6463
CharSequence sender =
6564
SNChannelsComponent.getSharkNetChannelComponent().getOwnerID();
6665
Set<CharSequence> recipients = new HashSet<>();
6766
recipients.add("Alice"); // TODO must come from GUI
68-
boolean sign = false; // TODO must come from GUI
69-
boolean encrypt = false; // TODO must come from GUI
67+
boolean sign = true; // TODO must come from GUI
68+
boolean encrypt = true; // TODO must come from GUI
7069
BasicKeyStore basicKeyStore =
7170
SNChannelsComponent.getSharkNetChannelComponent().getBasicKeyStore();
7271

73-
byte[] content = "TestContent".getBytes(); // TODO must come from GUI
72+
byte[] content = messageText.getBytes();
7473

7574
byte[] serializedMessage = null;
7675
serializedMessage = InMemoSNMessage.serializeMessage(

app/src/main/java/net/sharksystem/asap/sharknet/android/SNChannelViewActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5353
////////////////////////////////////////////////////////////////////////
5454
// setup toolbar
5555
// Toolbar myToolbar = (Toolbar) findViewById(R.id.makan_view_with_toolbar);
56-
Toolbar myToolbar = (Toolbar) findViewById(R.id.sn_channel_view_drawer_layout);
56+
Toolbar myToolbar = (Toolbar) findViewById(R.id.sn_channel_view_with_toolbar);
5757
setSupportActionBar(myToolbar);
5858

5959
////////////////////////////////////////////////////////////////////////

app/src/main/java/net/sharksystem/sharknet/android/InitActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ protected void onCreate(Bundle savedInstanceState) {
2828

2929
if(launchFirstActivity) {
3030
// leave - we have no business here
31-
// Intent intent = new Intent(this, MakanListActivity.class);
32-
Intent intent = new Intent(this, SNChannelsListActivity.class);
31+
Intent intent = new Intent(this, MakanListActivity.class);
32+
// Intent intent = new Intent(this, SNChannelsListActivity.class);
3333
this.startActivity(intent);
3434
} else {
3535
setContentView(R.layout.init);
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<!-- Use DrawerLayout as root container for activity -->
3+
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
android:id="@+id/sharknet_drawer_layout"
36
android:layout_width="match_parent"
47
android:layout_height="match_parent"
5-
xmlns:app="http://schemas.android.com/apk/res-auto">
8+
android:fitsSystemWindows="true">
69

7-
<!-- Layout to contain contents of main body of screen (drawer will slide over this) -->
8-
<android.support.v7.widget.Toolbar
9-
android:id="@+id/sn_channel_view_drawer_layout"
10-
android:layout_width="match_parent"
11-
android:layout_height="?attr/actionBarSize"
12-
android:background="?attr/colorPrimary"
13-
android:elevation="4dp"
14-
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
15-
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
10+
<include layout="@layout/sn_channel_view_with_toolbar" />
11+
<include layout="@layout/sharknet_drawer_navigation_view" />
1612

17-
<include layout = "@layout/sn_channel_view_recycler_view"/>
18-
19-
</android.support.constraint.ConstraintLayout>
13+
</android.support.v4.widget.DrawerLayout>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
xmlns:app="http://schemas.android.com/apk/res-auto">
7+
8+
<!-- Layout to contain contents of main body of screen (drawer will slide over this) -->
9+
<android.support.v7.widget.Toolbar
10+
android:id="@+id/sn_channel_view_with_toolbar"
11+
android:layout_width="match_parent"
12+
android:layout_height="?attr/actionBarSize"
13+
android:background="?attr/colorPrimary"
14+
android:elevation="4dp"
15+
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
16+
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
17+
/>
18+
19+
<include layout = "@layout/sn_channel_view_recycler_view"/>
20+
21+
</android.support.constraint.ConstraintLayout>

app/src/main/res/layout/sn_channels_list_drawer_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Use DrawerLayout as root container for activity -->
33
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
5-
android:id="@+id/sn_channel_list_drawer_layout"
5+
android:id="@+id/sharknet_drawer_layout"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
88
android:fitsSystemWindows="true">

0 commit comments

Comments
 (0)