Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
faaf826e
Commit
faaf826e
authored
Jun 26, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New interface ContactAdder for ContactAddFragment.
parent
5581d92e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
ContactAdd.java
app/src/main/java/com/xabber/android/ui/ContactAdd.java
+1
-1
ContactAddFragment.java
...c/main/java/com/xabber/android/ui/ContactAddFragment.java
+3
-1
ContactAdder.java
app/src/main/java/com/xabber/android/ui/ContactAdder.java
+5
-0
No files found.
app/src/main/java/com/xabber/android/ui/ContactAdd.java
View file @
faaf826e
...
...
@@ -77,7 +77,7 @@ public class ContactAdd extends ManagedActivity implements ContactAddFragment.Li
}
private
void
addContact
()
{
((
ContactAdd
Fragment
)
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
fragment_container
)).
addContact
();
((
ContactAdd
er
)
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
fragment_container
)).
addContact
();
}
@Override
...
...
app/src/main/java/com/xabber/android/ui/ContactAddFragment.java
View file @
faaf826e
...
...
@@ -22,7 +22,8 @@ import com.xabber.android.ui.adapter.AccountChooseAdapter;
import
java.util.Collection
;
public
class
ContactAddFragment
extends
GroupEditorFragment
implements
AdapterView
.
OnItemSelectedListener
{
public
class
ContactAddFragment
extends
GroupEditorFragment
implements
AdapterView
.
OnItemSelectedListener
,
ContactAdder
{
private
static
final
String
SAVED_NAME
=
"com.xabber.android.ui.ContactAdd.SAVED_NAME"
;
private
static
final
String
SAVED_ACCOUNT
=
"com.xabber.android.ui.ContactAdd.SAVED_ACCOUNT"
;
...
...
@@ -166,6 +167,7 @@ public class ContactAddFragment extends GroupEditorFragment implements AdapterVi
public
void
onNothingSelected
(
AdapterView
<?>
parent
)
{
}
@Override
public
void
addContact
()
{
if
(
getAccount
()
==
null
)
{
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
EMPTY_ACCOUNT
),
...
...
app/src/main/java/com/xabber/android/ui/ContactAdder.java
0 → 100644
View file @
faaf826e
package
com
.
xabber
.
android
.
ui
;
public
interface
ContactAdder
{
void
addContact
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment