Showing
4 changed files
with
37 additions
and
22 deletions
| ... | @@ -11,10 +11,6 @@ import android.view.Menu | ... | @@ -11,10 +11,6 @@ import android.view.Menu |
| 11 | import android.view.MenuItem | 11 | import android.view.MenuItem |
| 12 | import android.view.View | 12 | import android.view.View |
| 13 | import android.webkit.WebView | 13 | import android.webkit.WebView |
| 14 | -import android.widget.ImageView | ||
| 15 | -import android.widget.RatingBar | ||
| 16 | -import android.widget.TextView | ||
| 17 | -import android.widget.Toast | ||
| 18 | import androidx.appcompat.app.ActionBar | 14 | import androidx.appcompat.app.ActionBar |
| 19 | import androidx.appcompat.app.AppCompatActivity | 15 | import androidx.appcompat.app.AppCompatActivity |
| 20 | import androidx.core.content.ContextCompat | 16 | import androidx.core.content.ContextCompat |
| ... | @@ -36,7 +32,9 @@ import android.icu.lang.UCharacter.GraphemeClusterBreak.T | ... | @@ -36,7 +32,9 @@ import android.icu.lang.UCharacter.GraphemeClusterBreak.T |
| 36 | import android.net.Uri | 32 | import android.net.Uri |
| 37 | import android.util.Log | 33 | import android.util.Log |
| 38 | import android.view.MotionEvent | 34 | import android.view.MotionEvent |
| 35 | +import android.widget.* | ||
| 39 | import androidx.core.graphics.blue | 36 | import androidx.core.graphics.blue |
| 37 | +import kotlinx.android.synthetic.main.activity_detail.view.* | ||
| 40 | 38 | ||
| 41 | 39 | ||
| 42 | data class MemoItemDetail( | 40 | data class MemoItemDetail( |
| ... | @@ -128,22 +126,29 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -128,22 +126,29 @@ class DetailActivity : AppCompatActivity() { |
| 128 | } | 126 | } |
| 129 | } | 127 | } |
| 130 | 128 | ||
| 129 | + bottomBar=supportActionBar!! | ||
| 130 | + val r_bottomNavigation: BottomNavigationView =findViewById(R.id.rightBottomBVW) | ||
| 131 | + val l_bottomNavigation: BottomNavigationView=findViewById(R.id.leftBottomBVW) | ||
| 131 | 132 | ||
| 133 | + //l_bottomNavigation.findViewById<Button>(R.id.favorBtn).setBackgroundResource(R.drawable.detail_heart_o) | ||
| 132 | val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> | 134 | val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> |
| 133 | when (item.itemId){ | 135 | when (item.itemId){ |
| 136 | + R.id.favorBtn ->{ | ||
| 137 | + //Toast.makeText(this@DetailActivity,"ssibal",Toast.LENGTH_SHORT).show() | ||
| 138 | + | ||
| 139 | + | ||
| 140 | + } | ||
| 134 | 141 | ||
| 135 | - /* | ||
| 136 | R.id.shareBtn ->{ | 142 | R.id.shareBtn ->{ |
| 137 | //val intent = Intent(this, SignInActivity::class.java) | 143 | //val intent = Intent(this, SignInActivity::class.java) |
| 138 | //startActivity(intent) | 144 | //startActivity(intent) |
| 139 | //return@OnNavigationItemSelectedListener true | 145 | //return@OnNavigationItemSelectedListener true |
| 140 | } | 146 | } |
| 141 | - R.id.favorBtn ->{ | ||
| 142 | - R.id.favorBtn.blue | ||
| 143 | 147 | ||
| 144 | - } | 148 | + |
| 145 | - */ | ||
| 146 | R.id.linkBtn ->{ | 149 | R.id.linkBtn ->{ |
| 150 | + //Toast.makeText(this@DetailActivity,"ssibal",Toast.LENGTH_SHORT).show() | ||
| 151 | + //bottomNavigationView.selectedItemId = R.id.linkBtn | ||
| 147 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse(memo.Link)) | 152 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse(memo.Link)) |
| 148 | startActivity(intent) | 153 | startActivity(intent) |
| 149 | } | 154 | } |
| ... | @@ -152,9 +157,9 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -152,9 +157,9 @@ class DetailActivity : AppCompatActivity() { |
| 152 | false | 157 | false |
| 153 | } | 158 | } |
| 154 | ////bottom navigation view operation start 2 | 159 | ////bottom navigation view operation start 2 |
| 155 | - bottomBar=supportActionBar!! | 160 | + |
| 156 | - val bottomNavigation: BottomNavigationView =findViewById(R.id.rightBottomBVW) | 161 | + r_bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) |
| 157 | - bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | 162 | + l_bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) |
| 158 | /* | 163 | /* |
| 159 | val bottomNavigation2: BottomNavigationView =findViewById(R.id.leftBottomBVW) | 164 | val bottomNavigation2: BottomNavigationView =findViewById(R.id.leftBottomBVW) |
| 160 | bottomNavigation2.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | 165 | bottomNavigation2.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | ... | ... |
| 1 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | + android:layout_width="fill_parent" | ||
| 3 | + android:layout_height="wrap_content"> | ||
| 4 | + <ToggleButton | ||
| 5 | + android:id="@+id/actionbar_service_toggle" | ||
| 6 | + android:layout_width="wrap_content" | ||
| 7 | + android:layout_height="wrap_content" | ||
| 8 | + android:textOn="Logging On" | ||
| 9 | + android:textOff="Logging Off" /> | ||
| 10 | +</RelativeLayout> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -56,8 +56,7 @@ | ... | @@ -56,8 +56,7 @@ |
| 56 | android:layout_height="200dp" | 56 | android:layout_height="200dp" |
| 57 | android:background="@drawable/round_ratangle" | 57 | android:background="@drawable/round_ratangle" |
| 58 | android:elevation="5dp" | 58 | android:elevation="5dp" |
| 59 | - android:scaleType="fitXY" | 59 | + android:scaleType="fitXY" /> |
| 60 | - app:srcCompat="@drawable/image03" /> | ||
| 61 | 60 | ||
| 62 | <LinearLayout | 61 | <LinearLayout |
| 63 | android:layout_width="match_parent" | 62 | android:layout_width="match_parent" |
| ... | @@ -71,7 +70,6 @@ | ... | @@ -71,7 +70,6 @@ |
| 71 | android:layout_height="39dp" | 70 | android:layout_height="39dp" |
| 72 | android:background="@drawable/broken_rectangle" | 71 | android:background="@drawable/broken_rectangle" |
| 73 | android:gravity="center" | 72 | android:gravity="center" |
| 74 | - android:text="TextView" | ||
| 75 | android:textColor="#FFF" | 73 | android:textColor="#FFF" |
| 76 | android:textSize="18sp" /> | 74 | android:textSize="18sp" /> |
| 77 | 75 | ||
| ... | @@ -80,8 +78,7 @@ | ... | @@ -80,8 +78,7 @@ |
| 80 | android:layout_width="wrap_content" | 78 | android:layout_width="wrap_content" |
| 81 | android:layout_height="wrap_content" | 79 | android:layout_height="wrap_content" |
| 82 | android:layout_marginTop="5dp" | 80 | android:layout_marginTop="5dp" |
| 83 | - android:ellipsize="end" | 81 | + android:ellipsize="end" /> |
| 84 | - android:text="TextView" /> | ||
| 85 | 82 | ||
| 86 | <TextView | 83 | <TextView |
| 87 | android:id="@+id/policyTitleDetail" | 84 | android:id="@+id/policyTitleDetail" |
| ... | @@ -89,7 +86,6 @@ | ... | @@ -89,7 +86,6 @@ |
| 89 | android:layout_height="wrap_content" | 86 | android:layout_height="wrap_content" |
| 90 | android:layout_marginLeft="11dp" | 87 | android:layout_marginLeft="11dp" |
| 91 | android:layout_marginBottom="4dp" | 88 | android:layout_marginBottom="4dp" |
| 92 | - android:text="Textw" | ||
| 93 | android:textSize="30sp" /> | 89 | android:textSize="30sp" /> |
| 94 | 90 | ||
| 95 | <RatingBar | 91 | <RatingBar | ... | ... |
| ... | @@ -2,16 +2,20 @@ | ... | @@ -2,16 +2,20 @@ |
| 2 | <menu xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <menu xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:app="http://schemas.android.com/apk/res-auto"> | 3 | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| 4 | <item | 4 | <item |
| 5 | - android:id="@+id/shareBtn" | 5 | + android:id="@+id/favorBtn" |
| 6 | + android:checkable="true" | ||
| 6 | android:enabled="true" | 7 | android:enabled="true" |
| 7 | android:icon="@drawable/heart_fill" | 8 | android:icon="@drawable/heart_fill" |
| 8 | - android:title="Share" | 9 | + android:title="favor" |
| 10 | + android:visible="false" | ||
| 9 | app:showAsAction="ifRoom" /> | 11 | app:showAsAction="ifRoom" /> |
| 10 | <item | 12 | <item |
| 11 | - android:id="@+id/favorBtn" | 13 | + android:id="@+id/shareBtn" |
| 12 | android:enabled="true" | 14 | android:enabled="true" |
| 13 | android:icon="@drawable/share" | 15 | android:icon="@drawable/share" |
| 14 | - android:title="Heart" | 16 | + android:title="heart" |
| 17 | + android:visible="false" | ||
| 15 | app:showAsAction="ifRoom" /> | 18 | app:showAsAction="ifRoom" /> |
| 19 | + | ||
| 16 | </menu> | 20 | </menu> |
| 17 | 21 | ... | ... |
-
Please register or login to post a comment