Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
briar
Commits
cac0f308
Verified
Commit
cac0f308
authored
8 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Convert ExpiredActivity to XML
Closes
#396
parent
fb853453
No related branches found
No related tags found
1 merge request
!196
Convert ExpiredActivity to XML
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
briar-android/res/layout/activity_expired.xml
+9
-0
9 additions, 0 deletions
briar-android/res/layout/activity_expired.xml
briar-android/src/org/briarproject/android/ExpiredActivity.java
+5
-23
5 additions, 23 deletions
...android/src/org/briarproject/android/ExpiredActivity.java
with
14 additions
and
23 deletions
briar-android/res/layout/activity_expired.xml
0 → 100644
+
9
−
0
View file @
cac0f308
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"@string/expiry_warning"
android:textSize=
"@dimen/text_size_large"
/>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
briar-android/src/org/briarproject/android/ExpiredActivity.java
+
5
−
23
View file @
cac0f308
package
org.briarproject.android
;
import
static
android
.
view
.
Gravity
.
CENTER
;
import
static
android
.
view
.
WindowManager
.
LayoutParams
.
FLAG_SECURE
;
import
static
org
.
briarproject
.
android
.
TestingConstants
.
PREVENT_SCREENSHOTS
;
import
static
org
.
briarproject
.
android
.
util
.
CommonLayoutParams
.
MATCH_MATCH
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
org.briarproject.R
;
import
org.briarproject.android.util.LayoutUtils
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
static
android
.
view
.
WindowManager
.
LayoutParams
.
FLAG_SECURE
;
import
static
org
.
briarproject
.
android
.
TestingConstants
.
PREVENT_SCREENSHOTS
;
public
class
ExpiredActivity
extends
Activity
{
...
...
@@ -21,19 +16,6 @@ public class ExpiredActivity extends Activity {
if
(
PREVENT_SCREENSHOTS
)
getWindow
().
addFlags
(
FLAG_SECURE
);
LinearLayout
layout
=
new
LinearLayout
(
this
);
layout
.
setLayoutParams
(
MATCH_MATCH
);
layout
.
setGravity
(
CENTER
);
int
pad
=
LayoutUtils
.
getPadding
(
this
);
TextView
warning
=
new
TextView
(
this
);
warning
.
setGravity
(
CENTER
);
warning
.
setTextSize
(
18
);
warning
.
setPadding
(
pad
,
pad
,
pad
,
pad
);
warning
.
setText
(
R
.
string
.
expiry_warning
);
layout
.
addView
(
warning
);
setContentView
(
layout
);
setContentView
(
R
.
layout
.
activity_expired
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment