Remove unavailable resources + update graphics.
@ -2,7 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.lyndir.masterpassword"
|
package="com.lyndir.masterpassword"
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="GIT-SNAPSHOT">
|
android:versionName="2.2">
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="19"
|
android:minSdkVersion="19"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
# File used by Eclipse to determine the target system
|
|
||||||
# Project target.
|
|
||||||
target=android-16
|
|
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 292 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 49 KiB |
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<size
|
|
||||||
android:width="20dp"
|
|
||||||
android:height="20dp" />
|
|
||||||
</shape>
|
|
Before Width: | Height: | Size: 3.6 KiB |
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:fillViewport="true"
|
|
||||||
android:background="@drawable/background">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/users"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:divider="@drawable/divider20"
|
|
||||||
android:showDividers="middle" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp" />
|
|
||||||
</LinearLayout>
|
|
||||||
</HorizontalScrollView>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/userName"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawableTop="@drawable/avatar0"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
android:text="Robert Lee Mitchell" />
|
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Master Password</string>
|
<string name="app_name">Master Password</string>
|
||||||
<string name="avatar">User Avatar</string>
|
|
||||||
<string name="remember">Remember</string>
|
<string name="remember">Remember</string>
|
||||||
<string name="forgetOnClose">Forget on close</string>
|
<string name="forgetOnClose">Forget on close</string>
|
||||||
<string name="maskPassword">Hide password</string>
|
<string name="maskPassword">Hide password</string>
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
package com.lyndir.masterpassword;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import butterknife.ButterKnife;
|
|
||||||
import butterknife.InjectView;
|
|
||||||
import com.lyndir.masterpassword.model.Avatar;
|
|
||||||
import com.lyndir.masterpassword.model.User;
|
|
||||||
import com.lyndir.masterpassword.view.AvatarView;
|
|
||||||
|
|
||||||
|
|
||||||
public class UsersActivity extends Activity {
|
|
||||||
|
|
||||||
@InjectView(R.id.users)
|
|
||||||
LinearLayout users;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate( savedInstanceState );
|
|
||||||
setContentView( R.layout.activity_users );
|
|
||||||
ButterKnife.inject( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
|
|
||||||
AvatarView avatarView = new AvatarView( this );
|
|
||||||
avatarView.setUser( new User( "Maarten Billemont", Avatar.EIGHT ) );
|
|
||||||
users.addView( avatarView );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
package com.lyndir.masterpassword.model;
|
|
||||||
|
|
||||||
import com.lyndir.masterpassword.R;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lhunath, 2014-08-20
|
|
||||||
*/
|
|
||||||
public enum Avatar {
|
|
||||||
ZERO( R.drawable.avatar0 ),
|
|
||||||
ONE( R.drawable.avatar1 ),
|
|
||||||
TWO( R.drawable.avatar2 ),
|
|
||||||
THREE( R.drawable.avatar3 ),
|
|
||||||
FOUR( R.drawable.avatar4 ),
|
|
||||||
FIVE( R.drawable.avatar5 ),
|
|
||||||
SIX( R.drawable.avatar6 ),
|
|
||||||
SEVEN( R.drawable.avatar7 ),
|
|
||||||
EIGHT( R.drawable.avatar8 ),
|
|
||||||
NINE( R.drawable.avatar9 ),
|
|
||||||
TEN( R.drawable.avatar10 ),
|
|
||||||
ELEVEN( R.drawable.avatar11 ),
|
|
||||||
TWELVE( R.drawable.avatar12 ),
|
|
||||||
THIRTEEN( R.drawable.avatar13 ),
|
|
||||||
FOURTEEN( R.drawable.avatar14 ),
|
|
||||||
FIFTEEN( R.drawable.avatar15 ),
|
|
||||||
SIXTEEN( R.drawable.avatar16 ),
|
|
||||||
SEVENTEEN( R.drawable.avatar17 ),
|
|
||||||
EIGHTEEN( R.drawable.avatar18 );
|
|
||||||
|
|
||||||
private final int imageResource;
|
|
||||||
|
|
||||||
Avatar(final int imageResource) {
|
|
||||||
this.imageResource = imageResource;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getImageResource() {
|
|
||||||
return imageResource;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
package com.lyndir.masterpassword.model;
|
|
||||||
|
|
||||||
import static com.lyndir.lhunath.opal.system.util.StringUtils.strf;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lhunath, 2014-08-20
|
|
||||||
*/
|
|
||||||
public class User {
|
|
||||||
|
|
||||||
private final String name;
|
|
||||||
private final Avatar avatar;
|
|
||||||
|
|
||||||
public User(final String name, final Avatar avatar) {
|
|
||||||
this.name = name;
|
|
||||||
this.avatar = avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Avatar getAvatar() {
|
|
||||||
return avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(final Object obj) {
|
|
||||||
return this == obj || obj instanceof User && name.equals( ((User) obj).name );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return name.hashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return strf( "{User: %s}", name );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
package com.lyndir.masterpassword.view;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import com.lyndir.masterpassword.R;
|
|
||||||
import com.lyndir.masterpassword.model.User;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lhunath, 2014-08-20
|
|
||||||
*/
|
|
||||||
public class AvatarView extends FrameLayout {
|
|
||||||
|
|
||||||
private final TextView userName;
|
|
||||||
|
|
||||||
public AvatarView(final Context context) {
|
|
||||||
super( context );
|
|
||||||
|
|
||||||
addView( userName = (TextView) LayoutInflater.from( context ).inflate( R.layout.view_user_avatar, this, false ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUser(User user) {
|
|
||||||
userName.setText( user.getName() );
|
|
||||||
userName.setCompoundDrawables( null, getResources().getDrawable( user.getAvatar().getImageResource() ), null, null );
|
|
||||||
}
|
|
||||||
}
|
|