This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add highlight and show how to use some features
- Loading branch information
1 parent
958e3e8
commit 3829724
Showing
20 changed files
with
503 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginBottom="40dp" | ||
android:src="@drawable/privatechat" | ||
android:layout_alignParentBottom="true" /> | ||
|
||
<TextView | ||
android:layout_width="50dp" | ||
android:layout_height="20dp" | ||
android:id="@+id/private_chat" | ||
android:layout_marginTop="60dp" | ||
android:layout_marginLeft="80dp" | ||
android:layout_alignParentTop="true" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" /> | ||
|
||
<TextView | ||
android:layout_width="20dp" | ||
android:layout_height="20dp" | ||
|
||
android:layout_marginTop="60dp" | ||
android:layout_marginLeft="120dp" | ||
android:id="@+id/press_button" | ||
android:layout_alignParentTop="true" | ||
android:layout_toRightOf="@+id/search_view" | ||
android:layout_toEndOf="@+id/search_view" /> | ||
|
||
<TextView | ||
android:layout_width="150dp" | ||
android:layout_height="100dp" | ||
android:id="@+id/results" | ||
android:layout_marginLeft="80dp" | ||
android:layout_alignParentBottom="true" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_marginBottom="200dp" /> | ||
|
||
<Button | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Continue" | ||
android:id="@+id/button" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" /> | ||
|
||
</RelativeLayout> |
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
63 changes: 63 additions & 0 deletions
63
app/src/main/java/com/zulip/android/activities/ChatBoxFeature.java
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,63 @@ | ||
package com.zulip.android.activities; | ||
|
||
|
||
/** | ||
* Created by Minarva on 12-10-16. | ||
*/ | ||
import android.app.ExpandableListActivity; | ||
import android.content.Intent; | ||
import android.content.res.Resources; | ||
import android.graphics.Paint; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.text.TextPaint; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import com.zulip.android.R; | ||
import com.github.amlcurran.showcaseview.ShowcaseView; | ||
import com.github.amlcurran.showcaseview.targets.ViewTarget; | ||
|
||
public class ChatBoxFeature extends AppCompatActivity { | ||
ShowcaseView showcaseView; | ||
TextView body; | ||
int flag; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.chat_box_feature); | ||
final Button startButton = (Button)findViewById(R.id.button); | ||
final TextPaint titlePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); | ||
titlePaint.setTextSize(44.0f); | ||
|
||
showcaseView = new ShowcaseView.Builder(this) | ||
.withNewStyleShowcase() | ||
.setTarget(new ViewTarget(R.id.chatbox, this)) | ||
.setContentTitle("Swipe left or right to remove the chat box") | ||
.setStyle(R.style.CustomShowcaseTheme2) | ||
.build(); | ||
flag = 0; | ||
body = (TextView)findViewById(R.id.switch_stream); | ||
startButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
if(flag == 0) { | ||
showcaseView = new ShowcaseView.Builder(ChatBoxFeature.this) | ||
.withNewStyleShowcase() | ||
.setTarget(new ViewTarget(R.id.switch_stream, ChatBoxFeature.this)).setContentTitlePaint(titlePaint) | ||
.setContentTitle("Press here to choose a stream") | ||
.setStyle(R.style.CustomShowcaseTheme2) | ||
.build(); | ||
showcaseView.show(); | ||
flag = 1; | ||
|
||
}else{ | ||
Intent i = new Intent(ChatBoxFeature.this, StreamPicker.class); | ||
startActivity(i); | ||
} | ||
|
||
} | ||
}); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
app/src/main/java/com/zulip/android/activities/MessageExplain.java
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,50 @@ | ||
package com.zulip.android.activities; | ||
|
||
/** | ||
* Created by Minarva on 11-10-16. | ||
*/ | ||
import android.app.ExpandableListActivity; | ||
import android.content.Intent; | ||
import android.content.res.Resources; | ||
import android.graphics.Paint; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.text.TextPaint; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import com.zulip.android.R; | ||
import com.github.amlcurran.showcaseview.ShowcaseView; | ||
import com.github.amlcurran.showcaseview.targets.ViewTarget; | ||
|
||
public class MessageExplain extends AppCompatActivity { | ||
ShowcaseView showcaseView; | ||
TextView body; | ||
int flag; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.message_explain); | ||
final Button startButton = (Button)findViewById(R.id.start_button); | ||
final TextPaint titlePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); | ||
titlePaint.setTextSize(44.0f); | ||
|
||
showcaseView = new ShowcaseView.Builder(this) | ||
.withNewStyleShowcase() | ||
.setTarget(new ViewTarget(R.id.more_options, this)) | ||
.setContentTitle("Long press on the Message to get more options") | ||
.setStyle(R.style.CustomShowcaseTheme2) | ||
.build(); | ||
flag = 0; | ||
body = (TextView)findViewById(R.id.more_options); | ||
startButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MessageExplain.this, ShowFeature.class); | ||
startActivity(i); | ||
|
||
} | ||
}); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/zulip/android/activities/ShowFeature.java
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,54 @@ | ||
package com.zulip.android.activities; | ||
|
||
/** | ||
* Created by Minarva on 11-10-16. | ||
*/ | ||
import android.app.ExpandableListActivity; | ||
import android.content.ActivityNotFoundException; | ||
import android.content.Intent; | ||
import android.content.res.Resources; | ||
import android.graphics.Paint; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.text.TextPaint; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import com.zulip.android.R; | ||
import com.github.amlcurran.showcaseview.ShowcaseView; | ||
import com.github.amlcurran.showcaseview.targets.ViewTarget; | ||
|
||
public class ShowFeature extends AppCompatActivity { | ||
ShowcaseView showcaseView; | ||
int flag; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.show_feature); | ||
showcaseView = new ShowcaseView.Builder(this) | ||
.withNewStyleShowcase() | ||
.setTarget(new ViewTarget(R.id.results, this)) | ||
.setContentTitle("Swipe to the Left") | ||
.setContentText("Find users' online status and start private chat") | ||
.setStyle(R.style.CustomShowcaseTheme2) | ||
.build(); | ||
|
||
flag = 0; | ||
final Button startButton = (Button)findViewById(R.id.button); | ||
|
||
startButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
{ | ||
|
||
Intent i = new Intent(ShowFeature.this, ChatBoxFeature.class); | ||
startActivity(i); | ||
} | ||
|
||
} | ||
}); | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/zulip/android/activities/StreamPicker.java
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,53 @@ | ||
package com.zulip.android.activities; | ||
|
||
/** | ||
* Created by Minarva on 11-10-16. | ||
*/ | ||
import android.app.ExpandableListActivity; | ||
import android.content.ActivityNotFoundException; | ||
import android.content.Intent; | ||
import android.content.res.Resources; | ||
import android.graphics.Paint; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.text.TextPaint; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import com.zulip.android.R; | ||
import com.github.amlcurran.showcaseview.ShowcaseView; | ||
import com.github.amlcurran.showcaseview.targets.ViewTarget; | ||
|
||
public class StreamPicker extends AppCompatActivity { | ||
ShowcaseView showcaseView; | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.stream_picker); | ||
showcaseView = new ShowcaseView.Builder(this) | ||
.withNewStyleShowcase() | ||
.setTarget(new ViewTarget(R.id.results, this)) | ||
.setContentText("Switch to a stream and start a chat") | ||
.setStyle(R.style.CustomShowcaseTheme2) | ||
.build(); | ||
|
||
|
||
final Button startButton = (Button)findViewById(R.id.button); | ||
|
||
startButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
{ | ||
|
||
Intent i = new Intent(StreamPicker.this, ZulipActivity.class); | ||
startActivity(i); | ||
} | ||
|
||
} | ||
}); | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.