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 244
Add highlight and show how to use some features #210
Open
minervapanda
wants to merge
1
commit into
zulip:master
Choose a base branch
from
minervapanda:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't capitalize Left here. |
||
.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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually use "Tap" here instead of "Press".